From 7c6118bd6f2b7e981f4820a3df3ac2764e5edde0 Mon Sep 17 00:00:00 2001 From: creeper123123321 Date: Mon, 10 Dec 2018 12:53:21 -0200 Subject: [PATCH] facepalm --- .../protocol1_13to1_12_2/Protocol1_13To1_12_2.java | 12 ++++-------- 1 file changed, 4 insertions(+), 8 deletions(-) diff --git a/common/src/main/java/us/myles/ViaVersion/protocols/protocol1_13to1_12_2/Protocol1_13To1_12_2.java b/common/src/main/java/us/myles/ViaVersion/protocols/protocol1_13to1_12_2/Protocol1_13To1_12_2.java index aa4e40a8e..74a3a4c9d 100644 --- a/common/src/main/java/us/myles/ViaVersion/protocols/protocol1_13to1_12_2/Protocol1_13To1_12_2.java +++ b/common/src/main/java/us/myles/ViaVersion/protocols/protocol1_13to1_12_2/Protocol1_13To1_12_2.java @@ -919,16 +919,11 @@ public class Protocol1_13To1_12_2 extends Protocol { registerIncoming(State.PLAY, 0x12, 0x16, new PacketRemapper() { @Override public void registerMap() { + map(Type.BYTE); // Window id handler(new PacketHandler() { @Override public void handle(PacketWrapper wrapper) throws Exception { - map(Type.BYTE); // Window id - handler(new PacketHandler() { - @Override - public void handle(PacketWrapper wrapper) throws Exception { - wrapper.write(Type.VAR_INT, Integer.parseInt(wrapper.read(Type.STRING).substring(18))); - } - }); + wrapper.write(Type.VAR_INT, Integer.parseInt(wrapper.read(Type.STRING).substring(18))); } }); } @@ -951,7 +946,8 @@ public class Protocol1_13To1_12_2 extends Protocol { if (type == 0) { wrapper.write(Type.INT, Integer.parseInt(wrapper.read(Type.STRING).substring(18))); - } if (type == 1) { + } + if (type == 1) { wrapper.passthrough(Type.BOOLEAN); // Crafting Recipe Book Open wrapper.passthrough(Type.BOOLEAN); // Crafting Recipe Filter Active wrapper.read(Type.BOOLEAN); // Smelting Recipe Book Open | IGNORE NEW 1.13 FIELD