Keys.HIDE_UNBREAKABLE?

Hey! I’m new to the Sponge API as of today… I’m just learning the basics. Right now I’m adding an item to a player’s inventory like so:

ItemStack item = ItemStack.of(ItemTypes.LEATHER_BOOTS, 1);
item.offer(Keys.COLOR, Color.WHITE);
item.offer(Keys.UNBREAKABLE, true);
item.offer(Keys.HIDE_UNBREAKABLE, true);
item.offer(Keys.ITEM_ENCHANTMENTS, new ArrayList<>());
player.getInventory().offer(item);

The item shows up in the inventory with everything as expected (white, unbreakable leather boots) except, the unbreakable tag is showing, despite offering HIDE_UNBREAKABLE. Am I missing something?

Update? The HIDE_UNBREAKABLE tag appears to hide enchantments as opposed to the unbreakable attribute.

Likely a bug in the implementation, please submit a new issue for SpongeCommon.

This appears to be fixed now.

1 Like