mirror of
https://github.com/ViaVersion/ViaVersion.git
synced 2024-11-22 10:05:12 +01:00
Minecraft 1.12.2 Pre-release 1 Support
This commit is contained in:
parent
298835be42
commit
c7c61df0b8
@ -5,7 +5,7 @@
|
||||
<parent>
|
||||
<artifactId>viaversion-parent</artifactId>
|
||||
<groupId>us.myles</groupId>
|
||||
<version>1.2.1-SNAPSHOT</version>
|
||||
<version>1.2.1-1.12.2-PR1</version>
|
||||
</parent>
|
||||
<modelVersion>4.0.0</modelVersion>
|
||||
|
||||
|
@ -5,7 +5,7 @@
|
||||
<parent>
|
||||
<artifactId>viaversion-parent</artifactId>
|
||||
<groupId>us.myles</groupId>
|
||||
<version>1.2.1-SNAPSHOT</version>
|
||||
<version>1.2.1-1.12.2-PR1</version>
|
||||
</parent>
|
||||
<modelVersion>4.0.0</modelVersion>
|
||||
|
||||
@ -37,7 +37,7 @@
|
||||
<dependency>
|
||||
<groupId>us.myles</groupId>
|
||||
<artifactId>viaversion-common</artifactId>
|
||||
<version>1.2.1-SNAPSHOT</version>
|
||||
<version>1.2.1-1.12.2-PR1</version>
|
||||
</dependency>
|
||||
</dependencies>
|
||||
</project>
|
@ -5,7 +5,7 @@
|
||||
<parent>
|
||||
<artifactId>viaversion-parent</artifactId>
|
||||
<groupId>us.myles</groupId>
|
||||
<version>1.2.1-SNAPSHOT</version>
|
||||
<version>1.2.1-1.12.2-PR1</version>
|
||||
</parent>
|
||||
|
||||
<modelVersion>4.0.0</modelVersion>
|
||||
|
@ -9,6 +9,7 @@ import us.myles.ViaVersion.protocols.protocol1_10to1_9_3.Protocol1_10To1_9_3_4;
|
||||
import us.myles.ViaVersion.protocols.protocol1_11_1to1_11.Protocol1_11_1To1_11;
|
||||
import us.myles.ViaVersion.protocols.protocol1_11to1_10.Protocol1_11To1_10;
|
||||
import us.myles.ViaVersion.protocols.protocol1_12_1to1_12.Protocol1_12_1TO1_12;
|
||||
import us.myles.ViaVersion.protocols.protocol1_12_2to1_12_1.Protocol1_12_2TO1_12_1;
|
||||
import us.myles.ViaVersion.protocols.protocol1_12to1_11_1.Protocol1_12To1_11_1;
|
||||
import us.myles.ViaVersion.protocols.protocol1_9_1_2to1_9_3_4.Protocol1_9_1_2TO1_9_3_4;
|
||||
import us.myles.ViaVersion.protocols.protocol1_9_1to1_9.Protocol1_9_1TO1_9;
|
||||
@ -45,6 +46,7 @@ public class ProtocolRegistry {
|
||||
|
||||
registerProtocol(new Protocol1_12To1_11_1(), Collections.singletonList(ProtocolVersion.v1_12.getId()), ProtocolVersion.v1_11_1.getId());
|
||||
registerProtocol(new Protocol1_12_1TO1_12(), Collections.singletonList(ProtocolVersion.v1_12_1.getId()), ProtocolVersion.v1_12.getId());
|
||||
registerProtocol(new Protocol1_12_2TO1_12_1(), Collections.singletonList(ProtocolVersion.v1_12_2.getId()), ProtocolVersion.v1_12_1.getId());
|
||||
}
|
||||
|
||||
/**
|
||||
|
@ -31,6 +31,7 @@ public class ProtocolVersion {
|
||||
public static final ProtocolVersion v1_11_1;
|
||||
public static final ProtocolVersion v1_12;
|
||||
public static final ProtocolVersion v1_12_1;
|
||||
public static final ProtocolVersion v1_12_2;
|
||||
public static final ProtocolVersion unknown;
|
||||
|
||||
private final int id;
|
||||
@ -58,6 +59,7 @@ public class ProtocolVersion {
|
||||
register(v1_11_1 = new ProtocolVersion(316, "1.11.1"));
|
||||
register(v1_12 = new ProtocolVersion(335, "1.12"));
|
||||
register(v1_12_1 = new ProtocolVersion(338, "1.12.1"));
|
||||
register(v1_12_2 = new ProtocolVersion(339, "1.12.2-PR1"));
|
||||
register(unknown = new ProtocolVersion(-1, "UNKNOWN"));
|
||||
}
|
||||
|
||||
|
@ -0,0 +1,34 @@
|
||||
package us.myles.ViaVersion.protocols.protocol1_12_2to1_12_1;
|
||||
|
||||
import us.myles.ViaVersion.api.data.UserConnection;
|
||||
import us.myles.ViaVersion.api.protocol.Protocol;
|
||||
import us.myles.ViaVersion.api.remapper.PacketRemapper;
|
||||
import us.myles.ViaVersion.api.type.Type;
|
||||
import us.myles.ViaVersion.packets.State;
|
||||
|
||||
public class Protocol1_12_2TO1_12_1 extends Protocol {
|
||||
@Override
|
||||
protected void registerPackets() {
|
||||
// Outgoing
|
||||
// 0x1f - Keep alive
|
||||
registerOutgoing(State.PLAY, 0x1f, 0x1f, new PacketRemapper() {
|
||||
@Override
|
||||
public void registerMap() {
|
||||
map(Type.VAR_INT, Type.LONG);
|
||||
}
|
||||
}); // Keep alive
|
||||
// Incoming
|
||||
// 0xb - Keep alive
|
||||
registerIncoming(State.PLAY, 0xb, 0xb, new PacketRemapper() {
|
||||
@Override
|
||||
public void registerMap() {
|
||||
map(Type.LONG, Type.VAR_INT);
|
||||
}
|
||||
});
|
||||
}
|
||||
|
||||
@Override
|
||||
public void init(UserConnection userConnection) {
|
||||
|
||||
}
|
||||
}
|
@ -5,7 +5,7 @@
|
||||
<parent>
|
||||
<artifactId>viaversion-parent</artifactId>
|
||||
<groupId>us.myles</groupId>
|
||||
<version>1.2.1-SNAPSHOT</version>
|
||||
<version>1.2.1-1.12.2-PR1</version>
|
||||
</parent>
|
||||
<modelVersion>4.0.0</modelVersion>
|
||||
<name>viaversion-jar</name>
|
||||
|
2
pom.xml
2
pom.xml
@ -6,7 +6,7 @@
|
||||
|
||||
<groupId>us.myles</groupId>
|
||||
<artifactId>viaversion-parent</artifactId>
|
||||
<version>1.2.1-SNAPSHOT</version>
|
||||
<version>1.2.1-1.12.2-PR1</version>
|
||||
<packaging>pom</packaging>
|
||||
|
||||
<name>viaversion-parent</name>
|
||||
|
@ -5,7 +5,7 @@
|
||||
<parent>
|
||||
<artifactId>viaversion-parent</artifactId>
|
||||
<groupId>us.myles</groupId>
|
||||
<version>1.2.1-SNAPSHOT</version>
|
||||
<version>1.2.1-1.12.2-PR1</version>
|
||||
</parent>
|
||||
<modelVersion>4.0.0</modelVersion>
|
||||
|
||||
|
@ -5,7 +5,7 @@
|
||||
<parent>
|
||||
<artifactId>viaversion-parent</artifactId>
|
||||
<groupId>us.myles</groupId>
|
||||
<version>1.2.1-SNAPSHOT</version>
|
||||
<version>1.2.1-1.12.2-PR1</version>
|
||||
</parent>
|
||||
<modelVersion>4.0.0</modelVersion>
|
||||
|
||||
|
Loading…
Reference in New Issue
Block a user