From d5b375b2643d07dcfe69b20794a834ea2bd5127d Mon Sep 17 00:00:00 2001 From: Mats Date: Mon, 7 Mar 2016 19:45:00 +0100 Subject: [PATCH] Fixed horses inventory/elytra exception --- .../transformers/IncomingTransformer.java | 13 +++++++++++++ 1 file changed, 13 insertions(+) diff --git a/src/main/java/us/myles/ViaVersion/transformers/IncomingTransformer.java b/src/main/java/us/myles/ViaVersion/transformers/IncomingTransformer.java index 0c4ae36ee..77e5d9600 100644 --- a/src/main/java/us/myles/ViaVersion/transformers/IncomingTransformer.java +++ b/src/main/java/us/myles/ViaVersion/transformers/IncomingTransformer.java @@ -163,6 +163,19 @@ public class IncomingTransformer { PacketUtil.readVarInt(input); return; } + if (packet == PacketType.PLAY_ENTITY_ACTION) { + int playerId = PacketUtil.readVarInt(input); + int action = PacketUtil.readVarInt(input); + int jump = PacketUtil.readVarInt(input); + if (action == 6 || action == 8) //Ignore stop jumping / start elytra flying + throw new CancelException(); + if (action == 7) //Change open horse inventory to the 1.8 value + action = 6; + PacketUtil.writeVarInt(playerId, output); + PacketUtil.writeVarInt(action, output); + PacketUtil.writeVarInt(jump, output); + return; + } if (packet == PacketType.PLAY_USE_ENTITY) { int target = PacketUtil.readVarInt(input); PacketUtil.writeVarInt(target, output);