fixed template item selection

This commit is contained in:
SpaceToad 2014-04-08 15:56:56 +02:00
parent 7e0ece006b
commit aa5915ed4e
2 changed files with 6 additions and 6 deletions

View file

@ -283,17 +283,13 @@ public class TileBuilder extends TileAbstractBuilder implements IMachine {
bpt.transformToWorld(transform);
BptBuilderBase result = null;
if (items[0].getItem() instanceof ItemBlueprintStandard) {
result = new BptBuilderBlueprint((Blueprint) bpt, worldObj, x, y, z);
return new BptBuilderBlueprint((Blueprint) bpt, worldObj, x, y, z);
} else if (items[0].getItem() instanceof ItemBlueprintTemplate) {
return new BptBuilderTemplate(bpt, worldObj, x, y, z);
} else {
result = null;
return null;
}
return result;
}
public void iterateBpt() {

View file

@ -110,6 +110,10 @@ public class BptBuilderTemplate extends BptBuilderBase {
IInvSlot firstSlotToConsume = null;
for (IInvSlot invSlot : InventoryIterator.getIterable(builder, ForgeDirection.UNKNOWN)) {
if (!builder.isBuildingMaterialSlot(invSlot.getIndex())) {
continue;
}
ItemStack stack = invSlot.getStackInSlot();
if (stack != null && stack.stackSize > 0) {