mirror of
https://github.com/GTNewHorizons/EnderIO.git
synced 2026-11-19 11:59:17 +00:00
#881 farmer doesn't stop when full bug
This commit is contained in:
1 parent
79c4c764ca
commit
d532730839
1 file changed
+15
@@ -290,6 +290,11 @@ public class TileFarmStation extends AbstractPoweredTaskEntity /*implements IEnt
|
||||
FarmersCommune.instance.prepareBlock(this, bc, block, meta);
|
||||
block = worldObj.getBlock(bc.x, bc.y, bc.z);
|
||||
}
|
||||
|
||||
if(isOutputFull()) {
|
||||
return false;
|
||||
}
|
||||
|
||||
if(!isOpen(bc) && hasPower()) {
|
||||
IHarvestResult harvest = FarmersCommune.instance.harvestBlock(this, bc, block, meta);
|
||||
if(harvest != null) {
|
||||
@@ -310,6 +315,16 @@ public class TileFarmStation extends AbstractPoweredTaskEntity /*implements IEnt
|
||||
return false;
|
||||
}
|
||||
|
||||
private boolean isOutputFull() {
|
||||
for (int i = slotDefinition.minOutputSlot; i <= slotDefinition.maxOutputSlot; i++) {
|
||||
ItemStack curStack = inventory[i];
|
||||
if(curStack == null || curStack.stackSize < curStack.getMaxStackSize()) {
|
||||
return false;
|
||||
}
|
||||
}
|
||||
return true;
|
||||
}
|
||||
|
||||
public boolean hasSeed(ItemStack seeds, BlockCoord bc) {
|
||||
int slot = getSupplySlotForCoord(bc);
|
||||
ItemStack inv = inventory[slot];
|
||||
|
||||
Reference in new issue
Block a user