#Tracking and persisting grouped blocks without BlockEntities

7 messages · Page 1 of 1 (latest)

lean ember
#

I’m making a custom block that can form “pools” in the world, spreading like fire. I want entities to be affected only if they’re in the same pool, and different pools of the same block shouldn’t interact. I was thinking of assigning each pool a UUID to track it.

How can I save that UUID on the blocks themselves so it persists across world reloads? I’d prefer not to use a BlockEntity — is there any way around that, or is a BlockEntity required?

grave crow
#

Chunk attachments, level attachments, or saved data could work (I can't remember which ones Fabric has available).

#

However, you won't be able to store the UUID on the blocks themselves without a block entity.

lean ember
#

what about saved data? where is minecraft using this and is there any resource outside of vanilla i can look into?

novel vale
#

A potentially cheaper way to do this that has less fidelity would be to make there be a finite number of pools in a world and randomly assign the first block a pool