Upgrading TARDIS plugin from Minecraft 1.8.3 to 1.16.5
Technoguyfication opened this issue ยท 31 comments
Hello! I've got a bit of a fun problem today. I have a very old Minecraft server that's been archived since sometime in 2015. The server's version is 1.8.3 and the TARDIS version is v3.2.11-b1209. I need to get the TARDIS plugin updated to the current version of Minecraft with minimal loss to user data.
Here's what I've done so far:
- Replaced Spigot with latest build of Paper
- Deleted TARDIS.jar and TARDISChunkGenerator.jar and replaced with latest builds from Jenkins (v4.6.2-b2274)
- Updated all other plugins
- Moved config.yml and let the plugin generate a fresh one, then referenced the old file to create this new one as the current configuration
- Deleted all other files in the TARDIS plugin folder besides
config.yml
,TARDIS.db
, andplanets.yml
and restarted the server to re-generate them
This has resulted in a number of errors and bugs, I assume having to do with the database not being properly migrated and containing old data. For example, people's artron condensers and other controls were unlinked and they have to /tardis update
all their controls. Another error occurs in the console when trying to load the map in the ARS menu:
[14:20:34] [Server thread/ERROR]: Could not pass event InventoryClickEvent to TARDIS v4.6.2-b2274
java.lang.IllegalArgumentException: No enum constant org.bukkit.Material.172
at java.lang.Enum.valueOf(Enum.java:240) ~[?:?]
at org.bukkit.Material.valueOf(Material.java:90) ~[patched_1.16.5.jar:git-Paper-739]
at me.eccentric_nz.TARDIS.ARS.TARDISARSMethods.setMap(TARDISARSMethods.java:417) ~[?:?]
at me.eccentric_nz.TARDIS.ARS.TARDISARSMethods.loadMap(TARDISARSMethods.java:400) ~[?:?]
at me.eccentric_nz.TARDIS.ARS.TARDISARSMapListener.onARSMapClick(TARDISARSMapListener.java:88) ~[?:?]
at com.destroystokyo.paper.event.executor.asm.generated.GeneratedEventExecutor310.execute(Unknown Source) ~[?:?]
at org.bukkit.plugin.EventExecutor.lambda$create$1(EventExecutor.java:69) ~[patched_1.16.5.jar:git-Paper-739]
at co.aikar.timings.TimedEventExecutor.execute(TimedEventExecutor.java:80) ~[patched_1.16.5.jar:git-Paper-739]
at org.bukkit.plugin.RegisteredListener.callEvent(RegisteredListener.java:70) ~[patched_1.16.5.jar:git-Paper-739]
at org.bukkit.plugin.SimplePluginManager.callEvent(SimplePluginManager.java:624) ~[patched_1.16.5.jar:git-Paper-739]
at net.minecraft.server.v1_16_R3.PlayerConnection.a(PlayerConnection.java:2715) ~[patched_1.16.5.jar:git-Paper-739]
at net.minecraft.server.v1_16_R3.PacketPlayInWindowClick.a(SourceFile:32) ~[patched_1.16.5.jar:git-Paper-739]
at net.minecraft.server.v1_16_R3.PacketPlayInWindowClick.a(SourceFile:10) ~[patched_1.16.5.jar:git-Paper-739]
at net.minecraft.server.v1_16_R3.PlayerConnectionUtils.lambda$ensureMainThread$1(PlayerConnectionUtils.java:35) ~[patched_1.16.5.jar:git-Paper-739]
at net.minecraft.server.v1_16_R3.TickTask.run(SourceFile:18) ~[patched_1.16.5.jar:git-Paper-739]
at net.minecraft.server.v1_16_R3.IAsyncTaskHandler.executeTask(IAsyncTaskHandler.java:136) ~[patched_1.16.5.jar:git-Paper-739]
at net.minecraft.server.v1_16_R3.IAsyncTaskHandlerReentrant.executeTask(SourceFile:23) ~[patched_1.16.5.jar:git-Paper-739]
at net.minecraft.server.v1_16_R3.IAsyncTaskHandler.executeNext(IAsyncTaskHandler.java:109) ~[patched_1.16.5.jar:git-Paper-739]
at net.minecraft.server.v1_16_R3.MinecraftServer.bb(MinecraftServer.java:1265) ~[patched_1.16.5.jar:git-Paper-739]
at net.minecraft.server.v1_16_R3.MinecraftServer.executeNext(MinecraftServer.java:1258) ~[patched_1.16.5.jar:git-Paper-739]
at net.minecraft.server.v1_16_R3.IAsyncTaskHandler.awaitTasks(IAsyncTaskHandler.java:119) ~[patched_1.16.5.jar:git-Paper-739]
at net.minecraft.server.v1_16_R3.MinecraftServer.sleepForTick(MinecraftServer.java:1219) ~[patched_1.16.5.jar:git-Paper-739]
at net.minecraft.server.v1_16_R3.MinecraftServer.w(MinecraftServer.java:1133) ~[patched_1.16.5.jar:git-Paper-739]
at net.minecraft.server.v1_16_R3.MinecraftServer.lambda$a$0(MinecraftServer.java:290) ~[patched_1.16.5.jar:git-Paper-739]
at java.lang.Thread.run(Thread.java:834) [?:?]
I assume this has to do with the database still containing numerical block IDs rather than the string ones, so the Bukkit material enum is failing to parse the data.
What steps should I take to properly migrate such an old server to the modern version of Minecraft? I was thinking of trying to migrate in steps for the most major versions, like 1.8 -> 1.12 -> 1.13 -> 1.14 -> 1.16. I could really use some insight on this and your thoughts on how I should go about doing this.
Migrating from 1.8 to 1.16 is a pretty big ask, there have been massive changes to Minecraft in that period...
Moved config.yml and let the plugin generate a fresh one
I wouldn't do this, the TARDIS plugin will add and remove any config values it needs to.
migrate in steps for the most major versions, like 1.8 -> 1.12 -> 1.13 -> 1.14 -> 1.16
Probably your best bet.
Thanks for the reply! Do you happen to have an idea of which builds of the plugin I should use for those versions? The sequential build numbers from Jenkins make it hard to tell which build corresponds to each Minecraft version.
These seem to be good:
1.12 - https://dev.bukkit.org/projects/tardis/files/2594118/download
1.13 - https://dev.bukkit.org/projects/tardis/files/2698984/download
1.14 - https://github.com/eccentricdevotion/TARDIS/releases/download/1.14.4/TARDIS_1.14.4.zip
1.15 - https://github.com/eccentricdevotion/TARDIS/releases/download/1.15.2/TARDIS_1.15.2.zip
Digging into the code here, looks like it only updates ARS records that contain a 0 in them. The non-updated records don't have any 0s, which would make sense.
This is running build 1815, I checked the Jenkins but the build history doesn't go back that far. If I can find the commit number for the version I'm running, I can just take that line out of the code and recompile the plugin to force them all to update. Any idea which commit b1815 might be?
Here maybe https://github.com/eccentricdevotion/TARDIS/tree/52386ddffad6cb6daef44fdcd031503cce292da9/src/main
Would probably edit the 0
to a 1
That worked! Had to set conversions.ars_materials
back to false to make it convert the rest of them. On to 1.14!
Looks like it's angry about the defender.json
custom advancement having a reference to zombie_pigman
rather than zombified_piglin
. I tried just deleting the advancement json file to see if it would regenerate, but it didn't make a new one (and the error still showed up, surprisingly.)
Any clue on how to get it to replace it with the correct advancement file? I could just edit it by hand, but I'm not sure if that's a good idea.
Error:
[19:23:40 ERROR]: Parsing error loading custom advancement tardis:defender: Unknown entity type 'minecraft:zombie_pigman', valid types are: minecraft:area_effect_cloud... (trimmed for brevity)
Perfect, thank you! One last question, what's the best way to change the owner of a TARDIS entirely? A couple of my players have lost access to their old Minecraft accounts and made new ones, is it enough to just edit the uuid
field in the tardis
table of the database?
tardis
table andplayer_prefs
would be the most important
Thank you, I'll see what I can do!
Well I got it updated to 1.16.5 successfully, all the controls are in the right places and there's no errors I can see. The TARDIS's exteriors got changed to the default police box wool, but I think that's because you rewrote the chameleon system right? Let me know if I have this wrong, but instead of having a single block for the exterior you create a custom chameleon preset now?
The old exterior preset system still exists, but there are new "item frame" custom model blocks for different coloured police boxes - check out page 2 in the Chameleon Circuit GUI (after you have selected the "shorted out" button)
You can also build your own preset, either with the "construct" button in the chameleon GUI, or using the new(ish) Shell room
Perfect, thanks for the info! I'll go ahead and close this issue now. I think a couple of my players also found your donate button, haha
These seem to be good:
1.12 - https://dev.bukkit.org/projects/tardis/files/2594118/download
1.13 - https://dev.bukkit.org/projects/tardis/files/2698984/download
1.14 - https://github.com/eccentricdevotion/TARDIS/releases/download/1.14.4/TARDIS_1.14.4.zip
1.15 - https://github.com/eccentricdevotion/TARDIS/releases/download/1.15.2/TARDIS_1.15.2.zip
Thank you! I'll do some testing and see how it goes.
Maybe https://www.spigotmc.org/resources/tardis.45729/update?update=236100 for 1.12.2
Well I got stuck pretty fast, for some reason the TARDIS plugin is throwing a couple errors trying to run on 1.12.2. Tried both of the builds you guys sent, same result unfortunately. I'll try using BuildTools to make my own spigot build rather than downloading a pre-made one, and see if that works better.
Here's the errors:
https://pastebin.com/ATrS3VbM
Oh wait, I just looked at the errors. The plugin is trying to load 1.14 NMS classes. Maybe the build is too new?
You are running the wrong version of TARDISChunkGenerator, make sure you use the one bundled with the TARDIS download for the appropriate Minecraft version.
That's the version that's getting downloaded from Spigot. I'm replacing both of them, maybe Spigot is sending the wrong zip file? Here's the direct download link I'm using: https://www.spigotmc.org/resources/tardis.45729/download?version=284732
Looks like Spigot is serving up the wrong file...
Try https://dev.bukkit.org/projects/tardis/files/2594118/download
Looks like Spigot is serving up the wrong file...
Try https://dev.bukkit.org/projects/tardis/files/2594118/download
I'll go ahead and use the Bukkit downloads instead, it's been serving me the correct files for the other dependencies like worldguard and multiverse. Thanks for your help!