Use equals for legacy custom payload channel handlers (#693)

This commit is contained in:
EnZaXD 2024-02-29 12:09:50 +01:00 committed by GitHub
parent 5bb3e8a1fc
commit 2f60c79ed8
No known key found for this signature in database
GPG Key ID: B5690EEEBB952194
4 changed files with 4 additions and 4 deletions

View File

@ -115,7 +115,7 @@ public class BlockItemPackets1_11 extends LegacyBlockItemRewriter<ClientboundPac
map(Type.STRING); // 0 - Channel map(Type.STRING); // 0 - Channel
handler(wrapper -> { handler(wrapper -> {
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 wrapper.passthrough(Type.INT); // Passthrough Window ID
int size = wrapper.passthrough(Type.UNSIGNED_BYTE); int size = wrapper.passthrough(Type.UNSIGNED_BYTE);

View File

@ -91,7 +91,7 @@ public class BlockItemPackets1_12 extends LegacyBlockItemRewriter<ClientboundPac
map(Type.STRING); // 0 - Channel map(Type.STRING); // 0 - Channel
handler(wrapper -> { handler(wrapper -> {
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 wrapper.passthrough(Type.INT); // Passthrough Window ID
int size = wrapper.passthrough(Type.UNSIGNED_BYTE); int size = wrapper.passthrough(Type.UNSIGNED_BYTE);

View File

@ -49,7 +49,7 @@ public class ItemPackets1_11_1 extends LegacyBlockItemRewriter<ClientboundPacket
map(Type.STRING); // 0 - Channel map(Type.STRING); // 0 - Channel
handler(wrapper -> { handler(wrapper -> {
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 wrapper.passthrough(Type.INT); // Passthrough Window ID
int size = wrapper.passthrough(Type.UNSIGNED_BYTE); int size = wrapper.passthrough(Type.UNSIGNED_BYTE);

View File

@ -49,7 +49,7 @@ public class BlockItemPackets1_10 extends LegacyBlockItemRewriter<ClientboundPac
map(Type.STRING); // 0 - Channel map(Type.STRING); // 0 - Channel
handler(wrapper -> { handler(wrapper -> {
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 wrapper.passthrough(Type.INT); // Passthrough Window ID
int size = wrapper.passthrough(Type.UNSIGNED_BYTE); int size = wrapper.passthrough(Type.UNSIGNED_BYTE);