FabricMC / fabric

Essential hooks for modding with Fabric.
Apache License 2.0
2.36k stars 416 forks source link

Request: Expose block particles to FabricBakedModel #3161

Open quat1024 opened 1 year ago

quat1024 commented 1 year ago

FabricBakedModel defines a level-, pos-, and state-aware emitBlockQuads, and I am requesting that it also expose a level-, pos-, and state-aware version of BakedModel#getParticleIcon.

The use-case here is for "carpenter's blocks"-ish mods: it's very desirable to make the block's breaking, sprinting, and landing particles match the retextured model. It's typically not hard to implement this with a handful of mixins, but it'd be nice if this was part of FabricBakedModel, both to keep everything about the model in one place, and to potentially make it composable with other models w/ custom sprites (my simple mixins just end up calling the zero-arg vanilla getParticleIcon again). And, yknow, it'd be nice.

For comparison, Forge has an API like this on IForgeBakedModel. I think a simpler (level, pos, state) -> TextureAtlasSprite-shaped API would work fine too.

Technici4n commented 1 year ago

Something like this is planned in the mid term. Whether it will be in the model or somewhere else has not been decided yet.