diff --git a/bukkit/pom.xml b/bukkit/pom.xml index 5e9c89242..e7a1e0f2a 100644 --- a/bukkit/pom.xml +++ b/bukkit/pom.xml @@ -5,7 +5,7 @@ viaversion-parent us.myles - 1.4.0-18w20b + 1.4.0-18w21b 4.0.0 diff --git a/bungee/pom.xml b/bungee/pom.xml index 697a444ee..676cab882 100644 --- a/bungee/pom.xml +++ b/bungee/pom.xml @@ -5,7 +5,7 @@ viaversion-parent us.myles - 1.4.0-18w20b + 1.4.0-18w21b 4.0.0 diff --git a/common/pom.xml b/common/pom.xml index da94e573d..a65dea64e 100644 --- a/common/pom.xml +++ b/common/pom.xml @@ -5,7 +5,7 @@ viaversion-parent us.myles - 1.4.0-18w20b + 1.4.0-18w21b 4.0.0 diff --git a/common/src/main/java/us/myles/ViaVersion/api/protocol/ProtocolVersion.java b/common/src/main/java/us/myles/ViaVersion/api/protocol/ProtocolVersion.java index 81b10ca1d..d91f70e37 100644 --- a/common/src/main/java/us/myles/ViaVersion/api/protocol/ProtocolVersion.java +++ b/common/src/main/java/us/myles/ViaVersion/api/protocol/ProtocolVersion.java @@ -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")); } diff --git a/common/src/main/java/us/myles/ViaVersion/protocols/protocolsnapshotto1_12_2/ProtocolSnapshotTo1_12_2.java b/common/src/main/java/us/myles/ViaVersion/protocols/protocolsnapshotto1_12_2/ProtocolSnapshotTo1_12_2.java index d126b0766..16640010a 100644 --- a/common/src/main/java/us/myles/ViaVersion/protocols/protocolsnapshotto1_12_2/ProtocolSnapshotTo1_12_2.java +++ b/common/src/main/java/us/myles/ViaVersion/protocols/protocolsnapshotto1_12_2/ProtocolSnapshotTo1_12_2.java @@ -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); diff --git a/jar/pom.xml b/jar/pom.xml index 3c5ee393c..b2cb12528 100644 --- a/jar/pom.xml +++ b/jar/pom.xml @@ -5,7 +5,7 @@ viaversion-parent us.myles - 1.4.0-18w20b + 1.4.0-18w21b 4.0.0 viaversion-jar diff --git a/pom.xml b/pom.xml index 0010ab504..62ae6f3df 100644 --- a/pom.xml +++ b/pom.xml @@ -6,7 +6,7 @@ us.myles viaversion-parent - 1.4.0-18w20b + 1.4.0-18w21b pom viaversion-parent diff --git a/sponge-legacy/pom.xml b/sponge-legacy/pom.xml index db54e487f..e5c246cf6 100644 --- a/sponge-legacy/pom.xml +++ b/sponge-legacy/pom.xml @@ -5,7 +5,7 @@ viaversion-parent us.myles - 1.4.0-18w20b + 1.4.0-18w21b 4.0.0 diff --git a/sponge/pom.xml b/sponge/pom.xml index 033f8b345..1e01f9d64 100644 --- a/sponge/pom.xml +++ b/sponge/pom.xml @@ -5,7 +5,7 @@ viaversion-parent us.myles - 1.4.0-18w20b + 1.4.0-18w21b 4.0.0