Terrain Control

Terrain Control

235k Downloads

Broader CB versions support

SimSonic opened this issue ยท 2 comments

commented

Is it really hard to consolidate CraftBukkit version-specific code and make single TC jar working on the most of 1.7.x versions?

I like that TC always is on the edge of CB development but practically I should select between working server 1.7.2 with a lot of plugins and client mods and 1.7.9 server with TerrainControl. for map generation.

commented

This is hard. We would need to maintain lots of duplicated code.

The package versioning Bukkit implemented means that every class that does something outside the Bukkit API (that's in NMS, net.minecraft.server) needs a copy for each Minecraft version. Some plugins, like TagAPI, have only one class that needs access to NMS, so it's doable. In our case, we need at least 10 classes (BukkitWorld, the structure overrides, biome registry).p

Another option is to use reflection, but we would lose Java's type safety. For a project as large as TC, it might be possible (see ProtocolLib), but we'll need to be very careful.

A third option would be to use compile magic to relocate the v1_7_R3 classes to v1_7_R1. This will only work when all methods and fields that TC uses are still the same, which is not the case for v1_7_R3 vs v1_7_R1.

Last option is to pick a specific TC release and make one backport to 1.7.2.


But are there really that much plugins that don't work on 1.7.9? As far as I know, every maior plugin has an update out/doesn't need an update. If you use Spigot, 1.7.2 clients still connect, so client mods shouldn't be a problem. The current TC (2.6.1) version supports Forge 1.7.2.

commented

Thanks for the detailed answer!