From 2f60c79ed81dd34f334e3dd3d84425d0a1cb47c3 Mon Sep 17 00:00:00 2001 From: EnZaXD <60033407+FlorianMichael@users.noreply.github.com> Date: Thu, 29 Feb 2024 12:09:50 +0100 Subject: [PATCH] Use equals for legacy custom payload channel handlers (#693) --- .../protocol1_10to1_11/packets/BlockItemPackets1_11.java | 2 +- .../protocol1_11_1to1_12/packets/BlockItemPackets1_12.java | 2 +- .../protocol1_11to1_11_1/packets/ItemPackets1_11_1.java | 2 +- .../protocol1_9_4to1_10/packets/BlockItemPackets1_10.java | 2 +- 4 files changed, 4 insertions(+), 4 deletions(-) diff --git a/common/src/main/java/com/viaversion/viabackwards/protocol/protocol1_10to1_11/packets/BlockItemPackets1_11.java b/common/src/main/java/com/viaversion/viabackwards/protocol/protocol1_10to1_11/packets/BlockItemPackets1_11.java index e7aee953..cb194858 100644 --- a/common/src/main/java/com/viaversion/viabackwards/protocol/protocol1_10to1_11/packets/BlockItemPackets1_11.java +++ b/common/src/main/java/com/viaversion/viabackwards/protocol/protocol1_10to1_11/packets/BlockItemPackets1_11.java @@ -115,7 +115,7 @@ public class BlockItemPackets1_11 extends LegacyBlockItemRewriter { - if (wrapper.get(Type.STRING, 0).equalsIgnoreCase("MC|TrList")) { + if (wrapper.get(Type.STRING, 0).equals("MC|TrList")) { wrapper.passthrough(Type.INT); // Passthrough Window ID int size = wrapper.passthrough(Type.UNSIGNED_BYTE); diff --git a/common/src/main/java/com/viaversion/viabackwards/protocol/protocol1_11_1to1_12/packets/BlockItemPackets1_12.java b/common/src/main/java/com/viaversion/viabackwards/protocol/protocol1_11_1to1_12/packets/BlockItemPackets1_12.java index 1b0912e3..f7e9abe8 100644 --- a/common/src/main/java/com/viaversion/viabackwards/protocol/protocol1_11_1to1_12/packets/BlockItemPackets1_12.java +++ b/common/src/main/java/com/viaversion/viabackwards/protocol/protocol1_11_1to1_12/packets/BlockItemPackets1_12.java @@ -91,7 +91,7 @@ public class BlockItemPackets1_12 extends LegacyBlockItemRewriter { - if (wrapper.get(Type.STRING, 0).equalsIgnoreCase("MC|TrList")) { + if (wrapper.get(Type.STRING, 0).equals("MC|TrList")) { wrapper.passthrough(Type.INT); // Passthrough Window ID int size = wrapper.passthrough(Type.UNSIGNED_BYTE); diff --git a/common/src/main/java/com/viaversion/viabackwards/protocol/protocol1_11to1_11_1/packets/ItemPackets1_11_1.java b/common/src/main/java/com/viaversion/viabackwards/protocol/protocol1_11to1_11_1/packets/ItemPackets1_11_1.java index cc25278c..e04c4a90 100644 --- a/common/src/main/java/com/viaversion/viabackwards/protocol/protocol1_11to1_11_1/packets/ItemPackets1_11_1.java +++ b/common/src/main/java/com/viaversion/viabackwards/protocol/protocol1_11to1_11_1/packets/ItemPackets1_11_1.java @@ -49,7 +49,7 @@ public class ItemPackets1_11_1 extends LegacyBlockItemRewriter { - if (wrapper.get(Type.STRING, 0).equalsIgnoreCase("MC|TrList")) { + if (wrapper.get(Type.STRING, 0).equals("MC|TrList")) { wrapper.passthrough(Type.INT); // Passthrough Window ID int size = wrapper.passthrough(Type.UNSIGNED_BYTE); diff --git a/common/src/main/java/com/viaversion/viabackwards/protocol/protocol1_9_4to1_10/packets/BlockItemPackets1_10.java b/common/src/main/java/com/viaversion/viabackwards/protocol/protocol1_9_4to1_10/packets/BlockItemPackets1_10.java index 8dbd1800..9d2d1661 100644 --- a/common/src/main/java/com/viaversion/viabackwards/protocol/protocol1_9_4to1_10/packets/BlockItemPackets1_10.java +++ b/common/src/main/java/com/viaversion/viabackwards/protocol/protocol1_9_4to1_10/packets/BlockItemPackets1_10.java @@ -49,7 +49,7 @@ public class BlockItemPackets1_10 extends LegacyBlockItemRewriter { - if (wrapper.get(Type.STRING, 0).equalsIgnoreCase("MC|TrList")) { + if (wrapper.get(Type.STRING, 0).equals("MC|TrList")) { wrapper.passthrough(Type.INT); // Passthrough Window ID int size = wrapper.passthrough(Type.UNSIGNED_BYTE);