minor tweaks and fixes for server release
This commit is contained in:
parent
1a2bc3a964
commit
89acd880dc
2 changed files with 16 additions and 5 deletions
|
@ -111,6 +111,7 @@ public class TileArchitect extends TileBuildCraft implements IInventory, IBoxPro
|
|||
}
|
||||
|
||||
public void createBpt() {
|
||||
writingBlueprint.id.name = name;
|
||||
BuildCraftBuilders.serverDB.add(writingBlueprint);
|
||||
|
||||
setInventorySlotContents(1, ItemBlueprint.getBlueprintItem(writingBlueprint));
|
||||
|
|
|
@ -21,6 +21,7 @@ import net.minecraft.util.AxisAlignedBB;
|
|||
import net.minecraftforge.common.util.ForgeDirection;
|
||||
import buildcraft.BuildCraftBuilders;
|
||||
import buildcraft.api.blueprints.SchematicToBuild;
|
||||
import buildcraft.api.core.SafeTimeTracker;
|
||||
import buildcraft.api.gates.IAction;
|
||||
import buildcraft.api.power.IPowerReceptor;
|
||||
import buildcraft.api.power.PowerHandler;
|
||||
|
@ -66,6 +67,8 @@ public class TileBuilder extends TileBuildCraft implements IBuilderInventory,
|
|||
|
||||
private LinkedList <ItemStack> requiredToBuild;
|
||||
|
||||
private SafeTimeTracker debugBuildTracker = new SafeTimeTracker(5);
|
||||
|
||||
private class PathIterator {
|
||||
|
||||
public Iterator<BlockIndex> currentIterator;
|
||||
|
@ -421,8 +424,12 @@ public class TileBuilder extends TileBuildCraft implements IBuilderInventory,
|
|||
result = tmp;
|
||||
}
|
||||
|
||||
if (i == 0) {
|
||||
iterateBpt();
|
||||
if (!worldObj.isRemote) {
|
||||
if (i == 0) {
|
||||
RPCHandler.rpcBroadcastPlayers(this, "setItemRequirements",
|
||||
null, null);
|
||||
iterateBpt();
|
||||
}
|
||||
}
|
||||
|
||||
return result;
|
||||
|
@ -434,6 +441,7 @@ public class TileBuilder extends TileBuildCraft implements IBuilderInventory,
|
|||
|
||||
if (!worldObj.isRemote) {
|
||||
if (i == 0) {
|
||||
RPCHandler.rpcBroadcastPlayers(this, "setItemRequirements", null, null);
|
||||
iterateBpt();
|
||||
done = false;
|
||||
}
|
||||
|
@ -609,7 +617,7 @@ public class TileBuilder extends TileBuildCraft implements IBuilderInventory,
|
|||
|
||||
requiredToBuild = rq;
|
||||
|
||||
if (rq.size() > 0) {
|
||||
if (rq != null && rq.size() > 0) {
|
||||
Iterator <ItemStack> itStack = rq.iterator();
|
||||
Iterator <Integer> size = realSizes.iterator();
|
||||
|
||||
|
@ -664,6 +672,10 @@ public class TileBuilder extends TileBuildCraft implements IBuilderInventory,
|
|||
}
|
||||
|
||||
public void debugForceBlueprintCompletion () {
|
||||
if (!debugBuildTracker.markTimeIfDelay(worldObj)) {
|
||||
return;
|
||||
}
|
||||
|
||||
if (bluePrintBuilder != null) {
|
||||
SchematicToBuild slot = bluePrintBuilder.getNextBlock(worldObj, this);
|
||||
|
||||
|
@ -673,8 +685,6 @@ public class TileBuilder extends TileBuildCraft implements IBuilderInventory,
|
|||
}
|
||||
|
||||
if (bluePrintBuilder instanceof BptBuilderBlueprint) {
|
||||
((BptBuilderBlueprint) bluePrintBuilder).recomputeNeededItems();
|
||||
|
||||
LinkedList <Integer> realSize = new LinkedList<Integer>();
|
||||
|
||||
for (ItemStack stack : ((BptBuilderBlueprint) bluePrintBuilder).neededItems) {
|
||||
|
|
Loading…
Reference in a new issue