Removed not working temp migration code

This commit is contained in:
FlorianMichael 2024-03-11 14:03:01 +01:00
parent 6c7d68237c
commit 8421b1c862

View File

@ -46,13 +46,7 @@ public class MixinServerData implements ExtendedServerData {
@Inject(method = "getServerDataFromNBTCompound", at = @At(value = "TAIL"))
private static void getVersion(NBTTagCompound nbtCompound, CallbackInfoReturnable<ServerData> cir) {
if (nbtCompound.hasKey("viaForge$version")) {
ProtocolVersion version;
if (nbtCompound.getInteger("viaForge$version") != 0) { // Temporary fix for old versions
version = ProtocolVersion.getProtocol(nbtCompound.getInteger("viaForge$version"));
} else {
version = ProtocolVersion.getClosest(nbtCompound.getString("viaForge$version"));
}
((ExtendedServerData) cir.getReturnValue()).viaForge$setVersion(version);
((ExtendedServerData) cir.getReturnValue()).viaForge$setVersion(ProtocolVersion.getClosest(nbtCompound.getString("viaForge$version")));
}
}