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!
New features
- Added the
legacyMode
variable to theGateUpdater
class, which controls whether the system uses the legacy method for updating block states (REDSTONE_BLOCK
orMaterial.AIR
) or the modern method (GateUtils.setRedstonePower
). - Added
legacyMode
configuration in theconfig.yml
file with a corresponding comment explaining its functionality. - Updated
messages.yml
file. - Added a
Sound.BLOCK_NOTE_BLOCK_PLING
when a gate block is interacted with. - Added support for
Material.TARGET
block on output.
Changed
- Improved the
setRedstonePower
function in the Bukkit plugin to make it safer. Added synchronization, improved exception handling. - Corrected the
UpdateChecker
class to use proper format specifiers inString.format
.
Fixed
- Fixed the
java.util.UnknownFormatConversionException: Conversion = 'l'
error in theUpdateChecker
class. - Fixed issues in the
messages.yml
file related to incorrect format specifiers.
Changes in version 1.1.7:
- Updated
com.gradleup.shadow
: The com.gradleup.shadow plugin has been updated to the latest version. The hard-coded version of the plugin has also been removed, which will make future updates easier. - Migrated to PaperMC-API: The project has been migrated from Spigot-API to PaperMC-API. This change should provide benefits in terms of improved performance and access to new features offered by PaperMC.
- Package name change: The package name has been changed from
com.piotrbednarski
topl.bednarskiwsieci
.
Added integration with bStats for tracking plugin usage statistics. https://bstats.org/plugin/bukkit/LogicGates/24700
The plugin has been completely redesigned, expanding with new features and fixing many bugs.
-
Updated Documentation Link:
The documentation link has been updated to point to the latest version of the plugin documentation, ensuring users have access to the most current information. -
Documentation Relocation:
The plugin’s documentation has been removed from the current project repository and transferred to a dedicated new repository, allowing for easier management and access. -
File Rename -
gates.yml
toconfig.yml
:
The file previously namedgates.yml
has been renamed toconfig.yml
to better reflect its role in configuration and to standardize file naming conventions across the plugin. -
Gate Data Migration:
The data for gates has been extracted from the oldgates.yml
file and is now stored in a new JSON format file,gates.json
. This change improves data management and provides greater flexibility for future updates. -
Translation Optimization:
The number of translations inmessages.yml
has been reduced to streamline the configuration and improve the performance of language handling. -
WorldEdit Integration Added:
The plugin now includes integration with WorldEdit, allowing users to create and manipulate gates in a more intuitive and efficient manner. -
Three-Input Logic Gates:
Support for logic gates with three inputs has been added, expanding the plugin's functionality and offering more complex gate configurations. -
Automatic Update Checking:
The plugin now includes an automatic update checking feature, ensuring that users are notified when a new version of the plugin is available, making it easier to stay up-to-date. -
Improved
give
Command with GUI Interface:
The previous manual entry for block types in the/give
command has been replaced with an easy-to-use graphical user interface (GUI), enhancing user experience and reducing errors. -
Default Gate Direction Aligned to Player’s Facing Direction:
When a gate is placed, its default direction is now aligned with the direction the player is facing, ensuring more intuitive placement. -
Carpet Block Gate Return to Inventory:
When a carpet block gate is destroyed, the gate is now returned to the player's inventory, preventing item loss and improving usability. -
Magic Wand for Gate Rotation:
The rotation of gates can now be controlled through a "magic wand" item, replacing the previous command-based rotation, which enhances the gameplay experience. -
Gate State Update Queue Mechanism:
A queuing mechanism for gate state updates has been implemented usingConcurrentLinkedQueue
andConcurrentHashMap
. This allows for more efficient processing of state changes, especially on high-traffic servers. -
Synchronization with Server Tick Rate:
Updates to gate states are now synchronized with the server's tick rate, ensuring that state changes occur at the correct intervals and improving performance. -
State Change Verification for Efficiency:
A verification system has been added to check if the state of a gate has changed since the last update. This reduces unnecessary operations, leading to more efficient processing. -
Code Optimization and Bug Fixes:
The overall code has been optimized for better performance, and numerous bugs have been fixed, ensuring a more stable and reliable plugin.
Full Changelog: https://github.com/piotrmaciejbednarski/LogicGates/compare/v1.1.4...v1.1.5