use of buildcraft.api.blueprints.SchematicBlock in project BuildCraft by BuildCraft.
the class IndexRequirementMap method add.
public void add(BuildingSlotBlock b, IBuilderContext context) {
if (b.schematic instanceof SchematicBlock) {
BlockPos index = b.pos;
Set<BlockPos> prereqs = ((SchematicBlock) b.schematic).getPrerequisiteBlocks(context);
if (prereqs != null && prereqs.size() > 0) {
for (BlockPos i : prereqs) {
BlockPos ia = i.add(index);
if (ia.equals(index) || !context.surroundingBox().contains(Utils.convert(ia))) {
continue;
}
requirements.put(index, ia);
requirementsInv.put(ia, index);
}
}
}
}
Aggregations