aboutsummaryrefslogtreecommitdiff
path: root/src/main/java/at/hannibal2/skyhanni/utils/RenderUtils.kt
diff options
context:
space:
mode:
Diffstat (limited to 'src/main/java/at/hannibal2/skyhanni/utils/RenderUtils.kt')
-rw-r--r--src/main/java/at/hannibal2/skyhanni/utils/RenderUtils.kt22
1 files changed, 11 insertions, 11 deletions
diff --git a/src/main/java/at/hannibal2/skyhanni/utils/RenderUtils.kt b/src/main/java/at/hannibal2/skyhanni/utils/RenderUtils.kt
index dce61bf03..4a5754b6c 100644
--- a/src/main/java/at/hannibal2/skyhanni/utils/RenderUtils.kt
+++ b/src/main/java/at/hannibal2/skyhanni/utils/RenderUtils.kt
@@ -5,6 +5,7 @@ import at.hannibal2.skyhanni.data.GuiEditManager
import at.hannibal2.skyhanni.data.GuiEditManager.Companion.getAbsX
import at.hannibal2.skyhanni.data.GuiEditManager.Companion.getAbsY
import at.hannibal2.skyhanni.events.GuiRenderItemEvent
+import at.hannibal2.skyhanni.events.LorenzRenderWorldEvent
import at.hannibal2.skyhanni.utils.LorenzUtils.addAsSingletonList
import at.hannibal2.skyhanni.utils.renderables.Renderable
import io.github.moulberry.moulconfig.internal.TextRenderUtils
@@ -20,7 +21,6 @@ import net.minecraft.inventory.Slot
import net.minecraft.util.AxisAlignedBB
import net.minecraft.util.MathHelper
import net.minecraft.util.ResourceLocation
-import net.minecraftforge.client.event.RenderWorldLastEvent
import org.lwjgl.opengl.GL11
import java.awt.Color
import kotlin.math.cos
@@ -56,7 +56,7 @@ object RenderUtils {
GlStateManager.popAttrib()
}
- fun RenderWorldLastEvent.drawColor(
+ fun LorenzRenderWorldEvent.drawColor(
location: LorenzVec,
color: LorenzColor,
beacon: Boolean = false,
@@ -65,7 +65,7 @@ object RenderUtils {
drawColor(location, color.toColor(), beacon, alpha)
}
- fun RenderWorldLastEvent.drawColor(
+ fun LorenzRenderWorldEvent.drawColor(
location: LorenzVec,
color: Color,
beacon: Boolean = false,
@@ -197,7 +197,7 @@ object RenderUtils {
tessellator.draw()
}
- fun RenderWorldLastEvent.drawString(
+ fun LorenzRenderWorldEvent.drawString(
location: LorenzVec,
text: String,
seeThroughBlocks: Boolean = false,
@@ -608,7 +608,7 @@ object RenderUtils {
TextRenderUtils.drawStringScaled(str, fr, x, y, shadow, colour, factor)
}
- fun RenderWorldLastEvent.drawDynamicText(
+ fun LorenzRenderWorldEvent.drawDynamicText(
location: LorenzVec,
text: String,
scaleMultiplier: Double,
@@ -703,7 +703,7 @@ object RenderUtils {
}
}
- fun RenderWorldLastEvent.draw3DLine(p1: LorenzVec, p2: LorenzVec, color: Color, lineWidth: Int, depth: Boolean) {
+ fun LorenzRenderWorldEvent.draw3DLine(p1: LorenzVec, p2: LorenzVec, color: Color, lineWidth: Int, depth: Boolean) {
GlStateManager.disableCull()
val render = Minecraft.getMinecraft().renderViewEntity
@@ -741,9 +741,9 @@ object RenderUtils {
GlStateManager.enableDepth()
}
- fun RenderWorldLastEvent.exactLocation(entity: Entity) = exactLocation(entity, partialTicks)
+ fun LorenzRenderWorldEvent.exactLocation(entity: Entity) = exactLocation(entity, partialTicks)
- fun RenderWorldLastEvent.exactPlayerEyeLocation(): LorenzVec {
+ fun LorenzRenderWorldEvent.exactPlayerEyeLocation(): LorenzVec {
val player = Minecraft.getMinecraft().thePlayer
val add = if (player.isSneaking) LorenzVec(0.0, 1.54, 0.0) else LorenzVec(0.0, 1.62, 0.0)
return exactLocation(player).add(add)
@@ -823,7 +823,7 @@ object RenderUtils {
}
// TODO nea please merge with 'drawFilledBoundingBox'
- fun RenderWorldLastEvent.drawFilledBoundingBox_nea(
+ fun LorenzRenderWorldEvent.drawFilledBoundingBox_nea(
aabb: AxisAlignedBB,
c: Color,
alphaMultiplier: Float = 1f,
@@ -927,7 +927,7 @@ object RenderUtils {
GlStateManager.disableBlend()
}
- fun RenderWorldLastEvent.outlineTopFace(boundingBox: AxisAlignedBB, lineWidth: Int, colour: Color, depth: Boolean) {
+ fun LorenzRenderWorldEvent.outlineTopFace(boundingBox: AxisAlignedBB, lineWidth: Int, colour: Color, depth: Boolean) {
val cornerOne = LorenzVec(boundingBox.minX, boundingBox.maxY, boundingBox.minZ)
val cornerTwo = LorenzVec(boundingBox.minX, boundingBox.maxY, boundingBox.maxZ)
val cornerThree = LorenzVec(boundingBox.maxX, boundingBox.maxY, boundingBox.maxZ)
@@ -939,7 +939,7 @@ object RenderUtils {
}
// TODO nea please merge with 'draw3DLine'
- fun RenderWorldLastEvent.draw3DLine_nea(
+ fun LorenzRenderWorldEvent.draw3DLine_nea(
p1: LorenzVec, p2: LorenzVec, color: Color, lineWidth: Int, depth: Boolean
) {
GlStateManager.disableDepth()