From 677363f1b82a0867d476597680e1f145479d70a7 Mon Sep 17 00:00:00 2001 From: Colman Davenport Date: Tue, 13 Oct 2020 00:10:23 -0400 Subject: [PATCH] Update rendering --- .../contraptions/components/actors/SawMovementBehaviour.java | 3 +-- .../content/contraptions/components/saw/SawRenderer.java | 5 ++--- 2 files changed, 3 insertions(+), 5 deletions(-) diff --git a/src/main/java/com/simibubi/create/content/contraptions/components/actors/SawMovementBehaviour.java b/src/main/java/com/simibubi/create/content/contraptions/components/actors/SawMovementBehaviour.java index d4a36f042..9add6f26f 100644 --- a/src/main/java/com/simibubi/create/content/contraptions/components/actors/SawMovementBehaviour.java +++ b/src/main/java/com/simibubi/create/content/contraptions/components/actors/SawMovementBehaviour.java @@ -41,8 +41,7 @@ public class SawMovementBehaviour extends BlockBreakingMovementBehaviour { public void visitNewPosition(MovementContext context, BlockPos pos) { super.visitNewPosition(context, pos); Vec3d facingVec = new Vec3d(context.state.get(SawBlock.FACING).getDirectionVec()); - facingVec = VecHelper.rotate(facingVec, context.rotation.x, context.rotation.y, context.rotation.z); - facingVec.normalize(); + facingVec = context.rotation.apply(facingVec); Direction closestToFacing = Direction.getFacingFromVector(facingVec.x, facingVec.y, facingVec.z); if(closestToFacing.getAxis().isVertical() && context.data.contains("BreakingPos")) { diff --git a/src/main/java/com/simibubi/create/content/contraptions/components/saw/SawRenderer.java b/src/main/java/com/simibubi/create/content/contraptions/components/saw/SawRenderer.java index 078863d50..5c6478a38 100644 --- a/src/main/java/com/simibubi/create/content/contraptions/components/saw/SawRenderer.java +++ b/src/main/java/com/simibubi/create/content/contraptions/components/saw/SawRenderer.java @@ -70,7 +70,7 @@ public class SawRenderer extends SafeTileEntityRenderer { if(!blockState.get(SawBlock.AXIS_ALONG_FIRST_COORDINATE)) MatrixStacker.of(ms).centre().rotateY(90).unCentre(); } - superBuffer = partial.renderOnDirectional(blockState); + superBuffer = partial.renderOnDirectionalSouth(blockState); superBuffer.light(light).renderInto(ms, buffer.getBuffer(RenderType.getCutoutMipped())); ms.pop(); @@ -141,8 +141,7 @@ public class SawRenderer extends SafeTileEntityRenderer { Direction facing = state.get(SawBlock.FACING); Vec3d facingVec = new Vec3d(context.state.get(SawBlock.FACING).getDirectionVec()); - facingVec = VecHelper.rotate(facingVec, context.rotation.x, context.rotation.y, context.rotation.z); - facingVec.normalize(); + facingVec = context.rotation.apply(facingVec); Direction closestToFacing = Direction.getFacingFromVector(facingVec.x, facingVec.y, facingVec.z);