move stuff around
This commit is contained in:
parent
b09ba07735
commit
4801ff01ad
@ -1,3 +1,4 @@
|
|||||||
|
|
||||||
package ru.dbotthepony.mc.otm.client.render.blockentity
|
package ru.dbotthepony.mc.otm.client.render.blockentity
|
||||||
|
|
||||||
import com.mojang.blaze3d.vertex.*
|
import com.mojang.blaze3d.vertex.*
|
||||||
@ -20,17 +21,15 @@ import ru.dbotthepony.mc.otm.client.render.*
|
|||||||
import ru.dbotthepony.mc.otm.core.*
|
import ru.dbotthepony.mc.otm.core.*
|
||||||
import kotlin.math.PI
|
import kotlin.math.PI
|
||||||
|
|
||||||
private val BEAM_RENDER_TYPE_INNER = RenderType.beaconBeam(BeaconRenderer.BEAM_LOCATION, false)
|
@Suppress("PrivatePropertyName")
|
||||||
private val BEAM_RENDER_TYPE_OUTER = RenderType.beaconBeam(BeaconRenderer.BEAM_LOCATION, true)
|
|
||||||
|
|
||||||
class GravitationStabilizerRenderer(private val context: BlockEntityRendererProvider.Context) : BlockEntityRenderer<GravitationStabilizerBlockEntity> {
|
class GravitationStabilizerRenderer(private val context: BlockEntityRendererProvider.Context) : BlockEntityRenderer<GravitationStabilizerBlockEntity> {
|
||||||
override fun render(
|
override fun render(
|
||||||
tile: GravitationStabilizerBlockEntity,
|
tile: GravitationStabilizerBlockEntity,
|
||||||
p_112308_: Float,
|
partialTick: Float,
|
||||||
poseStack: PoseStack,
|
poseStack: PoseStack,
|
||||||
p_112310_: MultiBufferSource,
|
bufferSource: MultiBufferSource,
|
||||||
p_112311_: Int,
|
packedLight: Int,
|
||||||
p_112312_: Int
|
overlayLight: Int
|
||||||
) {
|
) {
|
||||||
if (tile.blockState.getValue(WorkerState.SEMI_WORKER_STATE) != WorkerState.WORKING)
|
if (tile.blockState.getValue(WorkerState.SEMI_WORKER_STATE) != WorkerState.WORKING)
|
||||||
return
|
return
|
||||||
@ -101,7 +100,7 @@ class GravitationStabilizerRenderer(private val context: BlockEntityRendererProv
|
|||||||
val halfStep = normal * 0.3
|
val halfStep = normal * 0.3
|
||||||
|
|
||||||
run {
|
run {
|
||||||
val consumer = p_112310_.getBuffer(BEAM_RENDER_TYPE_INNER)
|
val consumer = bufferSource.getBuffer(BEAM_RENDER_TYPE_INNER)
|
||||||
|
|
||||||
poseStack.pushPose()
|
poseStack.pushPose()
|
||||||
|
|
||||||
@ -117,7 +116,7 @@ class GravitationStabilizerRenderer(private val context: BlockEntityRendererProv
|
|||||||
}
|
}
|
||||||
|
|
||||||
run {
|
run {
|
||||||
val consumer = p_112310_.getBuffer(BEAM_RENDER_TYPE_OUTER)
|
val consumer = bufferSource.getBuffer(BEAM_RENDER_TYPE_OUTER)
|
||||||
|
|
||||||
poseStack.pushPose()
|
poseStack.pushPose()
|
||||||
|
|
||||||
@ -157,6 +156,9 @@ class GravitationStabilizerRenderer(private val context: BlockEntityRendererProv
|
|||||||
override fun getViewDistance() = 96
|
override fun getViewDistance() = 96
|
||||||
|
|
||||||
companion object {
|
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_A = RGBAColor(37, 255, 129, 110)
|
||||||
private val OUTER_COLOR_B = 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)
|
private val OUTER_COLOR_C = RGBAColor(37, 255, 129, 110)
|
||||||
|
Loading…
Reference in New Issue
Block a user