use of com.simibubi.create.content.contraptions.components.structureMovement.chassis.ChassisTileEntity in project Create by Creators-of-Create.
the class Contraption method moveChassis.
private boolean moveChassis(Level world, BlockPos pos, Direction movementDirection, Queue<BlockPos> frontier, Set<BlockPos> visited) {
BlockEntity te = world.getBlockEntity(pos);
if (!(te instanceof ChassisTileEntity))
return false;
ChassisTileEntity chassis = (ChassisTileEntity) te;
chassis.addAttachedChasses(frontier, visited);
List<BlockPos> includedBlockPositions = chassis.getIncludedBlockPositions(movementDirection, false);
if (includedBlockPositions == null)
return false;
for (BlockPos blockPos : includedBlockPositions) if (!visited.contains(blockPos))
frontier.add(blockPos);
return true;
}
Aggregations