diff --git a/src/main/kotlin/ru/dbotthepony/mc/otm/client/render/blockentity/PoweredSmokerRenderer.kt b/src/main/kotlin/ru/dbotthepony/mc/otm/client/render/blockentity/PoweredSmokerRenderer.kt index d4301602a..0832b46d5 100644 --- a/src/main/kotlin/ru/dbotthepony/mc/otm/client/render/blockentity/PoweredSmokerRenderer.kt +++ b/src/main/kotlin/ru/dbotthepony/mc/otm/client/render/blockentity/PoweredSmokerRenderer.kt @@ -8,6 +8,8 @@ import net.minecraft.client.renderer.blockentity.BlockEntityRendererProvider import ru.dbotthepony.mc.otm.block.entity.tech.AbstractPoweredFurnaceBlockEntity import ru.dbotthepony.mc.otm.core.math.normalizeAngle import ru.dbotthepony.mc.otm.core.math.rotateY +import ru.dbotthepony.mc.otm.core.math.yRotationNorth +import ru.dbotthepony.mc.otm.core.math.yRotationSouth class PoweredSmokerRenderer(private val context: BlockEntityRendererProvider.Context) : BlockEntityRenderer> { override fun render(tile: AbstractPoweredFurnaceBlockEntity<*, *>, partialTick: Float, pose: PoseStack, buffers: MultiBufferSource, packedLight: Int, packedOverlay: Int) { @@ -19,6 +21,9 @@ class PoweredSmokerRenderer(private val context: BlockEntityRendererProvider.Con slot.visualRotation = normalizeAngle(slot.visualRotation + diff / 400_000_000f) pose.pushPose() + pose.translate(0.5f, 0.5f, 0.5f) + pose.rotateY(tile.blockRotation.front.yRotationNorth()) + pose.translate(-0.5f, -0.5f, -0.5f) pose.translate(0.625f, 0.5f, 0.5f) pose.scale(0.25f, 0.25f, 0.25f) diff --git a/src/main/kotlin/ru/dbotthepony/mc/otm/core/math/EuclidMath.kt b/src/main/kotlin/ru/dbotthepony/mc/otm/core/math/EuclidMath.kt index 2f3602cd2..15c0ac5fe 100644 --- a/src/main/kotlin/ru/dbotthepony/mc/otm/core/math/EuclidMath.kt +++ b/src/main/kotlin/ru/dbotthepony/mc/otm/core/math/EuclidMath.kt @@ -679,8 +679,8 @@ fun Direction.yRotationNorth(): Float { return when (this) { Direction.DOWN, Direction.UP, Direction.NORTH -> 0f Direction.SOUTH -> PIf - Direction.WEST -> -PIf / 2f - Direction.EAST -> PIf / 2f + Direction.WEST -> PIf / 2f + Direction.EAST -> -PIf / 2f } } @@ -688,8 +688,8 @@ fun Direction.yRotationSouth(): Float { return when (this) { Direction.DOWN, Direction.UP, Direction.SOUTH -> 0f Direction.NORTH -> PIf - Direction.WEST -> PIf / 2f - Direction.EAST -> -PIf / 2f + Direction.WEST -> -PIf / 2f + Direction.EAST -> PIf / 2f } }