This replaces the old system to save CustomItems on block locations.
The old system uses its own file, in which it saves the locations and data.
While that system works, it had some issues including issues when deleting a world or copying a world, and some sync issues between the state of the world and saved data.
The new system fixes that by directly saving the data into the NBT of the Chunks using the Persistent Data API.
It makes the stored data persist across restarts, without the need of additional error bound files, and when copying world files to another server.
Plus, it makes it way more efficient regarding loading if you have tons of custom items placed in the world.
To-do:
[x] Store/Remove CustomItems that are placed/broken
[x] Start/Stop Particle Animations when placed/broken
[x] Support for custom block data with custom de-/serialization. (e.g. Cauldron data in CC)
[x] Convert old CustomItemStore to new BlockStorage
New Features
WorldStorage, ChunkStorage, and BlockStorage to handle persistent data.
CustomBlockData that can be registered to store custom persistent data.
The data is de-/serialised from/into JSON Strings using Jackson and stored in the NBT of the BlockStorage.
The BlockStorage no longer requires a CustomItem (like the old system)
BlockStorage Events for example to apply CustomBlockData on Block Placement, etc.
This replaces the old system to save CustomItems on block locations. The old system uses its own file, in which it saves the locations and data.
While that system works, it had some issues including issues when deleting a world or copying a world, and some sync issues between the state of the world and saved data.
The new system fixes that by directly saving the data into the NBT of the Chunks using the Persistent Data API. It makes the stored data persist across restarts, without the need of additional error bound files, and when copying world files to another server.
Plus, it makes it way more efficient regarding loading if you have tons of custom items placed in the world.
To-do:
New Features