Support hidden entities in Waypoints (#12715)

This commit is contained in:
Pedro
2025-06-22 13:42:06 -04:00
committed by GitHub
parent 5edcf6ddf6
commit 803baf0ba6
2 changed files with 16 additions and 5 deletions

View File

@@ -0,0 +1,10 @@
--- a/net/minecraft/world/waypoints/WaypointTransmitter.java
+++ b/net/minecraft/world/waypoints/WaypointTransmitter.java
@@ -20,6 +_,7 @@
Waypoint.Icon waypointIcon();
static boolean doesSourceIgnoreReceiver(LivingEntity entity, ServerPlayer player) {
+ if (!player.getBukkitEntity().canSee(entity.getBukkitEntity())) return true; // Paper - ignore if entity is hidden from player
if (player.isSpectator()) {
return false;
} else if (!entity.isSpectator() && !entity.hasIndirectPassenger(player)) {