mirror of
https://github.com/PaperMC/Paper.git
synced 2025-09-20 15:49:46 +00:00
12 lines
734 B
Diff
12 lines
734 B
Diff
--- 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<Waypoint.Icon> 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);
|