|
7 | 7 | import com.mojang.brigadier.exceptions.CommandSyntaxException; |
8 | 8 | import dev.ryanhcode.sable.api.command.SableCommandHelper; |
9 | 9 | import dev.ryanhcode.sable.api.command.SubLevelArgumentType; |
10 | | -import dev.ryanhcode.sable.companion.math.Pose3dc; |
11 | 10 | import dev.ryanhcode.sable.api.physics.handle.RigidBodyHandle; |
12 | 11 | import dev.ryanhcode.sable.api.sublevel.ServerSubLevelContainer; |
| 12 | +import dev.ryanhcode.sable.companion.math.Pose3dc; |
13 | 13 | import dev.ryanhcode.sable.network.packets.tcp.ClientboundEnterGizmoPacket; |
14 | 14 | import dev.ryanhcode.sable.network.packets.udp.SableUDPEchoPacket; |
15 | 15 | import dev.ryanhcode.sable.network.udp.SableUDPServer; |
|
29 | 29 | import org.joml.Vector3dc; |
30 | 30 |
|
31 | 31 | import java.util.Collection; |
| 32 | +import java.util.Formatter; |
| 33 | +import java.util.Locale; |
32 | 34 |
|
33 | 35 | public class SableCommand { |
34 | 36 |
|
@@ -81,7 +83,7 @@ public static void register(final CommandDispatcher<CommandSourceStack> dispatch |
81 | 83 | final ResourceLocation dimension = subLevel.getLevel().dimension().location(); |
82 | 84 | final GlobalSavedSubLevelPointer pointer = subLevel.getLastSerializationPointer(); |
83 | 85 | final Component fileId = Component.translatable("commands.sable.info.name.tooltip", pointer != null ? pointer.toString() : "None yet"); |
84 | | - component.setStyle(Style.EMPTY.withClickEvent(new ClickEvent(ClickEvent.Action.SUGGEST_COMMAND, "/execute in %s run tp @s %.2f %.2f %.2f".formatted(dimension, pos.x(), pos.y(), pos.z()))) |
| 86 | + component.setStyle(Style.EMPTY.withClickEvent(new ClickEvent(ClickEvent.Action.SUGGEST_COMMAND, new Formatter().format(Locale.ROOT, "/execute in %s run tp @s %.2f %.2f %.2f", dimension, pos.x(), pos.y(), pos.z()).toString())) |
85 | 87 | .withHoverEvent(new HoverEvent(HoverEvent.Action.SHOW_TEXT, fileId)) |
86 | 88 | .withColor(ChatFormatting.GRAY)); |
87 | 89 | return component; |
|
0 commit comments