diff options
Diffstat (limited to 'src/main')
-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 |