mirror of
https://github.com/ViaVersion/ViaBackwards.git
synced 2024-12-21 16:47:57 +01:00
Use equals for legacy custom payload channel handlers (#693)
This commit is contained in:
parent
5bb3e8a1fc
commit
2f60c79ed8
@ -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);
|
||||||
|
@ -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);
|
||||||
|
@ -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);
|
||||||
|
@ -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);
|
||||||
|
Loading…
Reference in New Issue
Block a user