mirror of
https://github.com/PaperMC/Folia.git
synced 2025-01-03 18:47:36 +01:00
Avoid off-region chunk read for paper entity command
Allow usage of the specific entity command
This commit is contained in:
parent
dc7eeddb96
commit
e8e6ac4006
@ -2824,6 +2824,19 @@ index bbb8b1933ef33a3b91f69545f69dd3cfb84b27f5..b23b76a598731da8feef53c370b34123
|
||||
}
|
||||
|
||||
public static void registerCommands(final MinecraftServer server) {
|
||||
diff --git a/src/main/java/io/papermc/paper/command/subcommands/EntityCommand.java b/src/main/java/io/papermc/paper/command/subcommands/EntityCommand.java
|
||||
index 5f43aedc6596e2b1ac7af9711515714752c262e3..e71265c6f248a909aa3017a3cceacb8c0850d6e2 100644
|
||||
--- a/src/main/java/io/papermc/paper/command/subcommands/EntityCommand.java
|
||||
+++ b/src/main/java/io/papermc/paper/command/subcommands/EntityCommand.java
|
||||
@@ -129,7 +129,7 @@ public final class EntityCommand implements PaperSubcommand {
|
||||
final int z = (e.getKey().z << 4) + 8;
|
||||
final Component message = text(" " + e.getValue() + ": " + e.getKey().x + ", " + e.getKey().z + (chunkProviderServer.isPositionTicking(e.getKey().toLong()) ? " (Ticking)" : " (Non-Ticking)"))
|
||||
.hoverEvent(HoverEvent.showText(text("Click to teleport to chunk", GREEN)))
|
||||
- .clickEvent(ClickEvent.clickEvent(ClickEvent.Action.RUN_COMMAND, "/minecraft:execute as @s in " + world.getWorld().getKey() + " run tp " + x + " " + (world.getWorld().getHighestBlockYAt(x, z, HeightMap.MOTION_BLOCKING) + 1) + " " + z));
|
||||
+ .clickEvent(ClickEvent.clickEvent(ClickEvent.Action.RUN_COMMAND, "/minecraft:execute as @s in " + world.getWorld().getKey() + " run tp " + x + " " + (128) + " " + z)); // Folia - region threading - avoid sync load here
|
||||
sender.sendMessage(message);
|
||||
});
|
||||
} else {
|
||||
diff --git a/src/main/java/io/papermc/paper/command/subcommands/HeapDumpCommand.java b/src/main/java/io/papermc/paper/command/subcommands/HeapDumpCommand.java
|
||||
index cd2e4d792e972b8bf1e07b8961594a670ae949cf..3ab8dbf2768a4ef8fb53af6f5431f7f6afe6d168 100644
|
||||
--- a/src/main/java/io/papermc/paper/command/subcommands/HeapDumpCommand.java
|
||||
|
Loading…
Reference in New Issue
Block a user