TARDIS

TARDIS

228k Downloads

Upgrading TARDIS plugin from Minecraft 1.8.3 to 1.16.5

Technoguyfication opened this issue ยท 31 comments

commented

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, and planets.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.

commented

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.

commented

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.

commented

Quick question, I'm on 1.13.2 now and it looks like it updated the ARS block ID from numbers to strings in the database! Mostly.. there's still some rows using numerical IDs. Should this be fine, or do I need to do something to make the plugin update those entries?

commented

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.

// no IDs found, already converted

commented

Unfortunately, it will need to update them all

commented

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?

commented

That worked! Had to set conversions.ars_materials back to false to make it convert the rest of them. On to 1.14!

commented

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)
commented
commented

or just grab the latest file from here on github

commented

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?

commented

tardis table and player_prefs would be the most important

commented

tardis table and player_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?

commented

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)

commented

You can also build your own preset, either with the "construct" button in the chameleon GUI, or using the new(ish) Shell room

commented

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

commented

Yes they did :) Much appreciated, thank you all.

commented

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

commented

Oh wait, I just looked at the errors. The plugin is trying to load 1.14 NMS classes. Maybe the build is too new?

commented

You are running the wrong version of TARDISChunkGenerator, make sure you use the one bundled with the TARDIS download for the appropriate Minecraft version.

commented

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

commented

That download is for 1.14

commented

Looks like Spigot is serving up the wrong file...
Try https://dev.bukkit.org/projects/tardis/files/2594118/download

commented

Thank you, it was downloading the 1.14 version when I hit this download button, even on the page for the 1.12 version:

image

commented

Updated previous comment

commented

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!