diff --git a/paper-server/patches/sources/net/minecraft/server/commands/WaypointCommand.java.patch b/paper-server/patches/sources/net/minecraft/server/commands/WaypointCommand.java.patch new file mode 100644 index 000000000..c5eb7abe8 --- /dev/null +++ b/paper-server/patches/sources/net/minecraft/server/commands/WaypointCommand.java.patch @@ -0,0 +1,11 @@ +--- a/net/minecraft/server/commands/WaypointCommand.java ++++ b/net/minecraft/server/commands/WaypointCommand.java +@@ -165,7 +_,7 @@ + } + + private static void mutateIcon(CommandSourceStack source, WaypointTransmitter waypoint, Consumer mutator) { +- ServerLevel level = source.getLevel(); ++ ServerLevel level = (waypoint instanceof LivingEntity livingEntity) ? (net.minecraft.server.level.ServerLevel) livingEntity.level() : source.getLevel(); // Paper - MC-300685 use level of waypoint if it's a living entity for broadcast + level.getWaypointManager().untrackWaypoint(waypoint); + mutator.accept(waypoint.waypointIcon()); + level.getWaypointManager().trackWaypoint(waypoint);