Skip to content

Commit

Permalink
Implement the item melee damage bugfix (#390)
Browse files Browse the repository at this point in the history
  • Loading branch information
NerdyPuzzle authored Mar 4, 2023
1 parent 9b226e8 commit c20a92c
Showing 1 changed file with 2 additions and 1 deletion.
3 changes: 2 additions & 1 deletion src/fabric-1.19.2/templates/item/item.java.ftl
Original file line number Diff line number Diff line change
Expand Up @@ -120,6 +120,7 @@ public class ${name}Item extends Item {
builder.putAll(super.getDefaultAttributeModifiers(equipmentSlot));
builder.put(Attributes.ATTACK_DAMAGE, new AttributeModifier(BASE_ATTACK_DAMAGE_UUID, "Item modifier", ${data.damageVsEntity - 2}d, AttributeModifier.Operation.ADDITION));
builder.put(Attributes.ATTACK_SPEED, new AttributeModifier(BASE_ATTACK_SPEED_UUID, "Item modifier", -2.4, AttributeModifier.Operation.ADDITION));
return builder.build();
}
return super.getDefaultAttributeModifiers(equipmentSlot);
}
Expand Down Expand Up @@ -229,4 +230,4 @@ public class ${name}Item extends Item {
<@onItemTick data.onItemInUseTick, data.onItemInInventoryTick/>

}
<#-- @formatter:on -->
<#-- @formatter:on -->

0 comments on commit c20a92c

Please sign in to comment.