Geyser icon indicating copy to clipboard operation
Geyser copied to clipboard

Item flags on bedrock items don't hide properly

Open WyndevCodes opened this issue 10 months ago • 1 comments

Describe the bug

While developing a custom mining system for my server, I've noticed that the "CanBreak" tags always show on a Bedrock client's item description, even when the Java item has a component/nbt tag that hides those flags for Java clients. After doing some research, I've concluded that an adequate solution would be to allow setting global gamerules (preferably via the config) for all bedrock clients, and while on the server the clients would obey those gamerules.

There is a gamerule for bedrock called showtags that hides/shows bedrock item nbt tags in the item's lore, so setting that tag to false would be a perfect solution for my issue!

To Reproduce

  1. Give yourself a custom item (on a Java server) with any enchantment or a custom adventure-mode breaking/placement rule.
  2. Ensure that the custom item has the HideFlags tag set to hide the data (either the enchantments, adventure-mode rules, or all)
  3. View the item on both Bedrock and Java clients. The Java client should hide the data properly, while the bedrock client will still see the data.

Expected behaviour

The item flags should stay hidden on Bedrock clients if they hide on Java clients as a result of an item flag in the item's component/nbt data.

Screenshots / Videos

Java: Image Bedrock: Image

Server Version and Plugins

Paper version git-Paper-318 (MC: 1.20.2) (Implementing API version 1.20.2-R0.1-SNAPSHOT) (Git: 9271ee7)

Geyser Dump

https://dump.geysermc.org/7v3zLIsh5sdVnCojrK4pW5toPfZg0Upp

Geyser Version

2.6.0-b754 (git-master-ea13e58)

Minecraft: Bedrock Edition Device/Version

"1.21.40 - 1.21.44", "1.21.50 - 1.21.51"

Additional Context

No response

WyndevCodes avatar Feb 03 '25 22:02 WyndevCodes

I would also like to see this added. Many GUIs use enchanted items as buttons to give them a glowing effect, but choose to hide the enchantments. The enchantments are hidden for Java players, but not Bedrock ones.

OfficialTheosis avatar Feb 25 '25 14:02 OfficialTheosis