Drop blueprint if no space available in builder
This commit is contained in:
parent
7bb2808ff0
commit
1c17929fa5
1 changed files with 7 additions and 1 deletions
|
@ -40,6 +40,7 @@ import buildcraft.core.blueprints.BptBuilderBase;
|
||||||
import buildcraft.core.blueprints.BptBuilderBlueprint;
|
import buildcraft.core.blueprints.BptBuilderBlueprint;
|
||||||
import buildcraft.core.blueprints.BptBuilderTemplate;
|
import buildcraft.core.blueprints.BptBuilderTemplate;
|
||||||
import buildcraft.core.blueprints.BptContext;
|
import buildcraft.core.blueprints.BptContext;
|
||||||
|
import buildcraft.core.inventory.InvUtils;
|
||||||
import buildcraft.core.network.RPC;
|
import buildcraft.core.network.RPC;
|
||||||
import buildcraft.core.network.RPCHandler;
|
import buildcraft.core.network.RPCHandler;
|
||||||
import buildcraft.core.network.RPCSide;
|
import buildcraft.core.network.RPCSide;
|
||||||
|
@ -397,12 +398,17 @@ public class TileBuilder extends TileAbstractBuilder implements IMachine {
|
||||||
}
|
}
|
||||||
|
|
||||||
if (done) {
|
if (done) {
|
||||||
|
boolean dropBlueprint = true;
|
||||||
for (int i = 1; i < items.length; ++i) {
|
for (int i = 1; i < items.length; ++i) {
|
||||||
if (items[i] == null) {
|
if (items[i] == null) {
|
||||||
items[i] = items[0];
|
items[i] = items[0];
|
||||||
|
dropBlueprint = false;
|
||||||
break;
|
break;
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
if (dropBlueprint) {
|
||||||
|
InvUtils.dropItems(getWorld(), items[0], xCoord, yCoord, zCoord);
|
||||||
|
}
|
||||||
|
|
||||||
items[0] = null;
|
items[0] = null;
|
||||||
box.reset();
|
box.reset();
|
||||||
|
@ -732,4 +738,4 @@ public class TileBuilder extends TileAbstractBuilder implements IMachine {
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
}
|
}
|
||||||
|
|
Loading…
Reference in a new issue