From f8895c7c785704634c22a3f50fea446944148670 Mon Sep 17 00:00:00 2001 From: KennyTV <28825609+KennyTV@users.noreply.github.com> Date: Thu, 7 Mar 2019 23:11:09 +0100 Subject: [PATCH] Try to fix particles --- .../packets/WorldPackets.java | 18 ++++++++++++++++++ 1 file changed, 18 insertions(+) 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 6abb7fe87..b52050838 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 @@ -227,6 +227,24 @@ public class WorldPackets { } else if (id == 27) { InventoryPackets.toClient(wrapper.passthrough(Type.FLAT_VAR_INT_ITEM)); } + + int newId = id; + if (newId >= 10) { + newId += 2; // new 10, 11 + } + if (newId >= 13) { + newId += 1; // new 11 -> 13 + } + if (newId >= 27) { + newId += 2; // new 24, 25 -> 27 + } + if (newId >= 42) { + newId += 1; // new 39 -> 42 + } + + if (newId != id) { + wrapper.set(Type.INT, 0, newId); + } } }); }