use of buildcraft.core.builders.BuildingItem in project BuildCraft by BuildCraft.
the class RenderBuildingItems method render.
public void render(TileEntity tile, double x, double y, double z) {
IBuildingItemsProvider provider = (IBuildingItemsProvider) tile;
GL11.glPushMatrix();
GL11.glTranslated(x, y, z);
GL11.glTranslated(-tile.getPos().getX(), -tile.getPos().getY(), -tile.getPos().getZ());
if (provider.getBuilders() != null) {
synchronized (provider.getBuilders()) {
for (BuildingItem i : provider.getBuilders()) {
doRenderItem(i, 1.0F);
}
}
}
GL11.glPopMatrix();
}
use of buildcraft.core.builders.BuildingItem in project BuildCraft by BuildCraft.
the class TileConstructionMarker method update.
@Override
public void update() {
super.update();
BuildingItem toRemove = null;
for (BuildingItem i : buildersInAction) {
i.update();
if (i.isDone) {
toRemove = i;
}
}
if (toRemove != null) {
buildersInAction.remove(toRemove);
}
if (worldObj.isRemote) {
return;
}
if (itemBlueprint != null && ItemBlueprint.getId(itemBlueprint) != null && bluePrintBuilder == null) {
BlueprintBase bpt = ItemBlueprint.loadBlueprint(itemBlueprint);
if (bpt != null && bpt instanceof Blueprint) {
bpt = bpt.adjustToWorld(worldObj, pos, direction);
if (bpt != null) {
bluePrintBuilder = new BptBuilderBlueprint((Blueprint) bpt, worldObj, pos);
bptContext = bluePrintBuilder.getContext();
box.initialize(bluePrintBuilder);
sendNetworkUpdate();
}
} else {
return;
}
}
if (laser == null && direction != null) {
Vec3d point5 = new Vec3d(0.5, 0.5, 0.5);
laser = new LaserData();
laser.head = Utils.convert(pos).add(point5);
laser.tail = laser.head.add(Utils.convert(direction, 0.5));
laser.isVisible = true;
sendNetworkUpdate();
}
if (initNBT != null) {
if (bluePrintBuilder != null) {
bluePrintBuilder.loadBuildStateToNBT(initNBT.getCompoundTag("builderState"), this);
}
initNBT = null;
}
}
Aggregations