NeoForge icon indicating copy to clipboard operation
NeoForge copied to clipboard

`BreakingItemParticle` does not allow tinting

Open thomasglasser opened this issue 2 months ago • 3 comments

Minecraft Version: Tested 1.21.1 and 1.21.8 but most likely all of them

NeoForge Version: Tested 21.1.211

Steps to Reproduce:

  1. Summon item breaking or eating particles on something dyeable
  2. Notice it doesn't dye at all, even the default, for any layer

Description of issue: ItemBreakingParticle doesn't consider ItemColors, causing the methods to never be called and the coloring never to apply to anything. It uses a TextureAtlasSprite so I'm not sure how you'd apply the colors but it's definitely within Neo scope to fix.

thomasglasser avatar Oct 17 '25 23:10 thomasglasser

The main problem with this is that tint indexes are associated with a baked quad and not a texture. Unlike the terrain particle, which can make use of BlockColor, ItemTintSources are just a list where the index represents the tint index defined on the quad. The particle texture does not have an associated tint source unless the texture itself is on a quad, which is not guaranteed. In those cases, if there are multiple tint sources, which should be applied? It's unclear.

Without taking a deep dive into the codebase, one of the few ways I could imagine this working is that we add an extra field in the model JSON, allowing the particle to specify a tint index, but it would need a lot more baking to work out.

ChampionAsh5357 avatar Oct 18 '25 01:10 ChampionAsh5357

Could you not use -1 as the particle tint index or something?

thomasglasser avatar Oct 20 '25 20:10 thomasglasser

Could you not use -1 as the particle tint index or something?

As a default? Most likely. The more I think about the particle texture tint index, the more I think it should probably just be a general field since I could imagine it being useful for both block and item tints if the model is taken out of context.

ChampionAsh5357 avatar Oct 21 '25 00:10 ChampionAsh5357