use of net.minecraft.entity.ai.attributes.AttributeModifier in project Skree by Skelril.
the class ICustomSword method getItemAttributeModifiers.
/**
* Gets a map of item attribute modifiers, used by ItemSword to increase hit damage.
*/
@SuppressWarnings("unchecked")
default default Multimap<String, AttributeModifier> getItemAttributeModifiers(EntityEquipmentSlot equipmentSlot) {
Multimap<String, AttributeModifier> multimap = __superGetItemAttributeModifiers(equipmentSlot);
if (equipmentSlot == EntityEquipmentSlot.MAINHAND) {
multimap.put(SharedMonsterAttributes.ATTACK_DAMAGE.getAttributeUnlocalizedName(), new AttributeModifier(ATTACK_DAMAGE_MODIFIER, "Weapon modifier", __getHitPower(), 0));
multimap.put(SharedMonsterAttributes.ATTACK_SPEED.getAttributeUnlocalizedName(), new AttributeModifier(ATTACK_SPEED_MODIFIER, "Weapon modifier", __getAttackSpeed(), 0));
}
return multimap;
}
Aggregations