aboutsummaryrefslogtreecommitdiff
path: root/src/main/kotlin
diff options
context:
space:
mode:
authorRoman / Linnea Gräf <roman.graef@gmail.com>2023-05-27 19:23:19 +0200
committerGitHub <noreply@github.com>2023-05-27 19:23:19 +0200
commit3740ac08399d4c16802729511b5032e8f8ac6e14 (patch)
tree8d0a4d17cdc45583954915ef6052514e7e644cd9 /src/main/kotlin
parent94c73a6eebe4ef07ea867036700bf24ab8b9db23 (diff)
downloadNotEnoughUpdates-3740ac08399d4c16802729511b5032e8f8ac6e14.tar.gz
NotEnoughUpdates-3740ac08399d4c16802729511b5032e8f8ac6e14.tar.bz2
NotEnoughUpdates-3740ac08399d4c16802729511b5032e8f8ac6e14.zip
Make builders ruler not work cross plot (#691)
Diffstat (limited to 'src/main/kotlin')
-rw-r--r--src/main/kotlin/io/github/moulberry/notenoughupdates/commands/dev/DevTestCommand.kt8
1 files changed, 8 insertions, 0 deletions
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)