Skip to content

Update click and hover text component serialization for 1.21.5. - #2757

Merged
wizjany merged 1 commit into
version/7.3.xfrom
fix/text3-gson-serialization
Apr 18, 2025
Merged

Update click and hover text component serialization for 1.21.5.#2757
wizjany merged 1 commit into
version/7.3.xfrom
fix/text3-gson-serialization

Conversation

@wizjany

@wizjany wizjany commented Apr 12, 2025

Copy link
Copy Markdown
Collaborator

Hacky workaround by overwriting the text3 StyleSerializer class with our own modified copy. Note that the hover events "show_entity" and "show_item" aren't supported as they no longer take a rendered component, but just the NBT structure.

Fixes #2756.

This is really ugly but it might be the easiest solution without updating text3 directly (and figuring out things like show item/entity). Note that this also breaks MC <= 1.21.4 support. If we go with this we can also remove adapters again (lol).

@wizjany
wizjany requested a review from a team as a code owner April 12, 2025 16:01
Hacky workaround by overwriting the text3 StyleSerializer class with our own modified copy.
Note that the hover events "show_entity" and "show_item" aren't supported as they no longer take a rendered component, but just the NBT structure.

Behavior remains unchanged if 1.21.4- is detected.

Fixes #2756.
@wizjany
wizjany force-pushed the fix/text3-gson-serialization branch from bf758b2 to f810219 Compare April 18, 2025 01:47
@wizjany
wizjany enabled auto-merge April 18, 2025 01:48
@wizjany
wizjany added this pull request to the merge queue Apr 18, 2025
Merged via the queue into version/7.3.x with commit ce04385 Apr 18, 2025
@wizjany
wizjany deleted the fix/text3-gson-serialization branch April 18, 2025 02:21
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1.21.5, clickEvent not updated to click_event (same for hoverEvent if any)

2 participants