Skip to content

Commit

Permalink
#2769: Guardian target beam lost on server change
Browse files Browse the repository at this point in the history
  • Loading branch information
md-5 committed Feb 9, 2020
1 parent 17d5dd3 commit a52ea50
Show file tree
Hide file tree
Showing 9 changed files with 9 additions and 0 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -149,6 +149,7 @@ public void rewriteClientbound(ByteBuf packet, int oldId, int newId)
case 0x39 /* EntityMetadata : PacketPlayOutEntityMetadata */:
DefinedPacket.readVarInt( packet ); // Entity ID
rewriteMetaVarInt( packet, oldId + 1, newId + 1, 6 ); // fishing hook
rewriteMetaVarInt( packet, oldId, newId, 13 ); // guardian beam
break;
}
packet.readerIndex( readerIndex );
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -150,6 +150,7 @@ public void rewriteClientbound(ByteBuf packet, int oldId, int newId)
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, 13 ); // guardian beam
break;
}
packet.readerIndex( readerIndex );
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -150,6 +150,7 @@ public void rewriteClientbound(ByteBuf packet, int oldId, int newId)
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, 13 ); // guardian beam
break;
}
packet.readerIndex( readerIndex );
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -150,6 +150,7 @@ public void rewriteClientbound(ByteBuf packet, int oldId, int newId)
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, 13 ); // guardian beam
break;
}
packet.readerIndex( readerIndex );
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -150,6 +150,7 @@ public void rewriteClientbound(ByteBuf packet, int oldId, int newId, int protoco
DefinedPacket.readVarInt( packet ); // Entity ID
rewriteMetaVarInt( packet, oldId + 1, newId + 1, 6, protocolVersion ); // fishing hook
rewriteMetaVarInt( packet, oldId, newId, 7, protocolVersion ); // fireworks (et al)
rewriteMetaVarInt( packet, oldId, newId, 13, protocolVersion ); // guardian beam
break;
}
packet.readerIndex( readerIndex );
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -149,6 +149,7 @@ public void rewriteClientbound(ByteBuf packet, int oldId, int newId, int protoco
DefinedPacket.readVarInt( packet ); // Entity ID
rewriteMetaVarInt( packet, oldId + 1, newId + 1, 7, protocolVersion ); // fishing hook
rewriteMetaVarInt( packet, oldId, newId, 8, protocolVersion ); // fireworks (et al)
rewriteMetaVarInt( packet, oldId, newId, 15, protocolVersion ); // guardian beam
break;
case 0x50 /* Entity Sound Effect : PacketPlayOutEntitySound */:
DefinedPacket.readVarInt( packet );
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -149,6 +149,7 @@ public void rewriteClientbound(ByteBuf packet, int oldId, int newId, int protoco
DefinedPacket.readVarInt( packet ); // Entity ID
rewriteMetaVarInt( packet, oldId + 1, newId + 1, 7, protocolVersion ); // fishing hook
rewriteMetaVarInt( packet, oldId, newId, 8, protocolVersion ); // fireworks (et al)
rewriteMetaVarInt( packet, oldId, newId, 16, protocolVersion ); // guardian beam
break;
case 0x51 /* Entity Sound Effect : PacketPlayOutEntitySound */:
DefinedPacket.readVarInt( packet );
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -149,6 +149,7 @@ public void rewriteClientbound(ByteBuf packet, int oldId, int newId)
case 0x39 /* EntityMetadata : PacketPlayOutEntityMetadata */:
DefinedPacket.readVarInt( packet ); // Entity ID
rewriteMetaVarInt( packet, oldId + 1, newId + 1, 5 ); // fishing hook
rewriteMetaVarInt( packet, oldId, newId, 12 ); // guardian beam
break;
}
packet.readerIndex( readerIndex );
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -149,6 +149,7 @@ public void rewriteClientbound(ByteBuf packet, int oldId, int newId)
case 0x39 /* EntityMetadata : PacketPlayOutEntityMetadata */:
DefinedPacket.readVarInt( packet ); // Entity ID
rewriteMetaVarInt( packet, oldId + 1, newId + 1, 5 ); // fishing hook
rewriteMetaVarInt( packet, oldId, newId, 12 ); // guardian beam
break;
}
packet.readerIndex( readerIndex );
Expand Down

0 comments on commit a52ea50

Please sign in to comment.