From 4801ff01ad4b2ec24d2421034218693424bd6dba Mon Sep 17 00:00:00 2001 From: DBotThePony Date: Thu, 6 Oct 2022 16:52:20 +0700 Subject: [PATCH] move stuff around --- .../GravitationStabilizerRenderer.kt | 20 ++++++++++--------- 1 file changed, 11 insertions(+), 9 deletions(-) diff --git a/src/main/kotlin/ru/dbotthepony/mc/otm/client/render/blockentity/GravitationStabilizerRenderer.kt b/src/main/kotlin/ru/dbotthepony/mc/otm/client/render/blockentity/GravitationStabilizerRenderer.kt index 56ea13bcc..23b7d8155 100644 --- a/src/main/kotlin/ru/dbotthepony/mc/otm/client/render/blockentity/GravitationStabilizerRenderer.kt +++ b/src/main/kotlin/ru/dbotthepony/mc/otm/client/render/blockentity/GravitationStabilizerRenderer.kt @@ -1,3 +1,4 @@ + package ru.dbotthepony.mc.otm.client.render.blockentity import com.mojang.blaze3d.vertex.* @@ -20,17 +21,15 @@ import ru.dbotthepony.mc.otm.client.render.* import ru.dbotthepony.mc.otm.core.* import kotlin.math.PI -private val BEAM_RENDER_TYPE_INNER = RenderType.beaconBeam(BeaconRenderer.BEAM_LOCATION, false) -private val BEAM_RENDER_TYPE_OUTER = RenderType.beaconBeam(BeaconRenderer.BEAM_LOCATION, true) - +@Suppress("PrivatePropertyName") class GravitationStabilizerRenderer(private val context: BlockEntityRendererProvider.Context) : BlockEntityRenderer { override fun render( tile: GravitationStabilizerBlockEntity, - p_112308_: Float, + partialTick: Float, poseStack: PoseStack, - p_112310_: MultiBufferSource, - p_112311_: Int, - p_112312_: Int + bufferSource: MultiBufferSource, + packedLight: Int, + overlayLight: Int ) { if (tile.blockState.getValue(WorkerState.SEMI_WORKER_STATE) != WorkerState.WORKING) return @@ -101,7 +100,7 @@ class GravitationStabilizerRenderer(private val context: BlockEntityRendererProv val halfStep = normal * 0.3 run { - val consumer = p_112310_.getBuffer(BEAM_RENDER_TYPE_INNER) + val consumer = bufferSource.getBuffer(BEAM_RENDER_TYPE_INNER) poseStack.pushPose() @@ -117,7 +116,7 @@ class GravitationStabilizerRenderer(private val context: BlockEntityRendererProv } run { - val consumer = p_112310_.getBuffer(BEAM_RENDER_TYPE_OUTER) + val consumer = bufferSource.getBuffer(BEAM_RENDER_TYPE_OUTER) poseStack.pushPose() @@ -157,6 +156,9 @@ class GravitationStabilizerRenderer(private val context: BlockEntityRendererProv override fun getViewDistance() = 96 companion object { + private val BEAM_RENDER_TYPE_INNER = RenderType.beaconBeam(BeaconRenderer.BEAM_LOCATION, false) + private val BEAM_RENDER_TYPE_OUTER = RenderType.beaconBeam(BeaconRenderer.BEAM_LOCATION, true) + private val OUTER_COLOR_A = RGBAColor(37, 255, 129, 110) private val OUTER_COLOR_B = RGBAColor(37, 255, 129, 110) private val OUTER_COLOR_C = RGBAColor(37, 255, 129, 110)