From 8231b3aebe0586e6c3d7ad889a6069cf12e759f4 Mon Sep 17 00:00:00 2001 From: Gerrygames Date: Fri, 5 Apr 2019 18:48:38 +0200 Subject: [PATCH] 19w14b --- bukkit/pom.xml | 2 +- bungee/pom.xml | 2 +- common/pom.xml | 2 +- .../api/protocol/ProtocolVersion.java | 2 +- .../Protocol1_14To1_13_2.java | 98 +++++++++++-------- .../packets/EntityPackets.java | 11 +-- .../packets/InventoryPackets.java | 18 ++-- .../packets/PlayerPackets.java | 2 +- .../packets/WorldPackets.java | 19 ++-- jar/pom.xml | 2 +- pom.xml | 2 +- sponge-legacy/pom.xml | 2 +- sponge/pom.xml | 2 +- velocity/pom.xml | 2 +- 14 files changed, 90 insertions(+), 76 deletions(-) diff --git a/bukkit/pom.xml b/bukkit/pom.xml index e3d34ec7b..52ec0e6b7 100644 --- a/bukkit/pom.xml +++ b/bukkit/pom.xml @@ -5,7 +5,7 @@ viaversion-parent us.myles - 2.0.0-19w14a + 2.0.0-19w14b 4.0.0 diff --git a/bungee/pom.xml b/bungee/pom.xml index 99e967f23..e9e8152b6 100644 --- a/bungee/pom.xml +++ b/bungee/pom.xml @@ -5,7 +5,7 @@ viaversion-parent us.myles - 2.0.0-19w14a + 2.0.0-19w14b 4.0.0 diff --git a/common/pom.xml b/common/pom.xml index dbefc7ff5..966a9e84b 100644 --- a/common/pom.xml +++ b/common/pom.xml @@ -5,7 +5,7 @@ viaversion-parent us.myles - 2.0.0-19w14a + 2.0.0-19w14b 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 ebf2a4c2c..5afd058d2 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 @@ -67,7 +67,7 @@ public class ProtocolVersion { register(v1_13 = new ProtocolVersion(393, "1.13")); register(v1_13_1 = new ProtocolVersion(401, "1.13.1")); register(v1_13_2 = new ProtocolVersion(404, "1.13.2")); - register(v1_14 = new ProtocolVersion(470, "1.14")); + register(v1_14 = new ProtocolVersion(471, "1.14")); register(unknown = new ProtocolVersion(-1, "UNKNOWN")); } diff --git a/common/src/main/java/us/myles/ViaVersion/protocols/protocol1_14to1_13_2/Protocol1_14To1_13_2.java b/common/src/main/java/us/myles/ViaVersion/protocols/protocol1_14to1_13_2/Protocol1_14To1_13_2.java index 80047c8b7..a1f961d4e 100644 --- a/common/src/main/java/us/myles/ViaVersion/protocols/protocol1_14to1_13_2/Protocol1_14To1_13_2.java +++ b/common/src/main/java/us/myles/ViaVersion/protocols/protocol1_14to1_13_2/Protocol1_14To1_13_2.java @@ -29,13 +29,30 @@ public class Protocol1_14To1_13_2 extends Protocol { WorldPackets.register(this); PlayerPackets.register(this); - registerOutgoing(State.PLAY, 0x2D, 0x2E); - registerOutgoing(State.PLAY, 0x2E, 0x2F); - registerOutgoing(State.PLAY, 0x2F, 0x30); - registerOutgoing(State.PLAY, 0x30, 0x31); - registerOutgoing(State.PLAY, 0x31, 0x32); + registerOutgoing(State.PLAY, 0x16, 0x15); + + registerOutgoing(State.PLAY, 0x18, 0x17); + + registerOutgoing(State.PLAY, 0x1A, 0x19); + registerOutgoing(State.PLAY, 0x1B, 0x1A); + registerOutgoing(State.PLAY, 0x1C, 0x1B); + registerOutgoing(State.PLAY, 0x1D, 0x54); + registerOutgoing(State.PLAY, 0x1E, 0x1C); + registerOutgoing(State.PLAY, 0x1F, 0x1D); + registerOutgoing(State.PLAY, 0x20, 0x1E); + registerOutgoing(State.PLAY, 0x21, 0x20); + + registerOutgoing(State.PLAY, 0x27, 0x2B); + + registerOutgoing(State.PLAY, 0x2B, 0x2C); + + registerOutgoing(State.PLAY, 0x2D, 0x30); + registerOutgoing(State.PLAY, 0x2E, 0x31); + registerOutgoing(State.PLAY, 0x2F, 0x32); + registerOutgoing(State.PLAY, 0x30, 0x33); + registerOutgoing(State.PLAY, 0x31, 0x34); // Position and look - registerOutgoing(State.PLAY, 0x32, 0x33, new PacketRemapper() { + registerOutgoing(State.PLAY, 0x32, 0x35, new PacketRemapper() { @Override public void registerMap() { handler(new PacketHandler() { @@ -48,35 +65,34 @@ public class Protocol1_14To1_13_2 extends Protocol { } }); - //TODO remove if packet ids stay unchanged in 1.14 release - registerOutgoing(State.PLAY, 0x34, 0x34); + registerOutgoing(State.PLAY, 0x34, 0x36); - registerOutgoing(State.PLAY, 0x36, 0x36); - registerOutgoing(State.PLAY, 0x37, 0x37); + registerOutgoing(State.PLAY, 0x36, 0x38); + registerOutgoing(State.PLAY, 0x37, 0x39); - registerOutgoing(State.PLAY, 0x39, 0x39); - registerOutgoing(State.PLAY, 0x3A, 0x3A); - registerOutgoing(State.PLAY, 0x3B, 0x3B); - registerOutgoing(State.PLAY, 0x3C, 0x3C); - registerOutgoing(State.PLAY, 0x3D, 0x3D); - registerOutgoing(State.PLAY, 0x3E, 0x3E); + registerOutgoing(State.PLAY, 0x39, 0x3B); + registerOutgoing(State.PLAY, 0x3A, 0x3C); + registerOutgoing(State.PLAY, 0x3B, 0x3D); + registerOutgoing(State.PLAY, 0x3C, 0x3E); + registerOutgoing(State.PLAY, 0x3D, 0x3F); + registerOutgoing(State.PLAY, 0x3E, 0x42); - registerOutgoing(State.PLAY, 0x40, 0x40); - registerOutgoing(State.PLAY, 0x41, 0x41); + registerOutgoing(State.PLAY, 0x40, 0x44); + registerOutgoing(State.PLAY, 0x41, 0x45); - registerOutgoing(State.PLAY, 0x43, 0x43); - registerOutgoing(State.PLAY, 0x44, 0x44); - registerOutgoing(State.PLAY, 0x45, 0x45); - registerOutgoing(State.PLAY, 0x46, 0x46); - registerOutgoing(State.PLAY, 0x47, 0x47); - registerOutgoing(State.PLAY, 0x48, 0x48); + registerOutgoing(State.PLAY, 0x43, 0x47); + registerOutgoing(State.PLAY, 0x44, 0x48); + registerOutgoing(State.PLAY, 0x45, 0x49); + registerOutgoing(State.PLAY, 0x46, 0x4A); + registerOutgoing(State.PLAY, 0x47, 0x4B); + registerOutgoing(State.PLAY, 0x48, 0x4C); - registerOutgoing(State.PLAY, 0x4A, 0x4A); - registerOutgoing(State.PLAY, 0x4B, 0x4B); - registerOutgoing(State.PLAY, 0x4C, 0x4C); + registerOutgoing(State.PLAY, 0x4A, 0x4E); + registerOutgoing(State.PLAY, 0x4B, 0x4F); + registerOutgoing(State.PLAY, 0x4C, 0x52); // Sound Effect - registerOutgoing(State.PLAY, 0x4D, 0x4D, new PacketRemapper() { + registerOutgoing(State.PLAY, 0x4D, 0x51, new PacketRemapper() { @Override public void registerMap() { map(Type.VAR_INT); // Sound Id @@ -88,11 +104,11 @@ public class Protocol1_14To1_13_2 extends Protocol { }); } }); - registerOutgoing(State.PLAY, 0x4E, 0x4F); - registerOutgoing(State.PLAY, 0x4F, 0x50); - registerOutgoing(State.PLAY, 0x50, 0x51); + registerOutgoing(State.PLAY, 0x4E, 0x53); + registerOutgoing(State.PLAY, 0x4F, 0x55); + registerOutgoing(State.PLAY, 0x50, 0x56); - registerOutgoing(State.PLAY, 0x51, 0x52, new PacketRemapper() { + registerOutgoing(State.PLAY, 0x51, 0x57, new PacketRemapper() { @Override public void registerMap() { handler(new PacketHandler() { @@ -133,10 +149,10 @@ public class Protocol1_14To1_13_2 extends Protocol { } }); - registerOutgoing(State.PLAY, 0x52, 0x53); - registerOutgoing(State.PLAY, 0x53, 0x54); + registerOutgoing(State.PLAY, 0x52, 0x58); + registerOutgoing(State.PLAY, 0x53, 0x59); - registerOutgoing(State.PLAY, 0x55, 0x56, new PacketRemapper() { + registerOutgoing(State.PLAY, 0x55, 0x5B, new PacketRemapper() { @Override public void registerMap() { handler(new PacketHandler() { @@ -202,12 +218,12 @@ public class Protocol1_14To1_13_2 extends Protocol { registerIncoming(State.PLAY, 0x0C, 0x0D); registerIncoming(State.PLAY, 0x0D, 0x0E); - registerIncoming(State.PLAY, -1, 0x0F); //Lock Difficulty packet added in 19w11a - registerIncoming(State.PLAY, 0x0E, 0x10); - registerIncoming(State.PLAY, 0x0F, 0x11); - registerIncoming(State.PLAY, 0x10, 0x12); - registerIncoming(State.PLAY, 0x11, 0x13); - registerIncoming(State.PLAY, 0x12, 0x14); + registerIncoming(State.PLAY, -1, 0x10); //Lock Difficulty packet added in 19w11a + registerIncoming(State.PLAY, 0x0E, 0x0F); + registerIncoming(State.PLAY, 0x0F, 0x14); + registerIncoming(State.PLAY, 0x10, 0x11); + registerIncoming(State.PLAY, 0x11, 0x12); + registerIncoming(State.PLAY, 0x12, 0x13); registerIncoming(State.PLAY, 0x13, 0x15); registerIncoming(State.PLAY, 0x14, 0x16); registerIncoming(State.PLAY, 0x15, 0x17); diff --git a/common/src/main/java/us/myles/ViaVersion/protocols/protocol1_14to1_13_2/packets/EntityPackets.java b/common/src/main/java/us/myles/ViaVersion/protocols/protocol1_14to1_13_2/packets/EntityPackets.java index 843f5da6e..137f83028 100644 --- a/common/src/main/java/us/myles/ViaVersion/protocols/protocol1_14to1_13_2/packets/EntityPackets.java +++ b/common/src/main/java/us/myles/ViaVersion/protocols/protocol1_14to1_13_2/packets/EntityPackets.java @@ -28,7 +28,7 @@ public class EntityPackets { public static void register(Protocol protocol) { // Spawn entity - protocol.registerOutgoing(State.PLAY, 0x0, 0x0, new PacketRemapper() { + protocol.registerOutgoing(State.PLAY, 0x00, 0x00, new PacketRemapper() { @Override public void registerMap() { map(Type.VAR_INT); // 0 - Entity id @@ -92,7 +92,7 @@ public class EntityPackets { }); // Spawn mob packet - protocol.registerOutgoing(State.PLAY, 0x3, 0x3, new PacketRemapper() { + protocol.registerOutgoing(State.PLAY, 0x03, 0x03, new PacketRemapper() { @Override public void registerMap() { map(Type.VAR_INT); // 0 - Entity ID @@ -194,7 +194,7 @@ public class EntityPackets { }); // Use bed - protocol.registerOutgoing(State.PLAY, 0x33, 0x3F, new PacketRemapper() { + protocol.registerOutgoing(State.PLAY, 0x33, 0x43, new PacketRemapper() { @Override public void registerMap() { map(Type.VAR_INT); @@ -211,7 +211,7 @@ public class EntityPackets { }); // Destroy entities - protocol.registerOutgoing(State.PLAY, 0x35, 0x35, new PacketRemapper() { + protocol.registerOutgoing(State.PLAY, 0x35, 0x37, new PacketRemapper() { @Override public void registerMap() { map(Type.VAR_INT_ARRAY); // 0 - Entity IDS @@ -227,7 +227,7 @@ public class EntityPackets { }); // Metadata packet - protocol.registerOutgoing(State.PLAY, 0x3F, 0x3F, new PacketRemapper() { + protocol.registerOutgoing(State.PLAY, 0x3F, 0x43, new PacketRemapper() { @Override public void registerMap() { map(Type.VAR_INT); // 0 - Entity ID @@ -243,6 +243,5 @@ public class EntityPackets { }); } }); - } } diff --git a/common/src/main/java/us/myles/ViaVersion/protocols/protocol1_14to1_13_2/packets/InventoryPackets.java b/common/src/main/java/us/myles/ViaVersion/protocols/protocol1_14to1_13_2/packets/InventoryPackets.java index 281c3afbc..e67e73d60 100644 --- a/common/src/main/java/us/myles/ViaVersion/protocols/protocol1_14to1_13_2/packets/InventoryPackets.java +++ b/common/src/main/java/us/myles/ViaVersion/protocols/protocol1_14to1_13_2/packets/InventoryPackets.java @@ -42,13 +42,13 @@ public class InventoryPackets { Short slots = wrapper.read(Type.UNSIGNED_BYTE); if (type.equals("EntityHorse")) { - wrapper.setId(0x14); + wrapper.setId(0x1F); int entityId = wrapper.read(Type.INT); wrapper.write(Type.UNSIGNED_BYTE, windowsId); wrapper.write(Type.VAR_INT, slots.intValue()); wrapper.write(Type.INT, entityId); } else { - wrapper.setId(0x58); + wrapper.setId(0x2E); wrapper.write(Type.VAR_INT, windowsId.intValue()); int typeId = -1; @@ -103,7 +103,7 @@ public class InventoryPackets { }); // Window items packet - protocol.registerOutgoing(State.PLAY, 0x15, 0x15, new PacketRemapper() { + protocol.registerOutgoing(State.PLAY, 0x15, 0x14, new PacketRemapper() { @Override public void registerMap() { map(Type.UNSIGNED_BYTE); // 0 - Window ID @@ -120,7 +120,7 @@ public class InventoryPackets { }); // Set slot packet - protocol.registerOutgoing(State.PLAY, 0x17, 0x17, new PacketRemapper() { + protocol.registerOutgoing(State.PLAY, 0x17, 0x16, new PacketRemapper() { @Override public void registerMap() { map(Type.BYTE); // 0 - Window ID @@ -137,7 +137,7 @@ public class InventoryPackets { }); // Plugin message - protocol.registerOutgoing(State.PLAY, 0x19, 0x19, new PacketRemapper() { + protocol.registerOutgoing(State.PLAY, 0x19, 0x18, new PacketRemapper() { @Override public void registerMap() { map(Type.STRING); // Channel @@ -146,7 +146,7 @@ public class InventoryPackets { public void handle(PacketWrapper wrapper) throws Exception { String channel = wrapper.get(Type.STRING, 0); if (channel.equals("minecraft:trader_list") || channel.equals("trader_list")) { - wrapper.setId(0x59); + wrapper.setId(0x27); wrapper.resetReader(); wrapper.read(Type.STRING); // Remove channel @@ -181,7 +181,7 @@ public class InventoryPackets { wrapper.read(Type.REMAINING_BYTES); int hand = wrapper.read(Type.VAR_INT); wrapper.clearPacket(); - wrapper.setId(0x2C); + wrapper.setId(0x2D); wrapper.write(Type.VAR_INT, hand); } } @@ -190,7 +190,7 @@ public class InventoryPackets { }); // Entity Equipment Packet - protocol.registerOutgoing(State.PLAY, 0x42, 0x42, new PacketRemapper() { + protocol.registerOutgoing(State.PLAY, 0x42, 0x46, new PacketRemapper() { @Override public void registerMap() { map(Type.VAR_INT); // 0 - Entity ID @@ -207,7 +207,7 @@ public class InventoryPackets { }); // Declare Recipes - protocol.registerOutgoing(State.PLAY, 0x54, 0x55, new PacketRemapper() { + protocol.registerOutgoing(State.PLAY, 0x54, 0x5A, new PacketRemapper() { @Override public void registerMap() { handler(new PacketHandler() { diff --git a/common/src/main/java/us/myles/ViaVersion/protocols/protocol1_14to1_13_2/packets/PlayerPackets.java b/common/src/main/java/us/myles/ViaVersion/protocols/protocol1_14to1_13_2/packets/PlayerPackets.java index b821311fe..700cd7ba2 100644 --- a/common/src/main/java/us/myles/ViaVersion/protocols/protocol1_14to1_13_2/packets/PlayerPackets.java +++ b/common/src/main/java/us/myles/ViaVersion/protocols/protocol1_14to1_13_2/packets/PlayerPackets.java @@ -18,7 +18,7 @@ public class PlayerPackets { public static void register(Protocol protocol) { // Open Sign Editor - protocol.registerOutgoing(State.PLAY, 0x2C, 0x2E, new PacketRemapper() { + protocol.registerOutgoing(State.PLAY, 0x2C, 0x30, new PacketRemapper() { @Override public void registerMap() { map(Type.POSITION, Type.POSITION1_14); diff --git a/common/src/main/java/us/myles/ViaVersion/protocols/protocol1_14to1_13_2/packets/WorldPackets.java b/common/src/main/java/us/myles/ViaVersion/protocols/protocol1_14to1_13_2/packets/WorldPackets.java index 8d97a4de4..9df7d6e74 100644 --- a/common/src/main/java/us/myles/ViaVersion/protocols/protocol1_14to1_13_2/packets/WorldPackets.java +++ b/common/src/main/java/us/myles/ViaVersion/protocols/protocol1_14to1_13_2/packets/WorldPackets.java @@ -64,7 +64,7 @@ public class WorldPackets { }); // Block Change - protocol.registerOutgoing(State.PLAY, 0xB, 0xB, new PacketRemapper() { + protocol.registerOutgoing(State.PLAY, 0x0B, 0x0B, new PacketRemapper() { @Override public void registerMap() { map(Type.POSITION, Type.POSITION1_14); @@ -95,7 +95,7 @@ public class WorldPackets { }); // Multi Block Change - protocol.registerOutgoing(State.PLAY, 0xF, 0xF, new PacketRemapper() { + protocol.registerOutgoing(State.PLAY, 0x0F, 0x0F, new PacketRemapper() { @Override public void registerMap() { map(Type.INT); // 0 - Chunk X @@ -115,7 +115,7 @@ public class WorldPackets { }); // Chunk - protocol.registerOutgoing(State.PLAY, 0x22, 0x22, new PacketRemapper() { + protocol.registerOutgoing(State.PLAY, 0x22, 0x21, new PacketRemapper() { @Override public void registerMap() { handler(new PacketHandler() { @@ -154,7 +154,7 @@ public class WorldPackets { section.setNonAirBlocksCount(nonAirBlockCount); } - PacketWrapper lightPacket = wrapper.create(0x57); + PacketWrapper lightPacket = wrapper.create(0x24); lightPacket.write(Type.VAR_INT, chunk.getX()); lightPacket.write(Type.VAR_INT, chunk.getZ()); int skyLightMask = 0; @@ -195,7 +195,7 @@ public class WorldPackets { EntityTracker tracker = wrapper.user().get(EntityTracker.class); if (!tracker.isSentPosAndLook()) { // Workaround for 1.13.2 not loading chunks near to world border on join - PacketWrapper fakePosLook = wrapper.create(0x33); + PacketWrapper fakePosLook = wrapper.create(0x35); fakePosLook.write(Type.DOUBLE, chunkBlockX); fakePosLook.write(Type.DOUBLE, 0d); // Y fakePosLook.write(Type.DOUBLE, chunkBlockZ); @@ -214,7 +214,7 @@ public class WorldPackets { }); // Effect - protocol.registerOutgoing(State.PLAY, 0x23, 0x23, new PacketRemapper() { + protocol.registerOutgoing(State.PLAY, 0x23, 0x22, new PacketRemapper() { @Override public void registerMap() { map(Type.INT); // Effect Id @@ -236,7 +236,7 @@ public class WorldPackets { }); // Spawn Particle - protocol.registerOutgoing(State.PLAY, 0x24, 0x24, new PacketRemapper() { + protocol.registerOutgoing(State.PLAY, 0x24, 0x23, new PacketRemapper() { @Override public void registerMap() { map(Type.INT); // 0 - Particle ID @@ -344,7 +344,7 @@ public class WorldPackets { }); // Respawn - protocol.registerOutgoing(State.PLAY, 0x38, 0x38, new PacketRemapper() { + protocol.registerOutgoing(State.PLAY, 0x38, 0x3A, new PacketRemapper() { @Override public void registerMap() { map(Type.INT); // 0 - Dimension ID @@ -370,12 +370,11 @@ public class WorldPackets { }); // Spawn Position - protocol.registerOutgoing(State.PLAY, 0x49, 0x49, new PacketRemapper() { + protocol.registerOutgoing(State.PLAY, 0x49, 0x4D, new PacketRemapper() { @Override public void registerMap() { map(Type.POSITION, Type.POSITION1_14); } }); } - } diff --git a/jar/pom.xml b/jar/pom.xml index f4e615fb8..2e3896f49 100644 --- a/jar/pom.xml +++ b/jar/pom.xml @@ -5,7 +5,7 @@ viaversion-parent us.myles - 2.0.0-19w14a + 2.0.0-19w14b 4.0.0 viaversion-jar diff --git a/pom.xml b/pom.xml index 8fb9d2dc9..3720a7a75 100644 --- a/pom.xml +++ b/pom.xml @@ -6,7 +6,7 @@ us.myles viaversion-parent - 2.0.0-19w14a + 2.0.0-19w14b pom viaversion-parent diff --git a/sponge-legacy/pom.xml b/sponge-legacy/pom.xml index 02f4ee2b5..2aabf26f1 100644 --- a/sponge-legacy/pom.xml +++ b/sponge-legacy/pom.xml @@ -5,7 +5,7 @@ viaversion-parent us.myles - 2.0.0-19w14a + 2.0.0-19w14b 4.0.0 diff --git a/sponge/pom.xml b/sponge/pom.xml index 22dd71e5d..952a33202 100644 --- a/sponge/pom.xml +++ b/sponge/pom.xml @@ -5,7 +5,7 @@ viaversion-parent us.myles - 2.0.0-19w14a + 2.0.0-19w14b 4.0.0 diff --git a/velocity/pom.xml b/velocity/pom.xml index 45387139c..a1a443a5c 100644 --- a/velocity/pom.xml +++ b/velocity/pom.xml @@ -5,7 +5,7 @@ viaversion-parent us.myles - 2.0.0-19w14a + 2.0.0-19w14b 4.0.0