fix: preserve custom head items in player emotes - #411
Draft
OmarZiadeh wants to merge 1 commit into
Draft
Conversation
Preserve custom helmet components and synthesize a private HEAD-transformed child beneath existing ph_ player heads without changing public bone tags or bundled player models.
OmarZiadeh
force-pushed
the
fix/410-player-emote-item-model
branch
from
August 13, 2026 22:59
78218f7 to
3649eb7
Compare
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Type
Bug fix / small additive API update
Summary
minecraft:item_modelorminecraft:custom_model_datadiffers from the base itemHEAD-transformed renderer child beneath every existingph_player-head bone at model-load timeNo public bone tag or global model-name prefix is added, and
steve.bbmodelis unchanged. Existing installations and custom player rigs gain the behavior on reload without replacing copied model files.Root cause
Player emotes converted the equipped helmet exclusively to
ArmorItemtexture metadata. That conversion discarded the original item stack's custom model components, and the player skin renderer consequently rebuilt only a vanilla armor layer.Implementation
PlayerArmor#helmetItem()is the additive transport seam between version-coupled platform adapters and the renderer. The private player-renderer implementation constructs a deterministic zero-offset child under eachPLAYER_HEAD; its directly constructed, unregisteredBoneTagsupplies the custom-item mapper and never entersBoneTagRegistry.Verification
v1_21_R7) conversion boundary before the fix: custom and plain helmets collapsed to identical armor metadata:nms:v1_21_R7:test --tests 'kr.toxicity.model.bukkit.nms.v1_21_R7.PlayerArmorImplTest':bettermodel-core:test --tests 'kr.toxicity.model.manager.PlayerModelRendererTest'buildacross all Paper mappings, Fabric, tests, license checks, Javadocs, and packagingRenderer coverage starts from an arbitrary existing
ph_headblueprint and verifies player-only synthesis, authored-child preservation, internal-name collision handling, deterministic identity, zero relative offset, visibility, private parsing, helmet/air mapping, and theHEADtransform.An initial uncached run of the three legacy Paperweight setup tasks required its CodeBook Java launcher to use JDK 21 because CodeBook 1.0.14 cannot inspect JDK 25 class files. That workaround is not in this branch; after setup, the normal full build passed.
Remaining draft check
In-game resource-pack visual confirmation is still pending; automated coverage verifies component preservation and the complete renderer-construction path.
Fixes #410