Skip to content

Commit

Permalink
don't add components if not needed
Browse files Browse the repository at this point in the history
  • Loading branch information
ryderbelserion committed Jan 5, 2025
1 parent 373a16d commit e15eea5
Showing 1 changed file with 3 additions and 1 deletion.
Original file line number Diff line number Diff line change
Expand Up @@ -920,7 +920,9 @@ private ItemBuilder setReferenceItem(ItemStack referenceItem) {
* @return the ItemBuilder with an updated Boolean.
*/
public ItemBuilder setUnbreakable(boolean unbreakable) {
this.itemStack.setData(DataComponentTypes.UNBREAKABLE, Unbreakable.unbreakable(unbreakable));
if (unbreakable) {
this.itemStack.setData(DataComponentTypes.UNBREAKABLE, Unbreakable.unbreakable().build().showInTooltip(true));
}

return this;
}
Expand Down

0 comments on commit e15eea5

Please # to comment.