From 989c0bf55fad2ede4d2f148345f8ff5f20040587 Mon Sep 17 00:00:00 2001 From: KennyTV Date: Thu, 11 Jun 2020 19:30:52 +0200 Subject: [PATCH 1/2] 1.16 pre4 --- .../ViaVersion/api/protocol/ProtocolVersion.java | 2 +- .../protocol1_16to1_15_2/Protocol1_16To1_15_2.java | 14 +++++++++++++- .../assets/viaversion/data/mapping-1.16.json | 4 ++-- 3 files changed, 16 insertions(+), 4 deletions(-) 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 2ba3944fb..11029a7ff 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 @@ -80,7 +80,7 @@ public class ProtocolVersion { register(v1_15 = new ProtocolVersion(573, "1.15")); register(v1_15_1 = new ProtocolVersion(575, "1.15.1")); register(v1_15_2 = new ProtocolVersion(578, "1.15.2")); - register(v1_16 = new ProtocolVersion(725, "1.16")); + register(v1_16 = new ProtocolVersion(727, "1.16")); register(unknown = new ProtocolVersion(-1, "UNKNOWN")); } diff --git a/common/src/main/java/us/myles/ViaVersion/protocols/protocol1_16to1_15_2/Protocol1_16To1_15_2.java b/common/src/main/java/us/myles/ViaVersion/protocols/protocol1_16to1_15_2/Protocol1_16To1_15_2.java index a431a6d02..d2d3695a0 100644 --- a/common/src/main/java/us/myles/ViaVersion/protocols/protocol1_16to1_15_2/Protocol1_16To1_15_2.java +++ b/common/src/main/java/us/myles/ViaVersion/protocols/protocol1_16to1_15_2/Protocol1_16To1_15_2.java @@ -109,7 +109,7 @@ public class Protocol1_16To1_15_2 extends Protocol { wrapper.passthrough(Type.VAR_INT); // Entity Id - int action = wrapper.passthrough(Type.VAR_INT); + int action = wrapper.passthrough(Type.VAR_INT); if (action == 0 || action == 2) { if (action == 2) { // Location @@ -127,6 +127,18 @@ public class Protocol1_16To1_15_2 extends Protocol { + wrapper.passthrough(Type.BYTE); + // Flying and walking speed - not important anyways + wrapper.write(Type.FLOAT, 0.05F); + wrapper.write(Type.FLOAT, 0.1F); + }); + } + }); + cancelIncoming(ServerboundPackets1_16.GENERATE_JIGSAW); cancelIncoming(ServerboundPackets1_16.UPDATE_JIGSAW_BLOCK); } diff --git a/common/src/main/resources/assets/viaversion/data/mapping-1.16.json b/common/src/main/resources/assets/viaversion/data/mapping-1.16.json index 748cb8a9c..968e7f195 100644 --- a/common/src/main/resources/assets/viaversion/data/mapping-1.16.json +++ b/common/src/main/resources/assets/viaversion/data/mapping-1.16.json @@ -18691,8 +18691,8 @@ "817": "minecraft:zoglin_spawn_egg", "818": "minecraft:zombie_spawn_egg", "819": "minecraft:zombie_horse_spawn_egg", - "820": "minecraft:zombified_piglin_spawn_egg", - "821": "minecraft:zombie_villager_spawn_egg", + "820": "minecraft:zombie_villager_spawn_egg", + "821": "minecraft:zombified_piglin_spawn_egg", "822": "minecraft:experience_bottle", "823": "minecraft:fire_charge", "824": "minecraft:writable_book", From 7924dfeab24db74ab24e8c18a6429c9c72111846 Mon Sep 17 00:00:00 2001 From: KennyTV Date: Thu, 11 Jun 2020 19:36:35 +0200 Subject: [PATCH 2/2] Remove -1 tag workaround, fixed in pre4 --- .../java/us/myles/ViaVersion/api/rewriters/TagRewriter.java | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/common/src/main/java/us/myles/ViaVersion/api/rewriters/TagRewriter.java b/common/src/main/java/us/myles/ViaVersion/api/rewriters/TagRewriter.java index 30faec23b..301c61727 100644 --- a/common/src/main/java/us/myles/ViaVersion/api/rewriters/TagRewriter.java +++ b/common/src/main/java/us/myles/ViaVersion/api/rewriters/TagRewriter.java @@ -10,7 +10,7 @@ import java.util.ArrayList; import java.util.List; public class TagRewriter { - private static final int[] EMPTY_ARRAY = {-1}; + private static final int[] EMPTY_ARRAY = {}; private final Protocol protocol; private final IdRewriteFunction blockRewriter; private final IdRewriteFunction itemRewriter;