Skip to content

Commit

Permalink
fix generator holograms overlapped on 1.20 r2 and r3
Browse files Browse the repository at this point in the history
  • Loading branch information
andrei1058 committed May 24, 2024
1 parent 89129b2 commit 90f24f7
Show file tree
Hide file tree
Showing 2 changed files with 5 additions and 4 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -140,6 +140,7 @@ public org.bukkit.inventory.ItemStack getItemInHand(@NotNull Player p) {
public void hideEntity(@NotNull Entity e, Player p) {
PacketPlayOutEntityDestroy packet = new PacketPlayOutEntityDestroy(e.getEntityId());
this.sendPacket(p, packet);
p.sendMessage(ChatColor.RED+"Sending hide entity: "+e.getEntityId());
}

@Override
Expand Down Expand Up @@ -824,13 +825,13 @@ public void playVillagerEffect(@NotNull Player player, Location location) {
}

private void sendPacket(Player player, Packet<?> packet) {
((CraftPlayer) player).getHandle().c.a(packet);
((CraftPlayer) player).getHandle().c.b(packet);
}

private void sendPackets(Player player, Packet<?> @NotNull ... packets) {
PlayerConnection connection = ((CraftPlayer) player).getHandle().c;
for (Packet<?> p : packets) {
connection.a(p);
connection.b(p);
}
}
}
Original file line number Diff line number Diff line change
Expand Up @@ -826,13 +826,13 @@ public void playVillagerEffect(@NotNull Player player, Location location) {
}

private void sendPacket(Player player, Packet<?> packet) {
((CraftPlayer) player).getHandle().c.a(packet);
((CraftPlayer) player).getHandle().c.b(packet);
}

private void sendPackets(Player player, Packet<?> @NotNull ... packets) {
PlayerConnection connection = ((CraftPlayer) player).getHandle().c;
for (Packet<?> p : packets) {
connection.a(p);
connection.b(p);
}
}
}

0 comments on commit 90f24f7

Please sign in to comment.