From 52bbf1affea8aeb610b1f9c2eec2ae21fbe3d477 Mon Sep 17 00:00:00 2001 From: Matsv Date: Sun, 6 Nov 2016 10:37:26 +0100 Subject: [PATCH] Handle the actionbar packet change --- .../Protocol1_11To1_10.java | 21 +++++++++++++++++++ 1 file changed, 21 insertions(+) diff --git a/common/src/main/java/us/myles/ViaVersion/protocols/protocol1_11to1_10/Protocol1_11To1_10.java b/common/src/main/java/us/myles/ViaVersion/protocols/protocol1_11to1_10/Protocol1_11To1_10.java index 52e289e47..10d2d91a3 100644 --- a/common/src/main/java/us/myles/ViaVersion/protocols/protocol1_11to1_10/Protocol1_11To1_10.java +++ b/common/src/main/java/us/myles/ViaVersion/protocols/protocol1_11to1_10/Protocol1_11To1_10.java @@ -198,6 +198,27 @@ public class Protocol1_11To1_10 extends Protocol { } }); + // Title packet + registerOutgoing(State.PLAY, 0x45, 0x45, new PacketRemapper() { + @Override + public void registerMap() { + map(Type.VAR_INT); // 0 - Action + + handler(new PacketHandler() { + @Override + public void handle(PacketWrapper wrapper) throws Exception { + int action = wrapper.get(Type.VAR_INT, 0); + + // Handle the new ActionBar + if (action >= 2) + wrapper.set(Type.VAR_INT, 0, action + 1); + } + }); + + + } + }); + /* INCOMING PACKETS */