mojira.dev
MC-276737

Missing texture when eating items with certain template models

The bug

If, through components, an edible item is given one of several template models, missing texture particles will be produced when it is eaten.

This is an issue since the missing texture should never be visible in vanilla unless a broken resource pack is applied.

This is very, very easy to fix.

How to reproduce

Use one of the following commands, and eat the resulting (invisible) item.

/give @s cookie[item_model="minecraft:generated"]
/give @s cookie[item_model="minecraft:handheld"]
/give @s cookie[item_model="minecraft:handheld_rod"]
/give @s cookie[item_model="minecraft:handheld_mace"]
/give @s cookie[item_model="minecraft:template_bed"]
/give @s cookie[item_model="minecraft:template_shulker_box"]

Expected results

Either no particles at all, or particles that didn't use the missing texture.

Actual results

We see the missing texture.

How to fix

The six model files mentioned above simply don't specify a particle texture, so we simply add three lines to each affected model to specify this.

"handheld", "handheld_rod" and "handheld_mace" all point to "generated", so only "generated" needs to have a particle specified as this particle specification will carry over to all three models.

I've attached a resource pack that fixes this to this ticket - Mojang have my full permission to use this to fix this issue and have all the rights to the included assets.

I've introduced a dedicated "placeholder" texture graphic which "generated" points to in this resource pack, which should cause light blue particles to be produced instead of the unwanted missing texture particles.

For template_bed and template_shulker_box, we simply point to the oak planks texture and shulker box textures respectively. All of the models that reference these two will overwrite the particle texture with their own anyway.

This resource pack also fixes MC-270529 and MC-276725 using much the same methods.

Related issues

Attachments

Comments

migrated
[media][media][media][media][media][media][media][media][media][media][media][media]
BugTracker

Can confirm: Relates to MC-276671 and MC-276673

[media]
muzikbike

MC-276771 has been fixed and MC-276769 remains open, so I'm confused as to why this is Won't Fix. Can this get looked at again? Whatever was done to fix MC-276771 could potentially also be done to this to also fix it.

muzikbike

(Unassigned)

Community Consensus

Platform

Low

Commands, Particles, Textures and models

24w37a, 24w38a

Retrieved