Add 'Combat Event' to 14w11a's EntityMap

This commit is contained in:
Thinkofdeath 2014-04-16 14:34:30 +01:00
parent bca3663a1f
commit c8e6b6fd7a

View File

@ -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 );
}