Add dyeable support for custom items (v2)#6497
Closed
Morningstar-Garden wants to merge 1 commit into
Closed
Conversation
Allow custom items to be marked dyeable via CustomItemBedrockOptions#dyeable (API + JSON mappings "dyeable" option). When set, the item is registered on Bedrock with the minecraft:dyeable component and its icon gains a "dyed" texture state so the tint actually renders; a Java minecraft:dyed_color component is then translated to the customColor tag. The dyed-color translation is moved into the base Item#translateComponentsToBedrock so it applies to any item carrying the component, removing the now-redundant overrides in DyeableArmorItem and WolfArmorItem. Verified end-to-end on a 26.2 Fabric server with a Bedrock client: a dyeable custom item renders and tints correctly (dyed via cauldron, per Bedrock). Co-Authored-By: Claude Opus 4.8 <noreply@anthropic.com>
Contributor
|
Please note we have an AI policy: https://github.com/GeyserMC/.github/blob/master/AI_POLICY.md |
Author
|
Understood, and apologies — I didn't realize AI-assisted contributions were against policy. Sorry for the noise; I'll respect the AI policy going forward. |
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.
Addresses the "supporting dyeable items" item from the 26.2 checklist (#6452).
Adds the ability to mark a v2 custom item as dyeable, via
CustomItemBedrockOptions#dyeable(API) and adyeableoption in the JSONitem mappings.
When enabled:
minecraft:dyeablecomponent, andminecraft:icongains adyedtexture state so Bedrockactually renders the tint (without it, dyed items render invisibly — the
icon needs both a
defaultand adyedstate).A Java
minecraft:dyed_colorcomponent is then translated to Bedrock'scustomColortag. That translation is moved into the baseItem#translateComponentsToBedrock, so it applies to any item carrying thecomponent; the now-redundant overrides in
DyeableArmorItemandWolfArmorItemare removed.Testing
Verified end-to-end on a 26.2 Fabric server with a Bedrock client: a dyeable
custom item renders and tints correctly, and existing dyed leather/wolf armor
still tints correctly after the refactor.