mirror of
https://github.com/ViaVersion/ViaVersion.git
synced 2024-11-23 10:35:12 +01:00
commit
8c02947c05
@ -5,7 +5,7 @@
|
||||
<parent>
|
||||
<artifactId>viaversion-parent</artifactId>
|
||||
<groupId>us.myles</groupId>
|
||||
<version>1.4.0-18w20b</version>
|
||||
<version>1.4.0-18w21b</version>
|
||||
</parent>
|
||||
<modelVersion>4.0.0</modelVersion>
|
||||
|
||||
|
@ -5,7 +5,7 @@
|
||||
<parent>
|
||||
<artifactId>viaversion-parent</artifactId>
|
||||
<groupId>us.myles</groupId>
|
||||
<version>1.4.0-18w20b</version>
|
||||
<version>1.4.0-18w21b</version>
|
||||
</parent>
|
||||
<modelVersion>4.0.0</modelVersion>
|
||||
|
||||
|
@ -5,7 +5,7 @@
|
||||
<parent>
|
||||
<artifactId>viaversion-parent</artifactId>
|
||||
<groupId>us.myles</groupId>
|
||||
<version>1.4.0-18w20b</version>
|
||||
<version>1.4.0-18w21b</version>
|
||||
</parent>
|
||||
|
||||
<modelVersion>4.0.0</modelVersion>
|
||||
|
@ -62,7 +62,7 @@ public class ProtocolVersion {
|
||||
register(v1_12 = new ProtocolVersion(335, "1.12"));
|
||||
register(v1_12_1 = new ProtocolVersion(338, "1.12.1"));
|
||||
register(v1_12_2 = new ProtocolVersion(340, "1.12.2"));
|
||||
register(v1_13 = new ProtocolVersion(376, "18w20b"));
|
||||
register(v1_13 = new ProtocolVersion(379, "18w21b"));
|
||||
register(unknown = new ProtocolVersion(-1, "UNKNOWN"));
|
||||
}
|
||||
|
||||
|
@ -166,18 +166,6 @@ public class ProtocolSnapshotTo1_12_2 extends Protocol {
|
||||
wrapper.write(Type.VAR_INT, 0); // Root node index
|
||||
}
|
||||
}).send(ProtocolSnapshotTo1_12_2.class);
|
||||
|
||||
// Send tags packet twice to not crash client
|
||||
PacketWrapper tagsPacket = wrapper.create(0x54, new ValueCreator() {
|
||||
@Override
|
||||
public void write(PacketWrapper wrapper) throws Exception {
|
||||
wrapper.write(Type.VAR_INT, 0);
|
||||
wrapper.write(Type.VAR_INT, 0);
|
||||
wrapper.write(Type.VAR_INT, 0);
|
||||
}
|
||||
});
|
||||
tagsPacket.send(ProtocolSnapshotTo1_12_2.class);
|
||||
tagsPacket.send(ProtocolSnapshotTo1_12_2.class);
|
||||
}
|
||||
});
|
||||
}
|
||||
@ -187,9 +175,9 @@ public class ProtocolSnapshotTo1_12_2 extends Protocol {
|
||||
registerOutgoing(State.PLAY, 0x24, 0x25, new PacketRemapper() {
|
||||
@Override
|
||||
public void registerMap() {
|
||||
map(Type.VAR_INT); // Map id
|
||||
map(Type.BYTE); // Scale
|
||||
map(Type.BOOLEAN); // Tracking Position
|
||||
map(Type.VAR_INT); // 0 - Map id
|
||||
map(Type.BYTE); // 1 - Scale
|
||||
map(Type.BOOLEAN); // 2 - Tracking Position
|
||||
handler(new PacketHandler() {
|
||||
@Override
|
||||
public void handle(PacketWrapper wrapper) throws Exception {
|
||||
@ -204,13 +192,6 @@ public class ProtocolSnapshotTo1_12_2 extends Protocol {
|
||||
wrapper.write(Type.BYTE, direction);
|
||||
wrapper.write(Type.OPTIONAL_CHAT, null); // Display Name
|
||||
}
|
||||
int columns = wrapper.passthrough(Type.BYTE);
|
||||
if (columns > 0) {
|
||||
wrapper.passthrough(Type.BYTE); // rows
|
||||
wrapper.passthrough(Type.BYTE); // x
|
||||
wrapper.passthrough(Type.BYTE); // z
|
||||
wrapper.passthrough(Type.BYTE_ARRAY); // data
|
||||
}
|
||||
}
|
||||
});
|
||||
}
|
||||
@ -288,14 +269,15 @@ public class ProtocolSnapshotTo1_12_2 extends Protocol {
|
||||
registerOutgoing(State.PLAY, 0x42, 0x44, new PacketRemapper() {
|
||||
@Override
|
||||
public void registerMap() {
|
||||
map(Type.STRING);
|
||||
map(Type.BYTE);
|
||||
map(Type.STRING); // 0 - Objective name
|
||||
map(Type.BYTE); // 1 - Mode
|
||||
handler(new PacketHandler() {
|
||||
@Override
|
||||
public void handle(PacketWrapper wrapper) throws Exception {
|
||||
byte mode = wrapper.get(Type.BYTE, 0);
|
||||
// On create or update
|
||||
if (wrapper.get(Type.BYTE, 0) == 0 || wrapper.get(Type.BYTE, 0) == 2) {
|
||||
wrapper.passthrough(Type.STRING);
|
||||
if (mode == 0 || mode == 2) {
|
||||
wrapper.passthrough(Type.STRING); // Value
|
||||
String type = wrapper.read(Type.STRING);
|
||||
// integer or hearts
|
||||
wrapper.write(Type.VAR_INT, type.equals("integer") ? 0 : 1);
|
||||
|
@ -5,7 +5,7 @@
|
||||
<parent>
|
||||
<artifactId>viaversion-parent</artifactId>
|
||||
<groupId>us.myles</groupId>
|
||||
<version>1.4.0-18w20b</version>
|
||||
<version>1.4.0-18w21b</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.4.0-18w20b</version>
|
||||
<version>1.4.0-18w21b</version>
|
||||
<packaging>pom</packaging>
|
||||
|
||||
<name>viaversion-parent</name>
|
||||
|
@ -5,7 +5,7 @@
|
||||
<parent>
|
||||
<artifactId>viaversion-parent</artifactId>
|
||||
<groupId>us.myles</groupId>
|
||||
<version>1.4.0-18w20b</version>
|
||||
<version>1.4.0-18w21b</version>
|
||||
</parent>
|
||||
<modelVersion>4.0.0</modelVersion>
|
||||
|
||||
|
@ -5,7 +5,7 @@
|
||||
<parent>
|
||||
<artifactId>viaversion-parent</artifactId>
|
||||
<groupId>us.myles</groupId>
|
||||
<version>1.4.0-18w20b</version>
|
||||
<version>1.4.0-18w21b</version>
|
||||
</parent>
|
||||
<modelVersion>4.0.0</modelVersion>
|
||||
|
||||
|
Loading…
Reference in New Issue
Block a user