Package net.minecraft.entity.ai.attributes

Examples of net.minecraft.entity.ai.attributes.AttributeModifier


  }

  @Override
  public Multimap getItemAttributeModifiers() {
    Multimap multimap = HashMultimap.create();
    multimap.put(SharedMonsterAttributes.attackDamage.getAttributeUnlocalizedName(), new AttributeModifier(field_111210_e, "Weapon modifier", DAMAGE, 0));
    multimap.put(SharedMonsterAttributes.movementSpeed.getAttributeUnlocalizedName(), new AttributeModifier(field_111210_e, "Weapon modifier", 0.25, 1));
    return multimap;
  }
View Full Code Here


    return BaubleType.BELT;
  }

  @Override
  void fillModifiers(Multimap<String, AttributeModifier> attributes) {
    attributes.put(SharedMonsterAttributes.knockbackResistance.getAttributeUnlocalizedName(), new AttributeModifier(new UUID(2745708 /** Random number **/, 43743), "Bauble modifier", 1, 0));
  }
View Full Code Here

  }

  @Override
  public Multimap getItemAttributeModifiers() {
    Multimap map = HashMultimap.create();
    map.put(SharedMonsterAttributes.maxHealth.getAttributeUnlocalizedName(), new AttributeModifier(new UUID(171328 /** Random number **/, armorType), "Armor modifier" + armorType, getHealthBoost(), 0));
    return map;
  }
View Full Code Here

      if(horse.getHorseType() != 3 && horse.getHorseType() != 4 && horse.isTame()) {
        horse.setHorseType(3 + par1ItemStack.getItemDamage());
        BaseAttributeMap attributes = horse.getAttributeMap();
        IAttributeInstance movementSpeed = attributes.getAttributeInstance(SharedMonsterAttributes.movementSpeed);
        IAttributeInstance health = attributes.getAttributeInstance(SharedMonsterAttributes.maxHealth);
        health.applyModifier(new AttributeModifier("Ermergerd Virus D:", health.getBaseValue(), 0));
        movementSpeed.applyModifier(new AttributeModifier("Ermergerd Virus D:", movementSpeed.getBaseValue(), 0));
        IAttributeInstance jumpHeight = attributes.getAttributeInstance(ReflectionHelper.<IAttribute, EntityHorse>getPrivateValue(EntityHorse.class, null, LibObfuscation.HORSE_JUMP_STRENGTH));
        jumpHeight.applyModifier(new AttributeModifier("Ermergerd Virus D:", jumpHeight.getBaseValue() * 0.5, 0));
        par2EntityPlayer.worldObj.playSound(par3EntityLivingBase.posX + 0.5D, par3EntityLivingBase.posY + 0.5D, par3EntityLivingBase.posZ + 0.5D, "mob.zombie.remedy", 1.0F + par3EntityLivingBase.worldObj.rand.nextFloat(), par3EntityLivingBase.worldObj.rand.nextFloat() * 0.7F + 1.3F, false);

        par1ItemStack.stackSize--;
        return true;
      }
View Full Code Here

   
    @Override
    public Multimap getAttributeModifiers(ItemStack stack)
    {
         Multimap map = super.getAttributeModifiers(stack);
         map.put(SharedMonsterAttributes.knockbackResistance.getAttributeUnlocalizedName(), new AttributeModifier(uuid[type.type], "KnockbackResist", type.knockbackModifier, 0));
         map.put(SharedMonsterAttributes.movementSpeed.getAttributeUnlocalizedName(), new AttributeModifier(uuid[type.type], "MovementSpeed", type.moveSpeedModifier - 1F, 2));
         return map;
    }
View Full Code Here

   
    @Override
    public Multimap getAttributeModifiers(ItemStack stack)
    {
         Multimap map = super.getAttributeModifiers(stack);
         map.put(SharedMonsterAttributes.knockbackResistance.getAttributeUnlocalizedName(), new AttributeModifier(field_111210_e, "KnockbackResist", type.knockbackModifier, 0));
         map.put(SharedMonsterAttributes.movementSpeed.getAttributeUnlocalizedName(), new AttributeModifier(field_111210_e, "MovementSpeed", type.moveSpeedModifier - 1F, 2));
        if(type.secondaryFunction == EnumSecondaryFunction.MELEE)
          map.put(SharedMonsterAttributes.attackDamage.getAttributeUnlocalizedName(), new AttributeModifier(field_111210_e, "Weapon modifier", type.meleeDamage, 0));
         return map;
    }
View Full Code Here

 
  @Override
    public Multimap getAttributeModifiers(ItemStack stack)
    {
        Multimap multimap = super.getAttributeModifiers(stack);
        multimap.put(SharedMonsterAttributes.attackDamage.getAttributeUnlocalizedName(), new AttributeModifier(field_111210_e, "Weapon modifier", type.meleeDamage, 0));
        return multimap;
    }
View Full Code Here

TOP

Related Classes of net.minecraft.entity.ai.attributes.AttributeModifier

Copyright © 2018 www.massapicom. All rights reserved.
All source code are property of their respective owners. Java is a trademark of Sun Microsystems, Inc and owned by ORACLE Inc. Contact coftware#gmail.com.