use of buildcraft.api.items.IMapLocation.MapLocationType in project BuildCraft by BuildCraft.
the class RenderTickListener method renderMapLocation.
private static void renderMapLocation(@Nonnull ItemStack stack) {
MapLocationType type = MapLocationType.getFromStack(stack);
if (type == MapLocationType.SPOT) {
EnumFacing face = ItemMapLocation.getPointFace(stack);
IBox box = ItemMapLocation.getPointBox(stack);
if (box != null) {
Vec3d[][] vectors = MAP_LOCATION_POINT[face.ordinal()];
GL11.glTranslated(box.min().getX(), box.min().getY(), box.min().getZ());
for (Vec3d[] vec : vectors) {
LaserData_BC8 laser = new LaserData_BC8(BuildCraftLaserManager.STRIPES_WRITE, vec[0], vec[1], 1 / 16.0);
LaserRenderer_BC8.renderLaserStatic(laser);
}
}
} else if (type == MapLocationType.AREA) {
IBox box = ItemMapLocation.getAreaBox(stack);
LAST_RENDERED_MAP_LOC.reset();
LAST_RENDERED_MAP_LOC.initialize(box);
LaserBoxRenderer.renderLaserBoxStatic(LAST_RENDERED_MAP_LOC, BuildCraftLaserManager.STRIPES_WRITE, true);
} else if (type == MapLocationType.PATH) {
List<BlockPos> path = BCCoreItems.mapLocation.getPath(stack);
if (path != null && path.size() > 1) {
BlockPos last = null;
for (BlockPos p : path) {
if (last == null) {
last = p;
}
}
}
// TODO!
} else if (type == MapLocationType.ZONE) {
// TODO!
}
}
Aggregations