use of com.simibubi.create.content.contraptions.base.IRotate in project Create by Creators-of-Create.
the class Contraption method moveGantryPinion.
protected void moveGantryPinion(Level world, BlockPos pos, Queue<BlockPos> frontier, Set<BlockPos> visited, BlockState state) {
BlockPos offset = pos.relative(state.getValue(GantryCarriageBlock.FACING));
if (!visited.contains(offset))
frontier.add(offset);
Axis rotationAxis = ((IRotate) state.getBlock()).getRotationAxis(state);
for (Direction d : Iterate.directionsInAxis(rotationAxis)) {
offset = pos.relative(d);
BlockState offsetState = world.getBlockState(offset);
if (AllBlocks.GANTRY_SHAFT.has(offsetState) && offsetState.getValue(GantryShaftBlock.FACING).getAxis() == d.getAxis())
if (!visited.contains(offset))
frontier.add(offset);
}
}
Aggregations