Mirror von
https://github.com/ViaVersion/ViaVersion.git
synchronisiert 2024-12-27 00:22:51 +01:00
Rename ProtocolVersion#v1_7_1 to v1_7_2 (#3696)
Dieser Commit ist enthalten in:
Ursprung
dccda57fc0
Commit
35ceee1a47
@ -42,7 +42,8 @@ public class ProtocolVersion implements Comparable<ProtocolVersion> {
|
||||
private static final Map<VersionType, Int2ObjectMap<ProtocolVersion>> VERSIONS = new EnumMap<>(VersionType.class);
|
||||
private static final List<ProtocolVersion> VERSION_LIST = new ArrayList<>();
|
||||
|
||||
public static final ProtocolVersion v1_7_1 = register(4, "1.7.2-1.7.5", new SubVersionRange("1.7", 2, 5));
|
||||
public static final ProtocolVersion v1_7_2 = register(4, "1.7.2-1.7.5", new SubVersionRange("1.7", 2, 5));
|
||||
@Deprecated/*(forRemoval=true)*/ public static final ProtocolVersion v1_7_1 = v1_7_2;
|
||||
public static final ProtocolVersion v1_7_6 = register(5, "1.7.6-1.7.10", new SubVersionRange("1.7", 6, 10));
|
||||
public static final ProtocolVersion v1_8 = register(47, "1.8.x", new SubVersionRange("1.8", 0, 9));
|
||||
public static final ProtocolVersion v1_9 = register(107, "1.9");
|
||||
|
@ -136,7 +136,7 @@ public class ProtocolManagerImpl implements ProtocolManager {
|
||||
// Base Protocol
|
||||
BASE_PROTOCOL.initialize();
|
||||
BASE_PROTOCOL.register(Via.getManager().getProviders());
|
||||
registerBaseProtocol(new BaseProtocol1_7(), Range.closedOpen(ProtocolVersion.v1_7_1, ProtocolVersion.v1_16));
|
||||
registerBaseProtocol(new BaseProtocol1_7(), Range.closedOpen(ProtocolVersion.v1_7_2, ProtocolVersion.v1_16));
|
||||
registerBaseProtocol(new BaseProtocol1_16(), Range.atLeast(ProtocolVersion.v1_16));
|
||||
|
||||
registerProtocol(new Protocol1_9To1_8(), ProtocolVersion.v1_9, ProtocolVersion.v1_8);
|
||||
|
@ -37,8 +37,8 @@ public class ProtocolVersionTest {
|
||||
Assertions.assertEquals(ProtocolVersion.v1_20, ProtocolVersion.getClosest("1.20"));
|
||||
Assertions.assertEquals(ProtocolVersion.v1_20, ProtocolVersion.getClosest("1.20.0"));
|
||||
Assertions.assertEquals(ProtocolVersion.v1_20, ProtocolVersion.getClosest("1.20.1"));
|
||||
Assertions.assertEquals(ProtocolVersion.v1_7_1, ProtocolVersion.getClosest("1.7.2"));
|
||||
Assertions.assertEquals(ProtocolVersion.v1_7_1, ProtocolVersion.getClosest("1.7.5"));
|
||||
Assertions.assertEquals(ProtocolVersion.v1_7_2, ProtocolVersion.getClosest("1.7.2"));
|
||||
Assertions.assertEquals(ProtocolVersion.v1_7_2, ProtocolVersion.getClosest("1.7.5"));
|
||||
}
|
||||
|
||||
@Test
|
||||
@ -49,10 +49,10 @@ public class ProtocolVersionTest {
|
||||
@Test
|
||||
void testProtocolVersionRange() {
|
||||
Assertions.assertTrue(ProtocolVersionRange.of(Range.atLeast(ProtocolVersion.v1_8)).contains(ProtocolVersion.v1_10));
|
||||
Assertions.assertFalse(ProtocolVersionRange.of(Range.atLeast(ProtocolVersion.v1_8)).contains(ProtocolVersion.v1_7_1));
|
||||
Assertions.assertFalse(ProtocolVersionRange.of(Range.atLeast(ProtocolVersion.v1_8)).contains(ProtocolVersion.v1_7_2));
|
||||
Assertions.assertTrue(ProtocolVersionRange.of(ProtocolVersion.v1_8, ProtocolVersion.v1_10).contains(ProtocolVersion.v1_9));
|
||||
|
||||
final ProtocolVersionRange complexRange = ProtocolVersionRange.of(Range.atLeast(ProtocolVersion.v1_11)).add(Range.singleton(ProtocolVersion.v1_8)).add(Range.lessThan(ProtocolVersion.v1_7_1));
|
||||
final ProtocolVersionRange complexRange = ProtocolVersionRange.of(Range.atLeast(ProtocolVersion.v1_11)).add(Range.singleton(ProtocolVersion.v1_8)).add(Range.lessThan(ProtocolVersion.v1_7_2));
|
||||
Assertions.assertEquals(complexRange.toString(), ProtocolVersionRange.fromString(complexRange.toString()).toString());
|
||||
}
|
||||
}
|
||||
|
Laden…
In neuem Issue referenzieren
Einen Benutzer sperren