aboutsummaryrefslogtreecommitdiff
path: root/src/main/kotlin
diff options
context:
space:
mode:
authornea <nea@nea.moe>2023-04-26 00:53:12 +0200
committernea <nea@nea.moe>2023-04-26 00:53:12 +0200
commitfc745da88b19064f3015f918b4f090f2c4666524 (patch)
tree501091c82d82cc47e1947d8f03609c4a2b1118a4 /src/main/kotlin
parentb12f18fdbc60f141657ecfbd18590724666b593d (diff)
downloadNotEnoughUpdates-fc745da88b19064f3015f918b4f090f2c4666524.tar.gz
NotEnoughUpdates-fc745da88b19064f3015f918b4f090f2c4666524.tar.bz2
NotEnoughUpdates-fc745da88b19064f3015f918b4f090f2c4666524.zip
Make ruler not work cross plot
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 a5ff48d2..ef3c78ab 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)