aboutsummaryrefslogtreecommitdiff
path: root/src/main/kotlin
diff options
context:
space:
mode:
authorLinnea Gräf <nea@nea.moe>2024-04-11 22:34:10 +0200
committerLinnea Gräf <nea@nea.moe>2024-04-11 22:34:10 +0200
commit5c3de0cc4fbc3fbbf7d970aa9c83ad3f24e9cc81 (patch)
tree234cc45b131a9b63d862602cba224e26247b9c63 /src/main/kotlin
parent658d51d0186aeaa7b23358d8200e157e6d709836 (diff)
downloadneuhax-5c3de0cc4fbc3fbbf7d970aa9c83ad3f24e9cc81.tar.gz
neuhax-5c3de0cc4fbc3fbbf7d970aa9c83ad3f24e9cc81.tar.bz2
neuhax-5c3de0cc4fbc3fbbf7d970aa9c83ad3f24e9cc81.zip
Add mineshaft waypoints
Diffstat (limited to 'src/main/kotlin')
-rw-r--r--src/main/kotlin/moe/nea/sky/NEUHax.kt2
-rw-r--r--src/main/kotlin/moe/nea/sky/config/WallhackConfig.kt5
-rw-r--r--src/main/kotlin/moe/nea/sky/features/world/MineshaftWallhacks.kt43
3 files changed, 50 insertions, 0 deletions
diff --git a/src/main/kotlin/moe/nea/sky/NEUHax.kt b/src/main/kotlin/moe/nea/sky/NEUHax.kt
index ac1551c..0a478c5 100644
--- a/src/main/kotlin/moe/nea/sky/NEUHax.kt
+++ b/src/main/kotlin/moe/nea/sky/NEUHax.kt
@@ -27,6 +27,7 @@ import moe.nea.sky.features.gui.Enchanting
import moe.nea.sky.features.gui.Melody
import moe.nea.sky.features.meta.AutoUpdate
import moe.nea.sky.features.world.AutoFishing
+import moe.nea.sky.features.world.MineshaftWallhacks
import moe.nea.sky.features.world.YawSnapping
import moe.nea.sky.util.CommandActionRegistry
import moe.nea.sky.util.MetaAnnotationUtil
@@ -93,6 +94,7 @@ object NEUHax {
Enchanting,
AutoFishing,
YawSnapping,
+ MineshaftWallhacks,
AutoUpdate,
Melody,
).forEach {
diff --git a/src/main/kotlin/moe/nea/sky/config/WallhackConfig.kt b/src/main/kotlin/moe/nea/sky/config/WallhackConfig.kt
index 4d68f78..ec86f74 100644
--- a/src/main/kotlin/moe/nea/sky/config/WallhackConfig.kt
+++ b/src/main/kotlin/moe/nea/sky/config/WallhackConfig.kt
@@ -10,4 +10,9 @@ class WallhackConfig {
@ConfigEditorBoolean
var neuWorld = false
+ @Expose
+ @ConfigOption(name = "Mineshaft Wallhacks", desc = "Show Frozen Corpses through walls")
+ @ConfigEditorBoolean
+ var mineshaft = false
+
}
diff --git a/src/main/kotlin/moe/nea/sky/features/world/MineshaftWallhacks.kt b/src/main/kotlin/moe/nea/sky/features/world/MineshaftWallhacks.kt
new file mode 100644
index 0000000..22fa9b2
--- /dev/null
+++ b/src/main/kotlin/moe/nea/sky/features/world/MineshaftWallhacks.kt
@@ -0,0 +1,43 @@
+package moe.nea.sky.features.world
+
+import io.github.moulberry.notenoughupdates.core.util.render.RenderUtils
+import io.github.moulberry.notenoughupdates.util.ItemUtils
+import io.github.moulberry.notenoughupdates.util.SBInfo
+import moe.nea.sky.NEUHax
+import net.minecraft.client.Minecraft
+import net.minecraft.entity.item.EntityArmorStand
+import net.minecraftforge.client.event.RenderWorldLastEvent
+import net.minecraftforge.fml.common.eventhandler.SubscribeEvent
+
+object MineshaftWallhacks {
+ data class Corpse(
+ val color: Int,
+ val name: String,
+ )
+
+ val colors = mapOf(
+ "§5Mineral Helmet" to Corpse(0x80707070.toInt(), "Tungsten"),
+ "§aLapis Armor Helmet" to Corpse(0x800000AA.toInt(), "Lapis"),
+ "§5Yog Helmet" to Corpse(0x80AA8000.toInt(), "Umber"),
+ )
+
+ @SubscribeEvent
+ fun highlightMob(event: RenderWorldLastEvent) {
+ if (!NEUHax.config.instance.wallhacks.mineshaft) return
+ if (SBInfo.getInstance().getLocation() != "mineshaft") return
+ val world = Minecraft.getMinecraft().theWorld ?: return
+ for (entity in world.getEntities(EntityArmorStand::class.java) {
+ it != null && !it.isInvisible
+ }) {
+ val headName = ItemUtils.getDisplayName(entity.getCurrentArmor(3)?.tagCompound) ?: continue
+ val color = colors[headName] ?: continue
+ RenderUtils.renderBoundingBox(
+ entity.position,
+ color.color,
+ event.partialTicks,
+ true
+ )
+ RenderUtils.renderWayPoint(color.name, entity.position, event.partialTicks)
+ }
+ }
+} \ No newline at end of file