diff --git a/bukkit/pom.xml b/bukkit/pom.xml index 8f2ff1233..041162ecf 100644 --- a/bukkit/pom.xml +++ b/bukkit/pom.xml @@ -5,7 +5,7 @@ viaversion-parent us.myles - 2.1.2-SNAPSHOT + 2.1.3-SNAPSHOT 4.0.0 diff --git a/bungee/pom.xml b/bungee/pom.xml index 3dc946c9c..57fd5d83f 100644 --- a/bungee/pom.xml +++ b/bungee/pom.xml @@ -5,7 +5,7 @@ viaversion-parent us.myles - 2.1.2-SNAPSHOT + 2.1.3-SNAPSHOT 4.0.0 diff --git a/common/pom.xml b/common/pom.xml index 6f79eec06..5fd695d26 100644 --- a/common/pom.xml +++ b/common/pom.xml @@ -5,7 +5,7 @@ viaversion-parent us.myles - 2.1.2-SNAPSHOT + 2.1.3-SNAPSHOT 4.0.0 diff --git a/common/src/main/java/us/myles/ViaVersion/api/protocol/ProtocolRegistry.java b/common/src/main/java/us/myles/ViaVersion/api/protocol/ProtocolRegistry.java index 42fca79f9..f8368bee1 100644 --- a/common/src/main/java/us/myles/ViaVersion/api/protocol/ProtocolRegistry.java +++ b/common/src/main/java/us/myles/ViaVersion/api/protocol/ProtocolRegistry.java @@ -13,17 +13,18 @@ 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_13_1to1_13.Protocol1_13_1To1_13; import us.myles.ViaVersion.protocols.protocol1_13_2to1_13_1.Protocol1_13_2To1_13_1; import us.myles.ViaVersion.protocols.protocol1_13to1_12_2.Protocol1_13To1_12_2; import us.myles.ViaVersion.protocols.protocol1_14_1to1_14.Protocol1_14_1To1_14; import us.myles.ViaVersion.protocols.protocol1_14_2to1_14_1.Protocol1_14_2To1_14_1; +import us.myles.ViaVersion.protocols.protocol1_14_3to1_14_2.Protocol1_14_3To1_14_2; import us.myles.ViaVersion.protocols.protocol1_14to1_13_2.Protocol1_14To1_13_2; 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; import us.myles.ViaVersion.protocols.protocol1_9_3to1_9_1_2.Protocol1_9_3To1_9_1_2; import us.myles.ViaVersion.protocols.protocol1_9to1_8.Protocol1_9To1_8; import us.myles.ViaVersion.protocols.protocol1_9to1_9_1.Protocol1_9To1_9_1; -import us.myles.ViaVersion.protocols.protocol1_13_1to1_13.Protocol1_13_1To1_13; import java.util.*; import java.util.concurrent.ConcurrentHashMap; @@ -66,6 +67,7 @@ public class ProtocolRegistry { registerProtocol(new Protocol1_14To1_13_2(), Arrays.asList(ProtocolVersion.v1_14.getId()), ProtocolVersion.v1_13_2.getId()); registerProtocol(new Protocol1_14_1To1_14(), Arrays.asList(ProtocolVersion.v1_14_1.getId()), ProtocolVersion.v1_14.getId()); registerProtocol(new Protocol1_14_2To1_14_1(), Arrays.asList(ProtocolVersion.v1_14_2.getId()), ProtocolVersion.v1_14_1.getId()); + registerProtocol(new Protocol1_14_3To1_14_2(), Arrays.asList(ProtocolVersion.v1_14_3.getId()), ProtocolVersion.v1_14_2.getId()); } /** 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 85351fbaa..3bdda1e7e 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 @@ -38,6 +38,7 @@ public class ProtocolVersion { public static final ProtocolVersion v1_14; public static final ProtocolVersion v1_14_1; public static final ProtocolVersion v1_14_2; + public static final ProtocolVersion v1_14_3; public static final ProtocolVersion unknown; private final int id; @@ -72,6 +73,7 @@ public class ProtocolVersion { register(v1_14 = new ProtocolVersion(477, "1.14")); register(v1_14_1 = new ProtocolVersion(480, "1.14.1")); register(v1_14_2 = new ProtocolVersion(485, "1.14.2")); + register(v1_14_3 = new ProtocolVersion(490, "1.14.3")); register(unknown = new ProtocolVersion(-1, "UNKNOWN")); } diff --git a/common/src/main/java/us/myles/ViaVersion/protocols/protocol1_14_3to1_14_2/Protocol1_14_3To1_14_2.java b/common/src/main/java/us/myles/ViaVersion/protocols/protocol1_14_3to1_14_2/Protocol1_14_3To1_14_2.java new file mode 100644 index 000000000..5bfe35315 --- /dev/null +++ b/common/src/main/java/us/myles/ViaVersion/protocols/protocol1_14_3to1_14_2/Protocol1_14_3To1_14_2.java @@ -0,0 +1,50 @@ +package us.myles.ViaVersion.protocols.protocol1_14_3to1_14_2; + +import us.myles.ViaVersion.api.PacketWrapper; +import us.myles.ViaVersion.api.data.UserConnection; +import us.myles.ViaVersion.api.protocol.Protocol; +import us.myles.ViaVersion.api.remapper.PacketHandler; +import us.myles.ViaVersion.api.remapper.PacketRemapper; +import us.myles.ViaVersion.api.type.Type; +import us.myles.ViaVersion.packets.State; + +public class Protocol1_14_3To1_14_2 extends Protocol { + + @Override + protected void registerPackets() { + // Trade list + registerOutgoing(State.PLAY, 0x27, 0x27, new PacketRemapper() { + @Override + public void registerMap() { + handler(new PacketHandler() { + @Override + public void handle(PacketWrapper wrapper) throws Exception { + wrapper.passthrough(Type.VAR_INT); + int size = wrapper.passthrough(Type.UNSIGNED_BYTE); + for (int i = 0; i < size; i++) { + wrapper.passthrough(Type.FLAT_VAR_INT_ITEM); + wrapper.passthrough(Type.FLAT_VAR_INT_ITEM); + if (wrapper.passthrough(Type.BOOLEAN)) { + wrapper.passthrough(Type.FLAT_VAR_INT_ITEM); + } + wrapper.passthrough(Type.BOOLEAN); + wrapper.passthrough(Type.INT); + wrapper.passthrough(Type.INT); + wrapper.passthrough(Type.INT); + wrapper.passthrough(Type.INT); + wrapper.passthrough(Type.FLOAT); + } + wrapper.passthrough(Type.VAR_INT); + wrapper.passthrough(Type.VAR_INT); + boolean regularVillager = wrapper.passthrough(Type.BOOLEAN); + wrapper.write(Type.BOOLEAN, regularVillager); // new boolean added in pre-1 + } + }); + } + }); + } + + @Override + public void init(UserConnection userConnection) { + } +} diff --git a/jar/pom.xml b/jar/pom.xml index 674d3a4ad..838a9165f 100644 --- a/jar/pom.xml +++ b/jar/pom.xml @@ -5,7 +5,7 @@ viaversion-parent us.myles - 2.1.2-SNAPSHOT + 2.1.3-SNAPSHOT 4.0.0 viaversion-jar diff --git a/pom.xml b/pom.xml index 43af1a58e..89452e195 100644 --- a/pom.xml +++ b/pom.xml @@ -6,7 +6,7 @@ us.myles viaversion-parent - 2.1.2-SNAPSHOT + 2.1.3-SNAPSHOT pom viaversion-parent diff --git a/sponge-legacy/pom.xml b/sponge-legacy/pom.xml index a7729e7f4..193a1fad8 100644 --- a/sponge-legacy/pom.xml +++ b/sponge-legacy/pom.xml @@ -5,7 +5,7 @@ viaversion-parent us.myles - 2.1.2-SNAPSHOT + 2.1.3-SNAPSHOT 4.0.0 diff --git a/sponge/pom.xml b/sponge/pom.xml index 03257f0f6..68573394d 100644 --- a/sponge/pom.xml +++ b/sponge/pom.xml @@ -5,7 +5,7 @@ viaversion-parent us.myles - 2.1.2-SNAPSHOT + 2.1.3-SNAPSHOT 4.0.0 diff --git a/velocity/pom.xml b/velocity/pom.xml index d0fad747e..cc941faa8 100644 --- a/velocity/pom.xml +++ b/velocity/pom.xml @@ -5,7 +5,7 @@ viaversion-parent us.myles - 2.1.2-SNAPSHOT + 2.1.3-SNAPSHOT 4.0.0