YuRaNnNzZZ — Сегодня, в 18:13
:WiseTree:
This commit is contained in:
parent
0a01a4f133
commit
56771dcd32
@ -10,10 +10,6 @@ import ru.dbotthepony.mc.otm.block.entity.matter.MatterReconstructorBlockEntity
|
||||
import ru.dbotthepony.mc.otm.client.render.DynamicBufferSource
|
||||
|
||||
class MatterReconstructorRenderer(private val context: BlockEntityRendererProvider.Context) : BlockEntityRenderer<MatterReconstructorBlockEntity> {
|
||||
companion object {
|
||||
private val source = DynamicBufferSource(maximalInitialBufferSize = 2 shl 10)
|
||||
}
|
||||
|
||||
override fun render(
|
||||
tile: MatterReconstructorBlockEntity,
|
||||
partialTick: Float,
|
||||
@ -34,10 +30,9 @@ class MatterReconstructorRenderer(private val context: BlockEntityRendererProvid
|
||||
pose.scale(0.5f, 0.5f, 0.5f)
|
||||
|
||||
pose.mulPose(Axis.XP.rotationDegrees(90f))
|
||||
pose.mulPose(Axis.ZP.rotationDegrees(tile.blockRotation.front.toYRot() + 180f))
|
||||
pose.mulPose(Axis.ZP.rotationDegrees(tile.blockRotation.back.toYRot()))
|
||||
|
||||
context.itemRenderer.renderStatic(item, ItemDisplayContext.FIXED, packedLight, packedOverlay, pose, source, tile.level, tile.blockPos.asLong().toInt())
|
||||
source.endBatch()
|
||||
context.itemRenderer.renderStatic(item, ItemDisplayContext.FIXED, packedLight, packedOverlay, pose, DynamicBufferSource.WORLD, tile.level, tile.blockPos.asLong().toInt())
|
||||
|
||||
pose.popPose()
|
||||
}
|
||||
|
Loading…
Reference in New Issue
Block a user