From 120b12feebb69893a357c9eabadfe891518310a7 Mon Sep 17 00:00:00 2001 From: creeper123123321 Date: Thu, 17 May 2018 14:09:36 -0300 Subject: [PATCH 1/3] 18w20c --- bukkit/pom.xml | 2 +- bungee/pom.xml | 2 +- common/pom.xml | 2 +- .../java/us/myles/ViaVersion/api/protocol/ProtocolVersion.java | 2 +- jar/pom.xml | 2 +- pom.xml | 2 +- sponge-legacy/pom.xml | 2 +- sponge/pom.xml | 2 +- 8 files changed, 8 insertions(+), 8 deletions(-) diff --git a/bukkit/pom.xml b/bukkit/pom.xml index 5e9c89242..588e84c5d 100644 --- a/bukkit/pom.xml +++ b/bukkit/pom.xml @@ -5,7 +5,7 @@ viaversion-parent us.myles - 1.4.0-18w20b + 1.4.0-18w20c 4.0.0 diff --git a/bungee/pom.xml b/bungee/pom.xml index 697a444ee..181df2775 100644 --- a/bungee/pom.xml +++ b/bungee/pom.xml @@ -5,7 +5,7 @@ viaversion-parent us.myles - 1.4.0-18w20b + 1.4.0-18w20c 4.0.0 diff --git a/common/pom.xml b/common/pom.xml index da94e573d..1f2f75ab7 100644 --- a/common/pom.xml +++ b/common/pom.xml @@ -5,7 +5,7 @@ viaversion-parent us.myles - 1.4.0-18w20b + 1.4.0-18w20c 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..b230e7d44 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(377, "18w20c")); register(unknown = new ProtocolVersion(-1, "UNKNOWN")); } diff --git a/jar/pom.xml b/jar/pom.xml index 3c5ee393c..1d3dc6010 100644 --- a/jar/pom.xml +++ b/jar/pom.xml @@ -5,7 +5,7 @@ viaversion-parent us.myles - 1.4.0-18w20b + 1.4.0-18w20c 4.0.0 viaversion-jar diff --git a/pom.xml b/pom.xml index 0010ab504..0dcabe401 100644 --- a/pom.xml +++ b/pom.xml @@ -6,7 +6,7 @@ us.myles viaversion-parent - 1.4.0-18w20b + 1.4.0-18w20c pom viaversion-parent diff --git a/sponge-legacy/pom.xml b/sponge-legacy/pom.xml index db54e487f..770452ce4 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-18w20c 4.0.0 diff --git a/sponge/pom.xml b/sponge/pom.xml index 033f8b345..047b268c2 100644 --- a/sponge/pom.xml +++ b/sponge/pom.xml @@ -5,7 +5,7 @@ viaversion-parent us.myles - 1.4.0-18w20b + 1.4.0-18w20c 4.0.0 From 6a4f2f68300448410ad176a04718a658259d2fd8 Mon Sep 17 00:00:00 2001 From: creeper123123321 Date: Wed, 23 May 2018 15:28:22 -0300 Subject: [PATCH 2/3] 18w21a --- bukkit/pom.xml | 2 +- bungee/pom.xml | 2 +- common/pom.xml | 2 +- .../java/us/myles/ViaVersion/api/protocol/ProtocolVersion.java | 2 +- jar/pom.xml | 2 +- pom.xml | 2 +- sponge-legacy/pom.xml | 2 +- sponge/pom.xml | 2 +- 8 files changed, 8 insertions(+), 8 deletions(-) diff --git a/bukkit/pom.xml b/bukkit/pom.xml index 588e84c5d..9e4e973b1 100644 --- a/bukkit/pom.xml +++ b/bukkit/pom.xml @@ -5,7 +5,7 @@ viaversion-parent us.myles - 1.4.0-18w20c + 1.4.0-18w21a 4.0.0 diff --git a/bungee/pom.xml b/bungee/pom.xml index 181df2775..26d0e215a 100644 --- a/bungee/pom.xml +++ b/bungee/pom.xml @@ -5,7 +5,7 @@ viaversion-parent us.myles - 1.4.0-18w20c + 1.4.0-18w21a 4.0.0 diff --git a/common/pom.xml b/common/pom.xml index 1f2f75ab7..76ee0cd83 100644 --- a/common/pom.xml +++ b/common/pom.xml @@ -5,7 +5,7 @@ viaversion-parent us.myles - 1.4.0-18w20c + 1.4.0-18w21a 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 b230e7d44..fa8065620 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(377, "18w20c")); + register(v1_13 = new ProtocolVersion(378, "18w21a")); register(unknown = new ProtocolVersion(-1, "UNKNOWN")); } diff --git a/jar/pom.xml b/jar/pom.xml index 1d3dc6010..30d45ced0 100644 --- a/jar/pom.xml +++ b/jar/pom.xml @@ -5,7 +5,7 @@ viaversion-parent us.myles - 1.4.0-18w20c + 1.4.0-18w21a 4.0.0 viaversion-jar diff --git a/pom.xml b/pom.xml index 0dcabe401..c1be37665 100644 --- a/pom.xml +++ b/pom.xml @@ -6,7 +6,7 @@ us.myles viaversion-parent - 1.4.0-18w20c + 1.4.0-18w21a pom viaversion-parent diff --git a/sponge-legacy/pom.xml b/sponge-legacy/pom.xml index 770452ce4..e5517014e 100644 --- a/sponge-legacy/pom.xml +++ b/sponge-legacy/pom.xml @@ -5,7 +5,7 @@ viaversion-parent us.myles - 1.4.0-18w20c + 1.4.0-18w21a 4.0.0 diff --git a/sponge/pom.xml b/sponge/pom.xml index 047b268c2..ca4ae2423 100644 --- a/sponge/pom.xml +++ b/sponge/pom.xml @@ -5,7 +5,7 @@ viaversion-parent us.myles - 1.4.0-18w20c + 1.4.0-18w21a 4.0.0 From 9d39bb2d621561792f61f3de3ae5e8bd51cc9b58 Mon Sep 17 00:00:00 2001 From: creeper123123321 Date: Sat, 26 May 2018 08:52:31 -0300 Subject: [PATCH 3/3] 18w21b --- bukkit/pom.xml | 2 +- bungee/pom.xml | 2 +- common/pom.xml | 2 +- .../api/protocol/ProtocolVersion.java | 2 +- .../ProtocolSnapshotTo1_12_2.java | 34 +++++-------------- jar/pom.xml | 2 +- pom.xml | 2 +- sponge-legacy/pom.xml | 2 +- sponge/pom.xml | 2 +- 9 files changed, 16 insertions(+), 34 deletions(-) diff --git a/bukkit/pom.xml b/bukkit/pom.xml index 9e4e973b1..e7a1e0f2a 100644 --- a/bukkit/pom.xml +++ b/bukkit/pom.xml @@ -5,7 +5,7 @@ viaversion-parent us.myles - 1.4.0-18w21a + 1.4.0-18w21b 4.0.0 diff --git a/bungee/pom.xml b/bungee/pom.xml index 26d0e215a..676cab882 100644 --- a/bungee/pom.xml +++ b/bungee/pom.xml @@ -5,7 +5,7 @@ viaversion-parent us.myles - 1.4.0-18w21a + 1.4.0-18w21b 4.0.0 diff --git a/common/pom.xml b/common/pom.xml index 76ee0cd83..a65dea64e 100644 --- a/common/pom.xml +++ b/common/pom.xml @@ -5,7 +5,7 @@ viaversion-parent us.myles - 1.4.0-18w21a + 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 fa8065620..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(378, "18w21a")); + 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 30d45ced0..b2cb12528 100644 --- a/jar/pom.xml +++ b/jar/pom.xml @@ -5,7 +5,7 @@ viaversion-parent us.myles - 1.4.0-18w21a + 1.4.0-18w21b 4.0.0 viaversion-jar diff --git a/pom.xml b/pom.xml index c1be37665..62ae6f3df 100644 --- a/pom.xml +++ b/pom.xml @@ -6,7 +6,7 @@ us.myles viaversion-parent - 1.4.0-18w21a + 1.4.0-18w21b pom viaversion-parent diff --git a/sponge-legacy/pom.xml b/sponge-legacy/pom.xml index e5517014e..e5c246cf6 100644 --- a/sponge-legacy/pom.xml +++ b/sponge-legacy/pom.xml @@ -5,7 +5,7 @@ viaversion-parent us.myles - 1.4.0-18w21a + 1.4.0-18w21b 4.0.0 diff --git a/sponge/pom.xml b/sponge/pom.xml index ca4ae2423..1e01f9d64 100644 --- a/sponge/pom.xml +++ b/sponge/pom.xml @@ -5,7 +5,7 @@ viaversion-parent us.myles - 1.4.0-18w21a + 1.4.0-18w21b 4.0.0