Skip to content
This repository has been archived by the owner on Jul 15, 2022. It is now read-only.

Commit

Permalink
Merge pull request #49 from SpigotMC/master
Browse files Browse the repository at this point in the history
SpigotMC#1859: Fix EntityMap for leads.
  • Loading branch information
Zartec authored Jun 27, 2016
2 parents 8d66be3 + c5ac5a0 commit 4f60998
Show file tree
Hide file tree
Showing 3 changed files with 6 additions and 0 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -34,6 +34,7 @@ class EntityMap_1_10 extends EntityMap
addRewrite( 0x34, ProtocolConstants.Direction.TO_CLIENT, true ); // Entity Head Look : PacketPlayOutEntityHeadRotation
addRewrite( 0x36, ProtocolConstants.Direction.TO_CLIENT, true ); // Camera : PacketPlayOutCamera
addRewrite( 0x39, ProtocolConstants.Direction.TO_CLIENT, true ); // Entity Metadata : PacketPlayOutEntityMetadata
addRewrite( 0x3A, ProtocolConstants.Direction.TO_CLIENT, true ); // Attach Entity : PacketPlayOutAttachEntity
addRewrite( 0x3B, ProtocolConstants.Direction.TO_CLIENT, true ); // Entity Velocity : PacketPlayOutEntityVelocity
addRewrite( 0x3C, ProtocolConstants.Direction.TO_CLIENT, true ); // Entity Equipment : PacketPlayOutEntityEquipment
addRewrite( 0x40, ProtocolConstants.Direction.TO_CLIENT, true ); // Attach Entity : PacketPlayOutMount
Expand All @@ -59,6 +60,7 @@ public void rewriteClientbound(ByteBuf packet, int oldId, int newId)
int jumpIndex = packet.readerIndex();
switch ( packetId )
{
case 0x3A /* Attach Entity : PacketPlayOutAttachEntity */:
case 0x48 /* Collect Item : PacketPlayOutCollect */:
DefinedPacket.readVarInt( packet );
rewriteVarInt( packet, oldId, newId, packet.readerIndex() );
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -34,6 +34,7 @@ class EntityMap_1_9 extends EntityMap
addRewrite( 0x34, ProtocolConstants.Direction.TO_CLIENT, true ); // Entity Head Look : PacketPlayOutEntityHeadRotation
addRewrite( 0x36, ProtocolConstants.Direction.TO_CLIENT, true ); // Camera : PacketPlayOutCamera
addRewrite( 0x39, ProtocolConstants.Direction.TO_CLIENT, true ); // Entity Metadata : PacketPlayOutEntityMetadata
addRewrite( 0x3A, ProtocolConstants.Direction.TO_CLIENT, true ); // Attach Entity : PacketPlayOutAttachEntity
addRewrite( 0x3B, ProtocolConstants.Direction.TO_CLIENT, true ); // Entity Velocity : PacketPlayOutEntityVelocity
addRewrite( 0x3C, ProtocolConstants.Direction.TO_CLIENT, true ); // Entity Equipment : PacketPlayOutEntityEquipment
addRewrite( 0x40, ProtocolConstants.Direction.TO_CLIENT, true ); // Attach Entity : PacketPlayOutMount
Expand All @@ -59,6 +60,7 @@ public void rewriteClientbound(ByteBuf packet, int oldId, int newId)
int jumpIndex = packet.readerIndex();
switch ( packetId )
{
case 0x3A /* Attach Entity : PacketPlayOutAttachEntity */:
case 0x49 /* Collect Item : PacketPlayOutCollect */:
DefinedPacket.readVarInt( packet );
rewriteVarInt( packet, oldId, newId, packet.readerIndex() );
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -34,6 +34,7 @@ class EntityMap_1_9_4 extends EntityMap
addRewrite( 0x34, ProtocolConstants.Direction.TO_CLIENT, true ); // Entity Head Look : PacketPlayOutEntityHeadRotation
addRewrite( 0x36, ProtocolConstants.Direction.TO_CLIENT, true ); // Camera : PacketPlayOutCamera
addRewrite( 0x39, ProtocolConstants.Direction.TO_CLIENT, true ); // Entity Metadata : PacketPlayOutEntityMetadata
addRewrite( 0x3A, ProtocolConstants.Direction.TO_CLIENT, true ); // Attach Entity : PacketPlayOutAttachEntity
addRewrite( 0x3B, ProtocolConstants.Direction.TO_CLIENT, true ); // Entity Velocity : PacketPlayOutEntityVelocity
addRewrite( 0x3C, ProtocolConstants.Direction.TO_CLIENT, true ); // Entity Equipment : PacketPlayOutEntityEquipment
addRewrite( 0x40, ProtocolConstants.Direction.TO_CLIENT, true ); // Attach Entity : PacketPlayOutMount
Expand All @@ -59,6 +60,7 @@ public void rewriteClientbound(ByteBuf packet, int oldId, int newId)
int jumpIndex = packet.readerIndex();
switch ( packetId )
{
case 0x3A /* Attach Entity : PacketPlayOutAttachEntity */:
case 0x48 /* Collect Item : PacketPlayOutCollect */:
DefinedPacket.readVarInt( packet );
rewriteVarInt( packet, oldId, newId, packet.readerIndex() );
Expand Down

0 comments on commit 4f60998

Please sign in to comment.