Merge pull request #1007 from AartBluestoke/master

Allow for more advanced delivery conditions
This commit is contained in:
Flow86 2013-07-17 04:18:29 -07:00
commit c66c7aead5
3 changed files with 13 additions and 1 deletions

View file

@ -80,4 +80,11 @@ public interface IPipedItem {
public abstract boolean hasContributions();
/**
* @return the can this item be moved into this specific entity type.
* (basic BuildCraft PipedItems always return true)
*/
public abstract boolean canSinkTo(TileEntity entity);
}

View file

@ -359,4 +359,9 @@ public class EntityPassiveItem implements IPipedItem {
public boolean hasContributions() {
return contributions.size() > 0;
}
@Override
public boolean canSinkTo(TileEntity entity) {
return true; // a passive item can sink anywhere
}
}

View file

@ -243,7 +243,7 @@ public class PipeTransportItems extends PipeTransport {
TileGenericPipe pipe = (TileGenericPipe) entity;
return pipe.pipe.transport instanceof PipeTransportItems;
} else if (entity instanceof IInventory)
} else if (entity instanceof IInventory && item.canSinkTo(entity))
if (Transactor.getTransactorFor(entity).add(item.getItemStack(), o.getOpposite(), false).stackSize > 0)
return true;