#2323: Attempt to rewrite fishing hook data

This commit is contained in:
md_5 2018-01-08 12:50:53 +11:00
parent 6b7046c8b7
commit d600c9a526
6 changed files with 15 additions and 0 deletions

View File

@ -147,6 +147,10 @@ class EntityMap_1_10 extends EntityMap
rewriteInt( packet, oldId, newId, packet.readerIndex() ); rewriteInt( packet, oldId, newId, packet.readerIndex() );
} }
break; break;
case 0x39 /* EntityMetadata : PacketPlayOutEntityMetadata */:
DefinedPacket.readVarInt( packet ); // Entity ID
rewriteMetaVarInt( packet, oldId + 1, newId + 1, 6 ); // fishing hook
break;
} }
packet.readerIndex( readerIndex ); packet.readerIndex( readerIndex );
} }

View File

@ -149,6 +149,7 @@ class EntityMap_1_11 extends EntityMap
break; break;
case 0x39 /* EntityMetadata : PacketPlayOutEntityMetadata */: case 0x39 /* EntityMetadata : PacketPlayOutEntityMetadata */:
DefinedPacket.readVarInt( packet ); // Entity ID DefinedPacket.readVarInt( packet ); // Entity ID
rewriteMetaVarInt( packet, oldId + 1, newId + 1, 6 ); // fishing hook
rewriteMetaVarInt( packet, oldId, newId, 7 ); // fireworks (et al) rewriteMetaVarInt( packet, oldId, newId, 7 ); // fireworks (et al)
break; break;
} }

View File

@ -149,6 +149,7 @@ class EntityMap_1_12 extends EntityMap
break; break;
case 0x3B /* EntityMetadata : PacketPlayOutEntityMetadata */: case 0x3B /* EntityMetadata : PacketPlayOutEntityMetadata */:
DefinedPacket.readVarInt( packet ); // Entity ID DefinedPacket.readVarInt( packet ); // Entity ID
rewriteMetaVarInt( packet, oldId + 1, newId + 1, 6 ); // fishing hook
rewriteMetaVarInt( packet, oldId, newId, 7 ); // fireworks (et al) rewriteMetaVarInt( packet, oldId, newId, 7 ); // fireworks (et al)
break; break;
} }

View File

@ -149,6 +149,7 @@ class EntityMap_1_12_1 extends EntityMap
break; break;
case 0x3C /* EntityMetadata : PacketPlayOutEntityMetadata */: case 0x3C /* EntityMetadata : PacketPlayOutEntityMetadata */:
DefinedPacket.readVarInt( packet ); // Entity ID DefinedPacket.readVarInt( packet ); // Entity ID
rewriteMetaVarInt( packet, oldId + 1, newId + 1, 6 ); // fishing hook
rewriteMetaVarInt( packet, oldId, newId, 7 ); // fireworks (et al) rewriteMetaVarInt( packet, oldId, newId, 7 ); // fireworks (et al)
break; break;
} }

View File

@ -147,6 +147,10 @@ class EntityMap_1_9 extends EntityMap
rewriteInt( packet, oldId, newId, packet.readerIndex() ); rewriteInt( packet, oldId, newId, packet.readerIndex() );
} }
break; break;
case 0x39 /* EntityMetadata : PacketPlayOutEntityMetadata */:
DefinedPacket.readVarInt( packet ); // Entity ID
rewriteMetaVarInt( packet, oldId + 1, newId + 1, 5 ); // fishing hook
break;
} }
packet.readerIndex( readerIndex ); packet.readerIndex( readerIndex );
} }

View File

@ -147,6 +147,10 @@ class EntityMap_1_9_4 extends EntityMap
rewriteInt( packet, oldId, newId, packet.readerIndex() ); rewriteInt( packet, oldId, newId, packet.readerIndex() );
} }
break; break;
case 0x39 /* EntityMetadata : PacketPlayOutEntityMetadata */:
DefinedPacket.readVarInt( packet ); // Entity ID
rewriteMetaVarInt( packet, oldId + 1, newId + 1, 5 ); // fishing hook
break;
} }
packet.readerIndex( readerIndex ); packet.readerIndex( readerIndex );
} }