fix drill orientation issue in contraptions

This commit is contained in:
JozsefA 2021-01-25 00:24:07 -08:00
parent f05497a28c
commit 7bac93a03c

View File

@ -49,10 +49,11 @@ public class DrillRenderer extends KineticTileEntityRenderer {
model.setupInstance(data -> {
Direction facing = state.get(DrillBlock.FACING);
float localRotationX = AngleHelper.verticalAngle(facing) + ((facing.getAxis() == Direction.Axis.Y) ? 180 : 0);
data.setPosition(context.localPos)
.setRotationOffset(0)
.setRotationAxis(0, 0, 1)
.setLocalRotation(AngleHelper.verticalAngle(facing), facing.getHorizontalAngle(), 0);
.setLocalRotation(localRotationX, facing.getHorizontalAngle(), 0);
});
}