From 1b75526892a71fe41d7d6614b5fa34696cc360b3 Mon Sep 17 00:00:00 2001 From: Myles Date: Thu, 3 Mar 2016 15:17:31 +0000 Subject: [PATCH] Implement changes to entity effect --- .../transformers/OutgoingTransformer.java | 14 ++++++++++++++ 1 file changed, 14 insertions(+) diff --git a/src/main/java/us/myles/ViaVersion/transformers/OutgoingTransformer.java b/src/main/java/us/myles/ViaVersion/transformers/OutgoingTransformer.java index 667d50be3..9fcc91970 100644 --- a/src/main/java/us/myles/ViaVersion/transformers/OutgoingTransformer.java +++ b/src/main/java/us/myles/ViaVersion/transformers/OutgoingTransformer.java @@ -428,6 +428,20 @@ public class OutgoingTransformer { output.writeBytes(input); return; } + if (packet == PacketType.PLAY_ENTITY_EFFECT) { + int id = PacketUtil.readVarInt(input); + PacketUtil.writeVarInt(id, output); + byte effectID = input.readByte(); + output.writeByte(effectID); + byte amplifier = input.readByte(); + output.writeByte(amplifier); + int duration = PacketUtil.readVarInt(input); + PacketUtil.writeVarInt(duration, output); + // we need to write as a byte instead of boolean + boolean hideParticles = input.readBoolean(); + output.writeByte(hideParticles ? 1 : 0); + return; + } if (packet == PacketType.PLAY_TEAM) { String teamName = PacketUtil.readString(input); PacketUtil.writeString(teamName, output);