aboutsummaryrefslogtreecommitdiff
path: root/src/main/java/at/hannibal2/skyhanni/features
diff options
context:
space:
mode:
Diffstat (limited to 'src/main/java/at/hannibal2/skyhanni/features')
-rw-r--r--src/main/java/at/hannibal2/skyhanni/features/FireVeilWandParticles.kt32
-rw-r--r--src/main/java/at/hannibal2/skyhanni/features/nether/ashfang/AshfangGravityOrbs.kt15
2 files changed, 8 insertions, 39 deletions
diff --git a/src/main/java/at/hannibal2/skyhanni/features/FireVeilWandParticles.kt b/src/main/java/at/hannibal2/skyhanni/features/FireVeilWandParticles.kt
index ff4c80d69..d7af6d6c3 100644
--- a/src/main/java/at/hannibal2/skyhanni/features/FireVeilWandParticles.kt
+++ b/src/main/java/at/hannibal2/skyhanni/features/FireVeilWandParticles.kt
@@ -8,12 +8,10 @@ import at.hannibal2.skyhanni.utils.LorenzUtils
import at.hannibal2.skyhanni.utils.RenderUtils
import at.hannibal2.skyhanni.utils.SpecialColour
import net.minecraft.client.Minecraft
-import net.minecraft.client.renderer.GlStateManager
import net.minecraft.network.play.server.S2APacketParticles
import net.minecraft.util.EnumParticleTypes
import net.minecraftforge.client.event.RenderWorldLastEvent
import net.minecraftforge.fml.common.eventhandler.SubscribeEvent
-import org.lwjgl.opengl.GL11
import java.awt.Color
class FireVeilWandParticles {
@@ -58,33 +56,9 @@ class FireVeilWandParticles {
if (SkyHanniMod.feature.abilities.fireVeilWandDisplay != 1) return
if (System.currentTimeMillis() > lastClick + 5_500) return
- val color = Color(SpecialColour.specialToChromaRGB(SkyHanniMod.feature.abilities.fireVeilWandDisplayColor), true)
+ val color =
+ Color(SpecialColour.specialToChromaRGB(SkyHanniMod.feature.abilities.fireVeilWandDisplayColor), true)
- GlStateManager.pushMatrix()
- GL11.glNormal3f(0.0f, 1.0f, 0.0f)
-
- GlStateManager.enableDepth()
- GlStateManager.enableBlend()
- GlStateManager.depthFunc(GL11.GL_LEQUAL)
- GlStateManager.disableCull()
- GlStateManager.tryBlendFuncSeparate(770, 771, 1, 0)
- GlStateManager.enableAlpha()
- GlStateManager.disableTexture2D()
-
- GlStateManager.disableDepth()
- RenderUtils.drawCircle(
- Minecraft.getMinecraft().thePlayer,
- event.partialTicks,
- 3.5,
- color
- )
- GlStateManager.enableDepth()
-
- GlStateManager.enableCull()
- GlStateManager.enableTexture2D()
- GlStateManager.enableDepth()
- GlStateManager.disableBlend()
- GlStateManager.color(1.0f, 1.0f, 1.0f, 1.0f)
- GlStateManager.popMatrix()
+ RenderUtils.drawCircle(Minecraft.getMinecraft().thePlayer, event.partialTicks, 3.5, color)
}
} \ No newline at end of file
diff --git a/src/main/java/at/hannibal2/skyhanni/features/nether/ashfang/AshfangGravityOrbs.kt b/src/main/java/at/hannibal2/skyhanni/features/nether/ashfang/AshfangGravityOrbs.kt
index f9ca75f59..c0dbe3108 100644
--- a/src/main/java/at/hannibal2/skyhanni/features/nether/ashfang/AshfangGravityOrbs.kt
+++ b/src/main/java/at/hannibal2/skyhanni/features/nether/ashfang/AshfangGravityOrbs.kt
@@ -3,13 +3,9 @@ package at.hannibal2.skyhanni.features.nether.ashfang
import at.hannibal2.skyhanni.SkyHanniMod
import at.hannibal2.skyhanni.features.damageindicator.BossType
import at.hannibal2.skyhanni.features.damageindicator.DamageIndicatorManager
-import at.hannibal2.skyhanni.test.GriffinUtils.drawWaypointFilled
+import at.hannibal2.skyhanni.utils.*
import at.hannibal2.skyhanni.utils.ItemUtils.getSkullTexture
-import at.hannibal2.skyhanni.utils.LocationUtils
-import at.hannibal2.skyhanni.utils.LorenzUtils
import at.hannibal2.skyhanni.utils.RenderUtils.drawString
-import at.hannibal2.skyhanni.utils.SpecialColour
-import at.hannibal2.skyhanni.utils.getLorenzVec
import net.minecraft.client.Minecraft
import net.minecraft.entity.item.EntityArmorStand
import net.minecraftforge.client.event.RenderWorldLastEvent
@@ -39,15 +35,14 @@ class AshfangGravityOrbs {
fun onRenderWorld(event: RenderWorldLastEvent) {
if (!isEnabled()) return
- val special = SkyHanniMod.feature.ashfang.gravityOrbsColor
-
- val color = Color(SpecialColour.specialToChromaRGB(special), true)
-
+ val color = Color(SpecialColour.specialToChromaRGB(SkyHanniMod.feature.ashfang.gravityOrbsColor), true)
val playerLocation = LocationUtils.playerLocation()
for (orb in orbs) {
if (orb.isDead) continue
val orbLocation = orb.getLorenzVec()
- event.drawWaypointFilled(orbLocation.add(-0.5, 1.25, -0.5), color, extraSize = 1.0)
+ val center = orbLocation.add(-0.5, -2.0, -0.5)
+ RenderUtils.drawCylinderInWorld(color, center.x, center.y, center.z, 3.5f, 4.5f, event.partialTicks)
+
if (orbLocation.distance(playerLocation) < 15) {
//TODO find way to dynamically change color
event.drawString(orbLocation.add(0.0, 2.5, 0.0), "§cGravity Orb")