fix mechanical crafter cogs

This commit is contained in:
JozsefA 2021-02-17 11:24:40 -08:00
parent 7aa175dd9c
commit a5d6262424

View file

@ -23,7 +23,7 @@ public class MechanicalCrafterInstance extends SingleRotatingInstance {
InstancedTileRenderRegistry.instance.register(type, MechanicalCrafterInstance::new)); InstancedTileRenderRegistry.instance.register(type, MechanicalCrafterInstance::new));
} }
public MechanicalCrafterInstance(InstancedTileRenderer modelManager, KineticTileEntity tile) { public MechanicalCrafterInstance(InstancedTileRenderer<?> modelManager, KineticTileEntity tile) {
super(modelManager, tile); super(modelManager, tile);
} }
@ -33,12 +33,14 @@ public class MechanicalCrafterInstance extends SingleRotatingInstance {
Supplier<MatrixStack> ms = () -> { Supplier<MatrixStack> ms = () -> {
MatrixStack stack = new MatrixStack(); MatrixStack stack = new MatrixStack();
MatrixStacker.of(stack) MatrixStacker stacker = MatrixStacker.of(stack).centre();
.centre()
.rotateZ(90) if (facing.getAxis() == Direction.Axis.X)
.rotateY(AngleHelper.horizontalAngle(facing)) stacker.rotateZ(90);
.rotateX(AngleHelper.verticalAngle(facing)) else if (facing.getAxis() == Direction.Axis.Z)
.unCentre(); stacker.rotateX(90);
stacker.unCentre();
return stack; return stack;
}; };
return rotatingMaterial().getModel(AllBlockPartials.SHAFTLESS_COGWHEEL, lastState, facing, ms); return rotatingMaterial().getModel(AllBlockPartials.SHAFTLESS_COGWHEEL, lastState, facing, ms);