Fabric API

Fabric API

106M Downloads

Registry for block particles

haykam821 opened this issue ยท 3 comments

commented

It would be beneficial for Fabric API to provide a way for modders to add their blocks to ClientWorld.BlockParticle.

For example:

FabricBlockParticleRegistry.INSTANCE.put(
    ModBlocks.LIGHT_BARRIER, // Block where the particle is shown
    ModParticleTypes.LIGHT_BARRIER, // The particle that is shown
    ModItems.LIGHT_BARRIER // Item that causes the particle to be shown
);
commented

Since BlockParticle is an enum, this looks like something that would need this?
FabricMC/fabric-loom#305

commented

Although the ClientWorld.BlockParticle looks like a redundant policy holder since the overall result is:
held item -> particle effect

commented

This API is no longer necessary since as of Minecraft snapshot 21w42a, it is trivial to make field_35432 public and add an item directly to that set.