Makes placing crystals really fast
Based on the work by Jyguy in mcpvp-club/FasterCrystals, with some improvements
-
Performance
- Runs way more code asynchronously, most packet logic can be done off the main thread
- Simplified logic; FasterCrystals does a lot of checks it really shouldn't, such as here as compared to here, these do effectively same thing, but FasterCrystals does more logic in a much less readable way than it has to
- Other minor things, like caching the plugin instance rather than getting it from the class and not constantly cloning the location for no reason
-
Speed
- Since FastCrystals runs almost entirely asynchronously, it doesn't need to schedule onto the main thread as often, which means it doesn't need to wait until the next game tick to perform logic
- FastCrystals also sends the client some packets directly, without having to wait for the server to process anything, improving the speed the client can place at. This can theoretically reduce times between crystal placements up to between 50-99ms, and will likely be improved upon in future versions of this plugin
-
Maintainability
- FastCrystals doesn't use any Minecraft server internals, instead 100% leveraging only the modern Paper API, making it much more likely to retain compatibilty going into the future, needing much less matenience with future versions, and reducing complexity
- FastCrystals makes various code readability improvements by utilizing much less nesting, more early returns, and adhering to the Google Java Format
-
Some fixes, for example FasterCrystals doesn't work with bedrock, only obsidian