diff options
author | hannibal2 <24389977+hannibal00212@users.noreply.github.com> | 2024-01-11 10:06:57 +0100 |
---|---|---|
committer | hannibal2 <24389977+hannibal00212@users.noreply.github.com> | 2024-01-11 10:06:57 +0100 |
commit | 8ee609dbba93a0e2d46b887fa5f605a023dd77f5 (patch) | |
tree | ced3a061e99bcbe4e2eca6f103a8f6b353cc06e5 /src/main/java/at/hannibal2/skyhanni/features | |
parent | 2555c80da022c5ba005056fcd73bb97d4a60cdd0 (diff) | |
download | skyhanni-8ee609dbba93a0e2d46b887fa5f605a023dd77f5.tar.gz skyhanni-8ee609dbba93a0e2d46b887fa5f605a023dd77f5.tar.bz2 skyhanni-8ee609dbba93a0e2d46b887fa5f605a023dd77f5.zip |
Added debug command /shtestburrow
Diffstat (limited to 'src/main/java/at/hannibal2/skyhanni/features')
-rw-r--r-- | src/main/java/at/hannibal2/skyhanni/features/event/diana/GriffinBurrowHelper.kt | 36 |
1 files changed, 36 insertions, 0 deletions
diff --git a/src/main/java/at/hannibal2/skyhanni/features/event/diana/GriffinBurrowHelper.kt b/src/main/java/at/hannibal2/skyhanni/features/event/diana/GriffinBurrowHelper.kt index b611f77ee..ad9a482bc 100644 --- a/src/main/java/at/hannibal2/skyhanni/features/event/diana/GriffinBurrowHelper.kt +++ b/src/main/java/at/hannibal2/skyhanni/features/event/diana/GriffinBurrowHelper.kt @@ -3,6 +3,7 @@ package at.hannibal2.skyhanni.features.event.diana import at.hannibal2.skyhanni.SkyHanniMod import at.hannibal2.skyhanni.config.ConfigUpdaterMigrator import at.hannibal2.skyhanni.data.EntityMovementData +import at.hannibal2.skyhanni.data.IslandType import at.hannibal2.skyhanni.events.BurrowDetectEvent import at.hannibal2.skyhanni.events.BurrowDugEvent import at.hannibal2.skyhanni.events.BurrowGuessEvent @@ -18,6 +19,7 @@ import at.hannibal2.skyhanni.utils.LocationUtils.distanceToPlayer import at.hannibal2.skyhanni.utils.LorenzColor import at.hannibal2.skyhanni.utils.LorenzUtils import at.hannibal2.skyhanni.utils.LorenzUtils.editCopy +import at.hannibal2.skyhanni.utils.LorenzUtils.isInIsland import at.hannibal2.skyhanni.utils.LorenzVec import at.hannibal2.skyhanni.utils.RenderUtils.draw3DLine import at.hannibal2.skyhanni.utils.RenderUtils.drawColor @@ -246,4 +248,38 @@ object GriffinBurrowHelper { } private fun isEnabled() = DianaAPI.isDoingDiana() + + fun setTestBurrow(strings: Array<String>) { + if (!IslandType.HUB.isInIsland()) { + LorenzUtils.userError("You can only create test burrows on the hub island!") + return + } + + if (strings.size != 1) { + LorenzUtils.userError("/shtestburrow <type>") + return + } + + val type: BurrowType = when (strings[0].lowercase()) { + "reset" -> { + particleBurrows = emptyMap() + update() + LorenzUtils.chat("Manually reset all burrow waypoints.") + return + } + "1", "start" -> BurrowType.START + "2", "mob" -> BurrowType.MOB + "3", "treasure" -> BurrowType.TREASURE + else -> { + LorenzUtils.userError("Unknown burrow type! Try 1-3 instead.") + return + } + } + + + EntityMovementData.addToTrack(Minecraft.getMinecraft().thePlayer) + val location = LocationUtils.playerLocation().roundLocation() + particleBurrows = particleBurrows.editCopy { this[location] = type } + update() + } } |