This update introduces integration with WorldEdit to ensure that the original properties of logic gates created with the plugin are not lost during editing operations performed with WorldEdit.
Key changes:
- During WorldEdit operations, logic gates are temporarily converted into chests containing gate data (e.g., direction, state, interval) stored in a book (WRITABLE_BOOK). This prevents the loss of original data during WorldEdit operations.
- After the WorldEdit operations are completed, the chests are converted back into logic gates, preserving their original properties by retrieving values from the book.
- The integration listens for WorldEdit events (e.g., EditSessionEvent) to track changes and respond accordingly.
- Gate restoration is performed in batches, which improves performance and minimizes server load.
- Gate data is serialized into JSON format and stored in the book using the Gson library.
We can copy our complex systems using WorldEdit and they will retain their original properties. In earlier versions of the plugin, for example, the direction of the gate, the output state, the TIMER interval, the threeInput state — were not copied!
In this version, we can now create WorldEdit schematics and paste them without any problems, copy and paste selections, or use //stack and many more!
https://logicgates.bednarskiwsieci.pl/docs/integrations/worldedit-integration