diff options
author | hannibal2 <24389977+hannibal00212@users.noreply.github.com> | 2023-10-12 22:56:15 +0200 |
---|---|---|
committer | hannibal2 <24389977+hannibal00212@users.noreply.github.com> | 2023-10-12 22:56:15 +0200 |
commit | aca189fe13935e641c0cac3b91693c6c3fcf91c7 (patch) | |
tree | 93142bc4d2a654e452be6d598bf41ba27e2d3ac5 /src/main/java/at/hannibal2/skyhanni/utils | |
parent | 746351e19048c2e33dd6c71b5cf5b7d82f648690 (diff) | |
download | skyhanni-aca189fe13935e641c0cac3b91693c6c3fcf91c7.tar.gz skyhanni-aca189fe13935e641c0cac3b91693c6c3fcf91c7.tar.bz2 skyhanni-aca189fe13935e641c0cac3b91693c6c3fcf91c7.zip |
fixed globalRender description and replaced RenderWorldLastEvent with LorenzRenderWorldEvent
Diffstat (limited to 'src/main/java/at/hannibal2/skyhanni/utils')
-rw-r--r-- | src/main/java/at/hannibal2/skyhanni/utils/ParkourHelper.kt | 4 | ||||
-rw-r--r-- | src/main/java/at/hannibal2/skyhanni/utils/RenderUtils.kt | 22 |
2 files changed, 13 insertions, 13 deletions
diff --git a/src/main/java/at/hannibal2/skyhanni/utils/ParkourHelper.kt b/src/main/java/at/hannibal2/skyhanni/utils/ParkourHelper.kt index 7a780c3b5..385a40619 100644 --- a/src/main/java/at/hannibal2/skyhanni/utils/ParkourHelper.kt +++ b/src/main/java/at/hannibal2/skyhanni/utils/ParkourHelper.kt @@ -1,6 +1,7 @@ package at.hannibal2.skyhanni.utils import at.hannibal2.skyhanni.SkyHanniMod +import at.hannibal2.skyhanni.events.LorenzRenderWorldEvent import at.hannibal2.skyhanni.test.command.CopyErrorCommand import at.hannibal2.skyhanni.utils.LocationUtils.distanceToPlayer import at.hannibal2.skyhanni.utils.LorenzUtils.toSingletonListOrEmpty @@ -12,7 +13,6 @@ import at.hannibal2.skyhanni.utils.RenderUtils.expandBlock import at.hannibal2.skyhanni.utils.RenderUtils.outlineTopFace import at.hannibal2.skyhanni.utils.jsonobjects.ParkourJson import net.minecraft.client.Minecraft -import net.minecraftforge.client.event.RenderWorldLastEvent import java.awt.Color import kotlin.time.Duration.Companion.seconds @@ -38,7 +38,7 @@ class ParkourHelper( visible = false } - fun render(event: RenderWorldLastEvent) { + fun render(event: LorenzRenderWorldEvent) { if (locations.isEmpty()) { CopyErrorCommand.logError( IllegalArgumentException("locations is empty"), 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() |