use of buildcraft.core.blueprints.BptContext in project BuildCraft by BuildCraft.
the class RealBlueprintDeployer method deployBlueprint.
public void deployBlueprint(World world, BlockPos pos, EnumFacing dir, Blueprint bpt) {
bpt.id = new LibraryId();
bpt.id.extension = "bpt";
BptContext context = bpt.getContext(world, bpt.getBoxForPos(pos));
if (bpt.rotate) {
if (dir == EnumFacing.EAST) {
// Do nothing
} else if (dir == EnumFacing.SOUTH) {
bpt.rotateLeft(context);
} else if (dir == EnumFacing.WEST) {
bpt.rotateLeft(context);
bpt.rotateLeft(context);
} else if (dir == EnumFacing.NORTH) {
bpt.rotateLeft(context);
bpt.rotateLeft(context);
bpt.rotateLeft(context);
}
}
Vec3d transform = Utils.convert(pos).subtract(Utils.convert(bpt.anchor));
bpt.translateToWorld(transform);
new BptBuilderBlueprint(bpt, world, pos).deploy();
}
Aggregations