From 4928dab3f09a7b920344e36b717aaad5899ac828 Mon Sep 17 00:00:00 2001 From: Matsv Date: Wed, 14 Jun 2017 14:59:48 +0200 Subject: [PATCH] Fix achievement popup "Open Inventory" visible forever --- .../packets/EntityPackets1_12.java | 14 ++++++++++++++ 1 file changed, 14 insertions(+) diff --git a/core/src/main/java/nl/matsv/viabackwards/protocol/protocol1_12to1_11_1/packets/EntityPackets1_12.java b/core/src/main/java/nl/matsv/viabackwards/protocol/protocol1_12to1_11_1/packets/EntityPackets1_12.java index b974f192..c2aaee7e 100644 --- a/core/src/main/java/nl/matsv/viabackwards/protocol/protocol1_12to1_11_1/packets/EntityPackets1_12.java +++ b/core/src/main/java/nl/matsv/viabackwards/protocol/protocol1_12to1_11_1/packets/EntityPackets1_12.java @@ -311,6 +311,20 @@ public class EntityPackets1_12 extends EntityRewriter { clientWorld.setEnvironment(dimensionId); } }); + + // Send fake inventory achievement + handler(new PacketHandler() { + @Override + public void handle(PacketWrapper packetWrapper) throws Exception { + PacketWrapper wrapper = new PacketWrapper(0x07, null, packetWrapper.user()); + + wrapper.write(Type.VAR_INT, 1); + wrapper.write(Type.STRING, "achievement.openInventory"); + wrapper.write(Type.VAR_INT, 1); + + wrapper.send(Protocol1_11_1To1_12.class); + } + }); } });