GlowstoneMC / Glowstone

A fast, customizable and compatible open source server for Minecraft: Java Edition
https://glowstone.net
Other
1.88k stars 270 forks source link

BlockData implementation using new redstone-transformer libs #1087

Closed smartboyathome closed 4 years ago

smartboyathome commented 4 years ago

Supersedes #1076, as its based on that PR's code.

The redstone-transformer library implements Bukkit's interfaces using the block report generated by Minecraft's vanilla server. This allows us to have an easier time maintaining this data, and especially the network IDs, which may change between versions. All materials are mapped by the aforementioned library, and exposed through BlockDataManager. I added this manager to GlowServer, and exposed a getter for other classes that need it. This does have its shortcomings, but my plan is to eventually refactor Glowstone to start to integrate Inversion of Control, making passing items like this easier.

This will implement GlowstoneMC/1.13-board#27 and GlowstoneMC/1.13-board#28.