aboutsummaryrefslogtreecommitdiff
path: root/src/main/java/at/hannibal2
diff options
context:
space:
mode:
authorhannibal2 <24389977+hannibal00212@users.noreply.github.com>2023-02-11 01:29:12 +0100
committerhannibal2 <24389977+hannibal00212@users.noreply.github.com>2023-02-11 01:29:12 +0100
commit2903229cd341c2f3384c5767833c5863b6559c45 (patch)
tree589dcd632d8d63d5e8d05562f5e5b8e5c175735d /src/main/java/at/hannibal2
parent36f1f795ac569c712d86d02192082e233a5f17d8 (diff)
downloadskyhanni-2903229cd341c2f3384c5767833c5863b6559c45.tar.gz
skyhanni-2903229cd341c2f3384c5767833c5863b6559c45.tar.bz2
skyhanni-2903229cd341c2f3384c5767833c5863b6559c45.zip
Added command /copyentities
Diffstat (limited to 'src/main/java/at/hannibal2')
-rw-r--r--src/main/java/at/hannibal2/skyhanni/config/commands/Commands.kt1
-rw-r--r--src/main/java/at/hannibal2/skyhanni/test/LorenzTest.kt15
2 files changed, 12 insertions, 4 deletions
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 787d1000f..510f66f0d 100644
--- a/src/main/java/at/hannibal2/skyhanni/config/commands/Commands.kt
+++ b/src/main/java/at/hannibal2/skyhanni/config/commands/Commands.kt
@@ -33,6 +33,7 @@ object Commands {
registerCommand("shreloadlocalrepo") { SkyHanniMod.repo.reloadLocalRepo() }
registerCommand("shupdaterepo") { SkyHanniMod.repo.updateRepo() }
registerCommand("testhanni") { LorenzTest.testCommand(it) }
+ registerCommand("copylocation") { LorenzTest.copyLocation() }
registerCommand("copyentities") { CopyNearbyEntitiesCommand.command(it) }
registerCommand("copyitem") { CopyItemCommand.command(it) }
registerCommand("shconfigsave") { SkyHanniMod.configManager.saveConfig() }
diff --git a/src/main/java/at/hannibal2/skyhanni/test/LorenzTest.kt b/src/main/java/at/hannibal2/skyhanni/test/LorenzTest.kt
index f72430139..983459531 100644
--- a/src/main/java/at/hannibal2/skyhanni/test/LorenzTest.kt
+++ b/src/main/java/at/hannibal2/skyhanni/test/LorenzTest.kt
@@ -5,12 +5,11 @@ import at.hannibal2.skyhanni.events.LorenzChatEvent
import at.hannibal2.skyhanni.events.PacketEvent
import at.hannibal2.skyhanni.events.PlaySoundEvent
import at.hannibal2.skyhanni.events.ReceiveParticleEvent
-import at.hannibal2.skyhanni.utils.LocationUtils
-import at.hannibal2.skyhanni.utils.LorenzDebug
-import at.hannibal2.skyhanni.utils.LorenzLogger
-import at.hannibal2.skyhanni.utils.LorenzUtils
+import at.hannibal2.skyhanni.utils.*
+import at.hannibal2.skyhanni.utils.LorenzUtils.round
import at.hannibal2.skyhanni.utils.RenderUtils.renderString
import net.minecraft.nbt.NBTTagCompound
+import net.minecraft.util.EnumParticleTypes
import net.minecraftforge.client.event.RenderGameOverlayEvent
import net.minecraftforge.common.MinecraftForge
import net.minecraftforge.event.entity.living.EnderTeleportEvent
@@ -114,6 +113,14 @@ class LorenzTest {
}
LorenzUtils.chat("§e[SkyHanni] stopped ${modules.size} listener classes.")
}
+
+ fun copyLocation() {
+ val location = LocationUtils.playerLocation()
+ val x = LorenzUtils.formatDouble(location.x.round(1), "0.0")
+ val y = LorenzUtils.formatDouble(location.y.round(1), "0.0")
+ val z = LorenzUtils.formatDouble(location.z.round(1), "0.0")
+ OSUtils.copyToClipboard("LorenzVec($x, $y, $z)")
+ }
}
@SubscribeEvent