aboutsummaryrefslogtreecommitdiff
diff options
context:
space:
mode:
-rw-r--r--src/main/kotlin/dulkirmod/DulkirMod.kt1
-rw-r--r--src/main/kotlin/dulkirmod/config/DulkirConfig.kt16
-rw-r--r--src/main/kotlin/dulkirmod/features/MemoryLeakFix.kt30
-rw-r--r--src/main/kotlin/dulkirmod/features/StarredMobBoxes.kt69
-rw-r--r--src/main/kotlin/dulkirmod/utils/WorldRenderUtils.kt8
5 files changed, 115 insertions, 9 deletions
diff --git a/src/main/kotlin/dulkirmod/DulkirMod.kt b/src/main/kotlin/dulkirmod/DulkirMod.kt
index 70e029e..76b2ce1 100644
--- a/src/main/kotlin/dulkirmod/DulkirMod.kt
+++ b/src/main/kotlin/dulkirmod/DulkirMod.kt
@@ -87,6 +87,7 @@ class DulkirMod {
mcBus.register(WorldRenderUtils)
mcBus.register(IchorHighlight)
mcBus.register(SteakDisplay)
+ mcBus.register(StarredMobBoxes)
keyBinds.forEach(ClientRegistry::registerKeyBinding)
}
diff --git a/src/main/kotlin/dulkirmod/config/DulkirConfig.kt b/src/main/kotlin/dulkirmod/config/DulkirConfig.kt
index 1306b53..2a4bb1c 100644
--- a/src/main/kotlin/dulkirmod/config/DulkirConfig.kt
+++ b/src/main/kotlin/dulkirmod/config/DulkirConfig.kt
@@ -31,6 +31,14 @@ object DulkirConfig : Config(Mod("DulkirMod", ModType.SKYBLOCK), "dulkirmod-conf
var blankStandRemoval = true
@Switch(
+ name = "Debug Armor stands",
+ description = "Another hypixel issue, should be a significant fps boost in relevant scenarios.",
+ category = "General",
+ subcategory = "General"
+ )
+ var debugStandRemoval = false
+
+ @Switch(
name = "Hide Enchant Rune Particles",
description = "ugly go bye-bye",
category = "General",
@@ -117,6 +125,14 @@ object DulkirConfig : Config(Mod("DulkirMod", ModType.SKYBLOCK), "dulkirmod-conf
var hideHeartParticles = false
@Switch(
+ name = "Starred Mob Boxes",
+ description = "Self Explanatory, NOT esp",
+ category = "Dungeons",
+ subcategory = "Dungeons"
+ )
+ var starredBoxes = false
+
+ @Switch(
name = "Throttle Notifier",
description = "Im pretty sure this is mostly patched? Idk I'm leaving it in",
category = "Dungeons",
diff --git a/src/main/kotlin/dulkirmod/features/MemoryLeakFix.kt b/src/main/kotlin/dulkirmod/features/MemoryLeakFix.kt
index 0c7fcb9..5edde33 100644
--- a/src/main/kotlin/dulkirmod/features/MemoryLeakFix.kt
+++ b/src/main/kotlin/dulkirmod/features/MemoryLeakFix.kt
@@ -2,10 +2,13 @@ package dulkirmod.features
import dulkirmod.DulkirMod.Companion.mc
import dulkirmod.config.DulkirConfig
+import dulkirmod.utils.WorldRenderUtils
import net.minecraft.entity.Entity
import net.minecraft.entity.item.EntityArmorStand
+import net.minecraftforge.client.event.RenderLivingEvent
import net.minecraftforge.fml.common.eventhandler.SubscribeEvent
import net.minecraftforge.fml.common.gameevent.TickEvent
+import java.awt.Color
object MemoryLeakFix {
private var lastClear = System.currentTimeMillis()
@@ -39,9 +42,34 @@ object MemoryLeakFix {
val currentEnts = world.loadedEntityList
currentEnts.forEach {
if (it !is EntityArmorStand) return@forEach
- if (it.name != "Armor Stand") return@forEach
+ if (it.hasCustomName()) return@forEach
if (it.inventory.any{slot -> slot != null}) return@forEach
+ if (it.ticksExisted < 1200) return@forEach
world.removeEntityFromWorld(it.entityId)
}
}
+
+ @SubscribeEvent
+ fun displayBlankStands(event: RenderLivingEvent.Post<*>) {
+ if (!DulkirConfig.debugStandRemoval) return
+ if (event.entity !is EntityArmorStand) return
+ if (event.entity.hasCustomName()) return
+ if (event.entity.inventory.any{slot -> slot != null}) return
+ val pos = WorldRenderUtils.fixRenderPos(event.x, event.y, event.z)
+ val x = pos[0]
+ val y = pos[1]
+ val z = pos[2]
+
+ WorldRenderUtils.drawCustomBox(
+ x - .5,
+ 1.0,
+ y - .5,
+ 1.0,
+ z - .5,
+ 1.0,
+ Color(15, 247, 236, 255),
+ 3f,
+ phase = true
+ )
+ }
} \ No newline at end of file
diff --git a/src/main/kotlin/dulkirmod/features/StarredMobBoxes.kt b/src/main/kotlin/dulkirmod/features/StarredMobBoxes.kt
new file mode 100644
index 0000000..a9aa932
--- /dev/null
+++ b/src/main/kotlin/dulkirmod/features/StarredMobBoxes.kt
@@ -0,0 +1,69 @@
+package dulkirmod.features
+
+import dulkirmod.config.DulkirConfig
+import dulkirmod.utils.TabListUtils
+import dulkirmod.utils.WorldRenderUtils
+import net.minecraftforge.client.event.RenderLivingEvent
+import net.minecraftforge.fml.common.eventhandler.SubscribeEvent
+import java.awt.Color
+
+object StarredMobBoxes {
+ @SubscribeEvent
+ fun render(event: RenderLivingEvent.Post<*>) {
+ if (!DulkirConfig.starredBoxes) return
+ if (TabListUtils.area != "Dungeon") return
+ val name = event.entity.name ?: return
+ if (name.startsWith("§6✯ ") && name.endsWith("§c❤")) {
+ val newPos = WorldRenderUtils.fixRenderPos(event.x, event.y, event.z)
+ val x = newPos[0]
+ val y = newPos[1]
+ val z = newPos[2]
+
+ if ("Spider" in name) {
+// x - 0.625,
+// y - 1,
+// z - 0.625,
+// x + 0.625,
+// y - 0.25,
+// z + 0.625
+ WorldRenderUtils.drawCustomBox(
+ x - .625,
+ 1.25,
+ y - 1,
+ .75,
+ z - .625,
+ 1.25,
+ Color(15, 247, 236, 255),
+ 3f,
+ phase = false
+ )
+ } else if ("Fels" in name || "Withermancer" in name) {
+ //AxisAlignedBB(x - 0.5, y - 3, z - 0.5, x + 0.5, y, z + 0.5),
+ WorldRenderUtils.drawCustomBox(
+ x - .5,
+ 1.0,
+ y - 3,
+ 3.0,
+ z - .5,
+ 1.0,
+ Color(15, 247, 236, 255),
+ 3f,
+ phase = false
+ )
+ } else {
+ //AxisAlignedBB(x - 0.5, y - 2, z - 0.5, x + 0.5, y, z + 0.5),
+ WorldRenderUtils.drawCustomBox(
+ x - .5,
+ 1.0,
+ y - 2,
+ 2.0,
+ z - .5,
+ 1.0,
+ Color(15, 247, 236, 255),
+ 3f,
+ phase = false
+ )
+ }
+ }
+ }
+} \ No newline at end of file
diff --git a/src/main/kotlin/dulkirmod/utils/WorldRenderUtils.kt b/src/main/kotlin/dulkirmod/utils/WorldRenderUtils.kt
index 229b380..7cb00f7 100644
--- a/src/main/kotlin/dulkirmod/utils/WorldRenderUtils.kt
+++ b/src/main/kotlin/dulkirmod/utils/WorldRenderUtils.kt
@@ -10,8 +10,6 @@ import net.minecraft.client.renderer.WorldRenderer
import net.minecraft.client.renderer.entity.RenderManager
import net.minecraft.client.renderer.vertex.DefaultVertexFormats
import net.minecraft.util.Vec3
-import net.minecraftforge.client.event.RenderWorldLastEvent
-import net.minecraftforge.fml.common.eventhandler.SubscribeEvent
import org.lwjgl.opengl.GL11
import java.awt.Color
@@ -23,7 +21,6 @@ class WorldRenderUtils {
private val tessellator: Tessellator = Tessellator.getInstance()
private val worldRenderer: WorldRenderer = tessellator.worldRenderer
private val renderManager: RenderManager = mc.renderManager
- var partialTicks: Float = 0f
fun renderString(
location: Vec3,
text: String,
@@ -177,11 +174,6 @@ class WorldRenderUtils {
GlStateManager.popMatrix()
}
- @SubscribeEvent
- fun grabPartialTicks(event: RenderWorldLastEvent) {
- this.partialTicks = event.partialTicks
- }
-
fun getRenderX() : Double {
return (mc.renderManager as AccessorRenderManager).renderX
}