use of net.minecraft.entity.ai.attributes.AttributeModifier in project SilentGems by SilentChaos512.
the class ItemGemArmor method getAttributeModifiers.
@Override
public Multimap<String, AttributeModifier> getAttributeModifiers(EntityEquipmentSlot slot, ItemStack stack) {
Multimap<String, AttributeModifier> multimap = HashMultimap.create();
if (slot == this.armorType) {
multimap.put(SharedMonsterAttributes.ARMOR.getName(), new AttributeModifier(ARMOR_MODIFIERS[slot.getIndex()], "Armor modifier", getProtection(stack), 0));
multimap.put(SharedMonsterAttributes.ARMOR_TOUGHNESS.getName(), new AttributeModifier(ARMOR_MODIFIERS[slot.getIndex()], "Armor toughness", getToughness(stack), 0));
}
return multimap;
}
use of net.minecraft.entity.ai.attributes.AttributeModifier in project TechReborn by TechReborn.
the class ItemNanosaber method getAttributeModifiers.
@Override
public Multimap<String, AttributeModifier> getAttributeModifiers(EntityEquipmentSlot slot, ItemStack stack) {
Multimap<String, AttributeModifier> multimap = HashMultimap.<String, AttributeModifier>create();
int modifier = 0;
if (stack.getTagCompound().getBoolean("isActive"))
modifier = 9;
if (slot == EntityEquipmentSlot.MAINHAND) {
multimap.put(SharedMonsterAttributes.ATTACK_DAMAGE.getAttributeUnlocalizedName(), new AttributeModifier(ATTACK_DAMAGE_MODIFIER, "Weapon modifier", (double) modifier, 0));
multimap.put(SharedMonsterAttributes.ATTACK_SPEED.getAttributeUnlocalizedName(), new AttributeModifier(ATTACK_SPEED_MODIFIER, "Weapon modifier", -2.4000000953674316D, 0));
}
return multimap;
}
use of net.minecraft.entity.ai.attributes.AttributeModifier in project Skree by Skelril.
the class LoadedArmor method getItemAttributeModifiers.
@Override
public Multimap<String, AttributeModifier> getItemAttributeModifiers(EntityEquipmentSlot equipmentSlot) {
Multimap<String, AttributeModifier> multimap = HashMultimap.create();
if (equipmentSlot == armorType) {
multimap.put(SharedMonsterAttributes.ARMOR.getName(), new AttributeModifier(ARMOR_MODIFIERS[equipmentSlot.getIndex()], "Armor modifier", config.getDamageReducationAmount(), 0));
multimap.put(SharedMonsterAttributes.ARMOR_TOUGHNESS.getName(), new AttributeModifier(ARMOR_MODIFIERS[equipmentSlot.getIndex()], "Armor toughness", config.getToughness(), 0));
}
return multimap;
}
use of net.minecraft.entity.ai.attributes.AttributeModifier in project Skree by Skelril.
the class ICustomHoe method getItemAttributeModifiers.
default Multimap<String, AttributeModifier> getItemAttributeModifiers(EntityEquipmentSlot equipmentSlot) {
Multimap<String, AttributeModifier> multimap = __superGetItemAttributeModifiers(equipmentSlot);
if (equipmentSlot == EntityEquipmentSlot.MAINHAND) {
multimap.put(SharedMonsterAttributes.ATTACK_DAMAGE.getName(), new AttributeModifier(ATTACK_DAMAGE_MODIFIER, "Weapon modifier", __getHitPower(), 0));
multimap.put(SharedMonsterAttributes.ATTACK_SPEED.getName(), new AttributeModifier(ATTACK_SPEED_MODIFIER, "Weapon modifier", __getAttackSpeed(), 0));
}
return multimap;
}
use of net.minecraft.entity.ai.attributes.AttributeModifier in project Skree by Skelril.
the class LoadedSword method getItemAttributeModifiers.
@Override
public Multimap<String, AttributeModifier> getItemAttributeModifiers(EntityEquipmentSlot equipmentSlot) {
Multimap<String, AttributeModifier> multimap = HashMultimap.create();
if (equipmentSlot == EntityEquipmentSlot.MAINHAND) {
multimap.put(SharedMonsterAttributes.ATTACK_DAMAGE.getName(), new AttributeModifier(ATTACK_DAMAGE_MODIFIER, "Weapon modifier", config.getHitPower() - 1, 0));
multimap.put(SharedMonsterAttributes.ATTACK_SPEED.getName(), new AttributeModifier(ATTACK_SPEED_MODIFIER, "Weapon modifier", config.getAttackSpeed(), 0));
}
return multimap;
}
Aggregations