mirror of
https://github.com/Creators-of-Create/Create.git
synced 2024-12-16 19:03:41 +01:00
Update rendering
This commit is contained in:
parent
b89710237d
commit
677363f1b8
2 changed files with 3 additions and 5 deletions
|
@ -41,8 +41,7 @@ public class SawMovementBehaviour extends BlockBreakingMovementBehaviour {
|
||||||
public void visitNewPosition(MovementContext context, BlockPos pos) {
|
public void visitNewPosition(MovementContext context, BlockPos pos) {
|
||||||
super.visitNewPosition(context, pos);
|
super.visitNewPosition(context, pos);
|
||||||
Vec3d facingVec = new Vec3d(context.state.get(SawBlock.FACING).getDirectionVec());
|
Vec3d facingVec = new Vec3d(context.state.get(SawBlock.FACING).getDirectionVec());
|
||||||
facingVec = VecHelper.rotate(facingVec, context.rotation.x, context.rotation.y, context.rotation.z);
|
facingVec = context.rotation.apply(facingVec);
|
||||||
facingVec.normalize();
|
|
||||||
|
|
||||||
Direction closestToFacing = Direction.getFacingFromVector(facingVec.x, facingVec.y, facingVec.z);
|
Direction closestToFacing = Direction.getFacingFromVector(facingVec.x, facingVec.y, facingVec.z);
|
||||||
if(closestToFacing.getAxis().isVertical() && context.data.contains("BreakingPos")) {
|
if(closestToFacing.getAxis().isVertical() && context.data.contains("BreakingPos")) {
|
||||||
|
|
|
@ -70,7 +70,7 @@ public class SawRenderer extends SafeTileEntityRenderer<SawTileEntity> {
|
||||||
if(!blockState.get(SawBlock.AXIS_ALONG_FIRST_COORDINATE))
|
if(!blockState.get(SawBlock.AXIS_ALONG_FIRST_COORDINATE))
|
||||||
MatrixStacker.of(ms).centre().rotateY(90).unCentre();
|
MatrixStacker.of(ms).centre().rotateY(90).unCentre();
|
||||||
}
|
}
|
||||||
superBuffer = partial.renderOnDirectional(blockState);
|
superBuffer = partial.renderOnDirectionalSouth(blockState);
|
||||||
superBuffer.light(light).renderInto(ms, buffer.getBuffer(RenderType.getCutoutMipped()));
|
superBuffer.light(light).renderInto(ms, buffer.getBuffer(RenderType.getCutoutMipped()));
|
||||||
|
|
||||||
ms.pop();
|
ms.pop();
|
||||||
|
@ -141,8 +141,7 @@ public class SawRenderer extends SafeTileEntityRenderer<SawTileEntity> {
|
||||||
Direction facing = state.get(SawBlock.FACING);
|
Direction facing = state.get(SawBlock.FACING);
|
||||||
|
|
||||||
Vec3d facingVec = new Vec3d(context.state.get(SawBlock.FACING).getDirectionVec());
|
Vec3d facingVec = new Vec3d(context.state.get(SawBlock.FACING).getDirectionVec());
|
||||||
facingVec = VecHelper.rotate(facingVec, context.rotation.x, context.rotation.y, context.rotation.z);
|
facingVec = context.rotation.apply(facingVec);
|
||||||
facingVec.normalize();
|
|
||||||
|
|
||||||
Direction closestToFacing = Direction.getFacingFromVector(facingVec.x, facingVec.y, facingVec.z);
|
Direction closestToFacing = Direction.getFacingFromVector(facingVec.x, facingVec.y, facingVec.z);
|
||||||
|
|
||||||
|
|
Loading…
Reference in a new issue