Skip to content

fix: anvil name components changes [EcoHub-14] - #564

Open
Exanthiax wants to merge 3 commits into
masterfrom
fix/anvil-custom-name-component-format
Open

fix: anvil name components changes [EcoHub-14]#564
Exanthiax wants to merge 3 commits into
masterfrom
fix/anvil-custom-name-component-format

Conversation

@Exanthiax

Copy link
Copy Markdown
Member

No description provided.

Component.unstyled() wrapped every name/lore line in an empty parent
component (color(null), italic false) via append(), so the CUSTOM_NAME
data component ended up as {"text":"","extra":[{"text":"Name"}]}
instead of a flat {"text":"Name"}. Anvil renames (and any other
FastItemStack.displayName/lore write) go through this path, so every
renamed item's custom_name diverged from vanilla's format, breaking
resource packs that key item models off custom_name.

Use decorationIfAbsent(ITALIC, FALSE) directly on the component instead
of wrapping it, which only resets the implicit italic on custom names
without introducing a synthetic parent/child structure.
@Exanthiax
Exanthiax requested a review from a team August 5, 2026 21:21
@Exanthiax

Copy link
Copy Markdown
Member Author

Regression: All lores are now in italics as they were previously not needed to be formatted not to be italics.

@CallumJohnson CallumJohnson changed the title fix: anvil name components changes fix(EcoHub-14): anvil name components changes Aug 10, 2026
@Exanthiax
Exanthiax marked this pull request as ready for review August 10, 2026 22:29
@Exanthiax
Exanthiax requested review from 0ft3n and WillFP as code owners August 10, 2026 22:29
@Exanthiax Exanthiax changed the title fix(EcoHub-14): anvil name components changes fix: anvil name components changes [EcoHub-14] Aug 10, 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.

2 participants