aboutsummaryrefslogtreecommitdiff
path: root/src/main/kotlin/moe/nea/firmament/util
diff options
context:
space:
mode:
authornea <nea@nea.moe>2023-06-11 22:35:03 +0200
committernea <nea@nea.moe>2023-06-11 22:35:09 +0200
commit74e79759bf8888ea08a6d244a50e531aaae20f27 (patch)
treef614e31c980ce61a6106768ed7ccfa1f42905c8c /src/main/kotlin/moe/nea/firmament/util
parentcfdf89aa1a64f8a32401201b867918aed64145df (diff)
downloadFirmament-74e79759bf8888ea08a6d244a50e531aaae20f27.tar.gz
Firmament-74e79759bf8888ea08a6d244a50e531aaae20f27.tar.bz2
Firmament-74e79759bf8888ea08a6d244a50e531aaae20f27.zip
Rename world renderer events
Diffstat (limited to 'src/main/kotlin/moe/nea/firmament/util')
-rw-r--r--src/main/kotlin/moe/nea/firmament/util/render/RenderInWorldContext.kt (renamed from src/main/kotlin/moe/nea/firmament/util/render/block.kt)8
1 files changed, 3 insertions, 5 deletions
diff --git a/src/main/kotlin/moe/nea/firmament/util/render/block.kt b/src/main/kotlin/moe/nea/firmament/util/render/RenderInWorldContext.kt
index 7df610b..59a949a 100644
--- a/src/main/kotlin/moe/nea/firmament/util/render/block.kt
+++ b/src/main/kotlin/moe/nea/firmament/util/render/RenderInWorldContext.kt
@@ -24,16 +24,14 @@ import net.minecraft.client.gl.VertexBuffer
import net.minecraft.client.render.BufferBuilder
import net.minecraft.client.render.Camera
import net.minecraft.client.render.GameRenderer
-import net.minecraft.client.render.RenderLayer
import net.minecraft.client.render.Tessellator
-import net.minecraft.client.render.VertexConsumerProvider
import net.minecraft.client.render.VertexFormat
import net.minecraft.client.render.VertexFormats
import net.minecraft.client.util.math.MatrixStack
import net.minecraft.util.math.BlockPos
import net.minecraft.util.math.Vec3d
-class RenderBlockContext private constructor(private val tesselator: Tessellator, private val matrixStack: MatrixStack) {
+class RenderInWorldContext private constructor(private val tesselator: Tessellator, private val matrixStack: MatrixStack) {
private val buffer = tesselator.buffer
fun color(red: Float, green: Float, blue: Float, alpha: Float) {
@@ -105,7 +103,7 @@ class RenderBlockContext private constructor(private val tesselator: Tessellator
buf.unfixColor()
}
- fun renderBlocks(matrices: MatrixStack, camera: Camera, block: RenderBlockContext. () -> Unit) {
+ fun renderInWorld(matrices: MatrixStack, camera: Camera, block: RenderInWorldContext. () -> Unit) {
RenderSystem.disableDepthTest()
RenderSystem.enableBlend()
RenderSystem.defaultBlendFunc()
@@ -114,7 +112,7 @@ class RenderBlockContext private constructor(private val tesselator: Tessellator
matrices.push()
matrices.translate(-camera.pos.x, -camera.pos.y, -camera.pos.z)
- val ctx = RenderBlockContext(Tessellator.getInstance(), matrices)
+ val ctx = RenderInWorldContext(Tessellator.getInstance(), matrices)
block(ctx)
matrices.pop()