Skip to content

show_in_tooltip Java component tag is not resolved properly #5736

@WyndevCodes

Description

@WyndevCodes

Describe the bug

When attempting to hide certain elements of my item's descriptions to bedrock players, I notice that the built-in ItemTranslator class handles showing the text for these components in the item's lore. In a server version running 1.21.4, I can still see item components such as vanilla item attributes, even with the component tag on the item itself having an empty attribute modifier list and hiding the attribute modifiers.

With this fix, a proposed change is to add support for hiding the can_break and can_place components, which would resolve #5319.

To Reproduce

Create a wooden sword on Java with the following component tag: attribute_modifiers=[show_in_tooltip:0b, modifiers= []], and view it on a bedrock client.

Expected behaviour

The item's attribute modifiers should be hidden. If fixing #5319, all Java components with the tag show_in_tooltip should be hidden properly by the TooltipOptions class or the ItemTranslator class.

Screenshots / Videos

No response

Server Version and Plugins

Server Version:
[03:52:32 INFO]: This server is running Paper version 1.21.4-232-ver/1.21.4@12d8fe0 (2025-06-09T10:15:42Z) (Implementing API version 1.21.4-R0.1-SNAPSHOT)
Plugins:
[03:53:02 INFO]: ℹ Server Plugins (48):
[03:53:02 INFO]: Paper Plugins (1):
[03:53:02 INFO]: - FancyHolograms
[03:53:02 INFO]: Bukkit Plugins (47):
[03:53:02 INFO]: - AggressiveAnimals, ajLeaderboards, AutoViaUpdater, AxiomPaper, BetterHud, Citizens, DecentHolograms, DiscordSRV, DungeonDodge, Essentials
[03:53:02 INFO]: FastAsyncVoxelSniper, FastAsyncWorldEdit, floodgate, Geyser-Spigot, GeyserUpdater, HeadDatabase, HoloMobHealth, ImageFrame, InteractiveChat, InteractiveChatDiscordSrvAddon
[03:53:02 INFO]: InvSeePlusPlus, InvSeePlusPlus_Clear, InvSeePlusPlus_Give, ItemEdit, ItemsAdder, LibsDisguises, LuckPerms, ModelEngine, Multiverse-Core, NBTAPI
[03:53:02 INFO]: NoteBlockAPI, OldCombatMechanics, packetevents, PlaceholderAPI, PlayerAuctions, PlayerVaults, PlugManX, ProtocolLib, TAB, TradeAudit
[03:53:02 INFO]: TradeSystem, Vault, ViaBackwards, ViaVersion, VoidGen, Wardrobe, WorldGuard

Geyser Dump

Geyser dump fails

Geyser Version

2.8.2-b897 (git-master-57eb3b7)

Minecraft: Bedrock Edition Device/Version

1.21.94, Windows PC

Additional Context

No response

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions