From 3740ac08399d4c16802729511b5032e8f8ac6e14 Mon Sep 17 00:00:00 2001 From: Roman / Linnea Gräf Date: Sat, 27 May 2023 19:23:19 +0200 Subject: Make builders ruler not work cross plot (#691) --- .../moulberry/notenoughupdates/commands/dev/DevTestCommand.kt | 8 ++++++++ 1 file changed, 8 insertions(+) (limited to 'src/main/kotlin') diff --git a/src/main/kotlin/io/github/moulberry/notenoughupdates/commands/dev/DevTestCommand.kt b/src/main/kotlin/io/github/moulberry/notenoughupdates/commands/dev/DevTestCommand.kt index 93c4ab90..bc1a0c74 100644 --- a/src/main/kotlin/io/github/moulberry/notenoughupdates/commands/dev/DevTestCommand.kt +++ b/src/main/kotlin/io/github/moulberry/notenoughupdates/commands/dev/DevTestCommand.kt @@ -47,6 +47,7 @@ import net.minecraftforge.common.MinecraftForge import net.minecraftforge.fml.common.eventhandler.SubscribeEvent import java.util.function.Predicate import kotlin.math.floor +import kotlin.math.nextDown @NEUAutoSubscribe class DevTestCommand { @@ -107,6 +108,13 @@ class DevTestCommand { requires { canPlayerExecute(it) } + thenLiteralExecute("garden") { + val player = Minecraft.getMinecraft().thePlayer + reply("Is in Garden: ${SBInfo.getInstance().getLocation() == "garden"}") + val pp = player.position + reply("Plot X: ${floor((pp.getX() + 48) / 96F)}") + reply("Plot Z: ${floor((pp.getZ() + 48) / 96F)}") + }.withHelp("Show diagnostics information about the garden") thenLiteralExecute("profileinfo") { val currentProfile = SBInfo.getInstance().currentProfile val gamemode = SBInfo.getInstance().getGamemodeForProfile(currentProfile) -- cgit