@Override public void initialize() { super.initialize(); if (CoreProxy.proxy.isRenderWorld(worldObj)) return; for (int x = xCoord - 1; x <= xCoord + 1; ++x) { for (int y = yCoord - 1; y <= yCoord + 1; ++y) { for (int z = zCoord - 1; z <= zCoord + 1; ++z) { TileEntity tile = worldObj.getBlockTileEntity(x, y, z); if (tile instanceof TilePathMarker) { path = ((TilePathMarker) tile).getPath(); for (BlockIndex b : path) { worldObj.setBlockWithNotify(b.i, b.j, b.k, 0); BuildCraftBuilders.pathMarkerBlock.dropBlockAsItem( worldObj, b.i, b.j, b.k, BuildCraftBuilders.pathMarkerBlock.blockID, 0); } break; } } } } if (path != null && pathLasers == null) { path.getFirst().i = xCoord; path.getFirst().j = yCoord; path.getFirst().k = zCoord; createLasersForPath(); } iterateBpt(); }
@Override public void initialize() { super.initialize(); if (worldObj.isRemote) { return; } if (initNBT != null) { iterateBpt(true); if (initNBT.hasKey("iterator")) { BlockIndex expectedTo = new BlockIndex(initNBT.getCompoundTag("iterator")); while (!done && currentBuilder != null && currentPathIterator != null) { BlockIndex bi = new BlockIndex( (int) currentPathIterator.ix, (int) currentPathIterator.iy, (int) currentPathIterator.iz); if (bi.equals(expectedTo)) { break; } iterateBpt(true); } } if (currentBuilder != null) { currentBuilder.loadBuildStateToNBT(initNBT.getCompoundTag("builderState"), this); } initNBT = null; } box.kind = Kind.STRIPES; for (int x = xCoord - 1; x <= xCoord + 1; ++x) { for (int y = yCoord - 1; y <= yCoord + 1; ++y) { for (int z = zCoord - 1; z <= zCoord + 1; ++z) { TileEntity tile = worldObj.getTileEntity(x, y, z); if (tile instanceof TilePathMarker) { path = ((TilePathMarker) tile).getPath(); for (BlockIndex b : path) { worldObj.setBlockToAir(b.x, b.y, b.z); BuildCraftBuilders.pathMarkerBlock.dropBlockAsItem(worldObj, b.x, b.y, b.z, 0, 0); } break; } } } } if (path != null && pathLasers.size() == 0) { createLasersForPath(); sendNetworkUpdate(); } iterateBpt(false); }