From 158693dc3fc2605889cde4c981fd0463f1738a9a Mon Sep 17 00:00:00 2001 From: hannibal2 <24389977+hannibal00212@users.noreply.github.com> Date: Sun, 10 Dec 2023 03:11:30 +0100 Subject: Added support for /shworldedit left/right --- .../java/at/hannibal2/skyhanni/config/commands/Commands.kt | 2 +- src/main/java/at/hannibal2/skyhanni/test/WorldEdit.kt | 11 +++++++++++ 2 files changed, 12 insertions(+), 1 deletion(-) diff --git a/src/main/java/at/hannibal2/skyhanni/config/commands/Commands.kt b/src/main/java/at/hannibal2/skyhanni/config/commands/Commands.kt index 77b189589..3dba2e047 100644 --- a/src/main/java/at/hannibal2/skyhanni/config/commands/Commands.kt +++ b/src/main/java/at/hannibal2/skyhanni/config/commands/Commands.kt @@ -278,7 +278,7 @@ object Commands { "shworldedit", "Select regions in the world", { WorldEdit.command(it) }, - { listOf("copy", "reset", "help") }) + { listOf("copy", "reset", "help", "left", "right") }) registerCommand( "shconfigsave", "Manually saving the config" diff --git a/src/main/java/at/hannibal2/skyhanni/test/WorldEdit.kt b/src/main/java/at/hannibal2/skyhanni/test/WorldEdit.kt index 283698668..8a26e474c 100644 --- a/src/main/java/at/hannibal2/skyhanni/test/WorldEdit.kt +++ b/src/main/java/at/hannibal2/skyhanni/test/WorldEdit.kt @@ -4,6 +4,7 @@ import at.hannibal2.skyhanni.data.ClickType import at.hannibal2.skyhanni.events.BlockClickEvent import at.hannibal2.skyhanni.events.withAlpha import at.hannibal2.skyhanni.utils.ClipboardUtils +import at.hannibal2.skyhanni.utils.LocationUtils import at.hannibal2.skyhanni.utils.LorenzUtils import at.hannibal2.skyhanni.utils.RenderUtils import at.hannibal2.skyhanni.utils.RenderUtils.expandBlock @@ -106,6 +107,16 @@ object WorldEdit { LorenzUtils.chat("Reset selected region") } + "left", "pos1" -> { + leftPos = LocationUtils.playerLocation().toBlockPos() + LorenzUtils.chat("Set left pos.") + } + + "right", "pos2" -> { + leftPos = LocationUtils.playerLocation().toBlockPos() + LorenzUtils.chat("Set right pos.") + } + else -> { LorenzUtils.chat("Unknown subcommand") } -- cgit