Changed so items only give their "bonus" while in hand - will change for LivingArmour too.
This commit is contained in:
parent
a71673a60e
commit
fc70bcf107
5 changed files with 25 additions and 13 deletions
|
@ -106,8 +106,11 @@ public class ItemBoundSword extends ItemSword implements IBindable, IActivatable
|
|||
public Multimap<String, AttributeModifier> getAttributeModifiers(EntityEquipmentSlot equipmentSlot, ItemStack stack)
|
||||
{
|
||||
Multimap<String, AttributeModifier> multimap = super.getItemAttributeModifiers(equipmentSlot);
|
||||
double damage = getActivated(stack) ? this.attackDamage : 1.0D;
|
||||
multimap.put(SharedMonsterAttributes.ATTACK_DAMAGE.getAttributeUnlocalizedName(), new AttributeModifier(ATTACK_DAMAGE_MODIFIER, "Weapon modifier", damage, 0));
|
||||
if (equipmentSlot == EntityEquipmentSlot.MAINHAND)
|
||||
{
|
||||
double damage = getActivated(stack) ? this.attackDamage : 1.0D;
|
||||
multimap.put(SharedMonsterAttributes.ATTACK_DAMAGE.getAttributeUnlocalizedName(), new AttributeModifier(ATTACK_DAMAGE_MODIFIER, "Weapon modifier", damage, 0));
|
||||
}
|
||||
return multimap;
|
||||
}
|
||||
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue