Skip to content

fix(minimessage): preserve transformed component children when serializing gradients - #1442

Closed
flennium wants to merge 1 commit into
PaperMC:main/5from
flennium:agent/issue-1383-minimessage-virtual-serialization
Closed

fix(minimessage): preserve transformed component children when serializing gradients#1442
flennium wants to merge 1 commit into
PaperMC:main/5from
flennium:agent/issue-1383-minimessage-virtual-serialization

Conversation

@flennium

@flennium flennium commented Aug 8, 2026

Copy link
Copy Markdown

Proposed PR

Title

fix(minimessage): preserve transformed component children when serializing gradients

Body

Fixes #1383

MiniMessage gradient and rainbow virtual components retain a serializer substitute for their canonical parsed form. After a component transformation such as replaceText, the virtual component can have new children while the renderer still points at the old substitute, causing removed text to reappear during serialization.

The serializer claim is now retained for the parsed virtual component, including nested canonical substitutes, and declined for later-transformed virtual instances so their current children are serialized. Adds regression coverage for the reported case and related gradient/style round trips.

Tested with ./gradlew :adventure-text-minimessage:check and ./gradlew check.

@flennium
flennium marked this pull request as ready for review August 8, 2026 19:30
@flennium flennium closed this by deleting the head repository Aug 8, 2026
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.

MiniMessage serializes components not correctly

1 participant