mirror of
https://github.com/ViaVersion/ViaForge.git
synced 2024-11-25 12:35:30 +01:00
Removed not working temp migration code
This commit is contained in:
parent
53d81b4bdb
commit
8657507cca
@ -46,13 +46,7 @@ public class MixinServerData implements ExtendedServerData {
|
|||||||
@Inject(method = "getServerDataFromNBTCompound", at = @At(value = "TAIL"))
|
@Inject(method = "getServerDataFromNBTCompound", at = @At(value = "TAIL"))
|
||||||
private static void getVersion(NBTTagCompound nbtCompound, CallbackInfoReturnable<ServerData> cir) {
|
private static void getVersion(NBTTagCompound nbtCompound, CallbackInfoReturnable<ServerData> cir) {
|
||||||
if (nbtCompound.hasKey("viaForge$version")) {
|
if (nbtCompound.hasKey("viaForge$version")) {
|
||||||
ProtocolVersion version;
|
((ExtendedServerData) cir.getReturnValue()).viaForge$setVersion(ProtocolVersion.getClosest(nbtCompound.getString("viaForge$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);
|
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
@ -46,13 +46,7 @@ public class MixinServerData implements ExtendedServerData {
|
|||||||
@Inject(method = "read", at = @At(value = "TAIL"))
|
@Inject(method = "read", at = @At(value = "TAIL"))
|
||||||
private static void getVersion(CompoundNBT compoundnbt, CallbackInfoReturnable<ServerData> cir) {
|
private static void getVersion(CompoundNBT compoundnbt, CallbackInfoReturnable<ServerData> cir) {
|
||||||
if (compoundnbt.contains("viaForge$version")) {
|
if (compoundnbt.contains("viaForge$version")) {
|
||||||
ProtocolVersion version;
|
((ExtendedServerData) cir.getReturnValue()).viaForge$setVersion(ProtocolVersion.getClosest(compoundnbt.getString("viaForge$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);
|
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
@ -46,13 +46,7 @@ public class MixinServerData implements ExtendedServerData {
|
|||||||
@Inject(method = "read", at = @At(value = "TAIL"))
|
@Inject(method = "read", at = @At(value = "TAIL"))
|
||||||
private static void getVersion(CompoundTag compoundnbt, CallbackInfoReturnable<ServerData> cir) {
|
private static void getVersion(CompoundTag compoundnbt, CallbackInfoReturnable<ServerData> cir) {
|
||||||
if (compoundnbt.contains("viaForge$version")) {
|
if (compoundnbt.contains("viaForge$version")) {
|
||||||
ProtocolVersion version;
|
((ExtendedServerData) cir.getReturnValue()).viaForge$setVersion(ProtocolVersion.getClosest(compoundnbt.getString("viaForge$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);
|
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
@ -46,13 +46,7 @@ public class MixinServerData implements ExtendedServerData {
|
|||||||
@Inject(method = "read", at = @At(value = "TAIL"))
|
@Inject(method = "read", at = @At(value = "TAIL"))
|
||||||
private static void getVersion(CompoundTag compoundnbt, CallbackInfoReturnable<ServerData> cir) {
|
private static void getVersion(CompoundTag compoundnbt, CallbackInfoReturnable<ServerData> cir) {
|
||||||
if (compoundnbt.contains("viaForge$version")) {
|
if (compoundnbt.contains("viaForge$version")) {
|
||||||
ProtocolVersion version;
|
((ExtendedServerData) cir.getReturnValue()).viaForge$setVersion(ProtocolVersion.getClosest(compoundnbt.getString("viaForge$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);
|
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
@ -46,13 +46,7 @@ public class MixinServerData implements ExtendedServerData {
|
|||||||
@Inject(method = "read", at = @At(value = "TAIL"))
|
@Inject(method = "read", at = @At(value = "TAIL"))
|
||||||
private static void getVersion(CompoundTag compoundnbt, CallbackInfoReturnable<ServerData> cir) {
|
private static void getVersion(CompoundTag compoundnbt, CallbackInfoReturnable<ServerData> cir) {
|
||||||
if (compoundnbt.contains("viaForge$version")) {
|
if (compoundnbt.contains("viaForge$version")) {
|
||||||
ProtocolVersion version;
|
((ExtendedServerData) cir.getReturnValue()).viaForge$setVersion(ProtocolVersion.getClosest(compoundnbt.getString("viaForge$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);
|
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
@ -46,13 +46,7 @@ public class MixinServerData implements ExtendedServerData {
|
|||||||
@Inject(method = "read", at = @At(value = "TAIL"))
|
@Inject(method = "read", at = @At(value = "TAIL"))
|
||||||
private static void getVersion(CompoundTag compoundnbt, CallbackInfoReturnable<ServerData> cir) {
|
private static void getVersion(CompoundTag compoundnbt, CallbackInfoReturnable<ServerData> cir) {
|
||||||
if (compoundnbt.contains("viaForge$version")) {
|
if (compoundnbt.contains("viaForge$version")) {
|
||||||
ProtocolVersion version;
|
((ExtendedServerData) cir.getReturnValue()).viaForge$setVersion(ProtocolVersion.getClosest(compoundnbt.getString("viaForge$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);
|
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
Loading…
Reference in New Issue
Block a user