mirror of
https://github.com/ViaVersion/ViaFabricPlus.git
synced 2024-12-22 16:48:25 +01:00
Updated outdated ProtocolVersion renames
This commit is contained in:
parent
26dc4e49b1
commit
2b6bc8a7fc
@ -47,14 +47,13 @@ public abstract class MixinProtocolVersion {
|
||||
private static void initMaps(CallbackInfo ci) {
|
||||
viaFabricPlus$skips = ImmutableSet.of("1.4.6/7", "1.5.1", "1.5.2", "1.6.1", "1.6.2", "1.6.3", "1.6.4");
|
||||
viaFabricPlus$remaps = new HashMap<>();
|
||||
viaFabricPlus$remaps.put("1.7-1.7.5", new Pair<>("1.7.2-1.7.5", new VersionRange("1.7", 2, 5)));
|
||||
viaFabricPlus$remaps.put("1.9.3/4", new Pair<>("1.9.3-1.9.4", null));
|
||||
viaFabricPlus$remaps.put("1.11.1/2", new Pair<>("1.11.1-1.11.2", null));
|
||||
viaFabricPlus$remaps.put("1.16.4/5", new Pair<>("1.16.4-1.16.5", null));
|
||||
viaFabricPlus$remaps.put("1.18/1.18.1", new Pair<>("1.18-1.18.1", null));
|
||||
viaFabricPlus$remaps.put("1.19.1/2", new Pair<>("1.19.1-1.19.2", null));
|
||||
viaFabricPlus$remaps.put("1.20/1.20.1", new Pair<>("1.20-1.20.1", null));
|
||||
viaFabricPlus$remaps.put("1.20.3", new Pair<>("1.20.3-1.20.4", null));
|
||||
viaFabricPlus$remaps.put("1.20.3", new Pair<>("1.20.3-1.20.4", new VersionRange("1.20", 3, 4)));
|
||||
}
|
||||
|
||||
@Redirect(method = "<clinit>", at = @At(value = "INVOKE", target = "Lcom/viaversion/viaversion/api/protocol/version/ProtocolVersion;register(ILjava/lang/String;)Lcom/viaversion/viaversion/api/protocol/version/ProtocolVersion;"))
|
||||
@ -63,6 +62,9 @@ public abstract class MixinProtocolVersion {
|
||||
final Pair<String, VersionRange> remapEntry = viaFabricPlus$remaps.get(name);
|
||||
if (remapEntry != null) {
|
||||
if (remapEntry.key() != null) name = remapEntry.key();
|
||||
if (remapEntry.value() != null) {
|
||||
return ProtocolVersion.register(version, name, remapEntry.value());
|
||||
}
|
||||
}
|
||||
|
||||
return ProtocolVersion.register(version, name);
|
||||
@ -75,6 +77,9 @@ public abstract class MixinProtocolVersion {
|
||||
final Pair<String, VersionRange> remapEntry = viaFabricPlus$remaps.get(name);
|
||||
if (remapEntry != null) {
|
||||
if (remapEntry.key() != null) name = remapEntry.key();
|
||||
if (remapEntry.value() != null) {
|
||||
return ProtocolVersion.register(version, snapshotVersion, name, remapEntry.value());
|
||||
}
|
||||
}
|
||||
|
||||
return ProtocolVersion.register(version, snapshotVersion, name);
|
||||
|
Loading…
Reference in New Issue
Block a user