3
0
Mirror von https://github.com/ViaVersion/ViaBackwards.git synchronisiert 2024-12-27 00:22:53 +01:00

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

Dieser Commit ist enthalten in:
EnZaXD 2024-02-29 12:09:50 +01:00 committet von GitHub
Ursprung 5bb3e8a1fc
Commit 2f60c79ed8
Es konnte kein GPG-Schlüssel zu dieser Signatur gefunden werden
GPG-Schlüssel-ID: B5690EEEBB952194
4 geänderte Dateien mit 4 neuen und 4 gelöschten Zeilen

Datei anzeigen

@ -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);

Datei anzeigen

@ -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);

Datei anzeigen

@ -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);

Datei anzeigen

@ -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);