From c8e6b6fd7adb141510e0072b80238bb489f75d04 Mon Sep 17 00:00:00 2001 From: Thinkofdeath Date: Wed, 16 Apr 2014 14:34:30 +0100 Subject: [PATCH] Add 'Combat Event' to 14w11a's EntityMap --- .../md_5/bungee/entitymap/EntityMap_14_11_a.java | 14 ++++++++++++++ 1 file changed, 14 insertions(+) diff --git a/proxy/src/main/java/net/md_5/bungee/entitymap/EntityMap_14_11_a.java b/proxy/src/main/java/net/md_5/bungee/entitymap/EntityMap_14_11_a.java index 2e1a9d40..0924a8e0 100644 --- a/proxy/src/main/java/net/md_5/bungee/entitymap/EntityMap_14_11_a.java +++ b/proxy/src/main/java/net/md_5/bungee/entitymap/EntityMap_14_11_a.java @@ -146,6 +146,20 @@ class EntityMap_14_11_a extends EntityMap } } } + } else if ( packetId == 0x42 /* Combat Event */ ) + { + int event = packet.readUnsignedByte(); + if ( event == 1 /* End Combat*/ ) + { + DefinedPacket.readVarInt( packet ); + rewriteInt( packet, oldId, newId, packet.readerIndex() ); + } else if ( event == 2 /* Entity Dead */ ) { + int position = packet.readerIndex(); + rewriteVarInt( packet, oldId, newId, packet.readerIndex() ); + packet.readerIndex( position ); + DefinedPacket.readVarInt( packet ); + rewriteInt( packet, oldId, newId, packet.readerIndex() ); + } } packet.readerIndex( readerIndex ); }