Merge branch '1.19.4' of https://git.dbotthepony.ru/DBot/overdrive_that_matters into 1.19.3
This commit is contained in:
commit
8f8fd8c8de
@ -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<AbstractPoweredFurnaceBlockEntity<*, *>> {
|
||||
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)
|
||||
|
||||
|
@ -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
|
||||
}
|
||||
}
|
||||
|
||||
|
Loading…
Reference in New Issue
Block a user