diff options
| author | hannibal2 <24389977+hannibal00212@users.noreply.github.com> | 2023-02-11 01:29:12 +0100 |
|---|---|---|
| committer | hannibal2 <24389977+hannibal00212@users.noreply.github.com> | 2023-02-11 01:29:12 +0100 |
| commit | d417e6622ea2f98fee4f0e863858fd168d7f45b8 (patch) | |
| tree | 589dcd632d8d63d5e8d05562f5e5b8e5c175735d | |
| parent | e9af5bd4d0f5c095adeacc94020ba24bbb57c19d (diff) | |
| download | SkyHanni-d417e6622ea2f98fee4f0e863858fd168d7f45b8.tar.gz SkyHanni-d417e6622ea2f98fee4f0e863858fd168d7f45b8.tar.bz2 SkyHanni-d417e6622ea2f98fee4f0e863858fd168d7f45b8.zip | |
Added command /copyentities
| -rw-r--r-- | src/main/java/at/hannibal2/skyhanni/config/commands/Commands.kt | 1 | ||||
| -rw-r--r-- | src/main/java/at/hannibal2/skyhanni/test/LorenzTest.kt | 15 |
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 |
