mirror of
https://github.com/GTNewHorizons/EnderIO.git
synced 2026-11-19 03:49:31 +00:00
Add basic item buffer. WIP.
This commit is contained in:
1 parent
950140aa15
commit
a1bce90bd6
17 files changed
+388
-23
No files matched your search
@@ -324,10 +324,15 @@ public abstract class AbstractMachineEntity extends TileEntityEio implements ISi
|
||||
|
||||
BlockCoord loc = getLocation().getLocation(dir);
|
||||
TileEntity te = worldObj.getTileEntity(loc.x, loc.y, loc.z);
|
||||
|
||||
return doPush(dir, te, slotDefinition.minOutputSlot, slotDefinition.maxInputSlot);
|
||||
}
|
||||
|
||||
protected boolean doPush(ForgeDirection dir, TileEntity te, int minSlot, int maxSlot) {
|
||||
if(te == null) {
|
||||
return false;
|
||||
}
|
||||
for (int i = slotDefinition.minOutputSlot; i <= slotDefinition.maxOutputSlot; i++) {
|
||||
for (int i = minSlot; i <= maxSlot; i++) {
|
||||
ItemStack item = inventory[i];
|
||||
if(item != null) {
|
||||
int num = ItemUtil.doInsertItem(te, item, dir.getOpposite());
|
||||
|
||||
Reference in new issue
Block a user