Removed not working temp migration code

This commit is contained in:
FlorianMichael 2024-03-11 13:19:10 +01:00
parent 53d81b4bdb
commit 8657507cca
No known key found for this signature in database
GPG Key ID: C2FB87E71C425126
6 changed files with 6 additions and 42 deletions

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")));
}
}

View File

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

View File

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

View File

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

View File

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

View File

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