implemented validForPass on all inventory handlers; allowed crafting to skip second pass.
This commit is contained in:
@@ -305,4 +305,10 @@ public class WirelessTerminalGuiObject implements IPortableCell, IActionHost
|
|||||||
return null;
|
return null;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
@Override
|
||||||
|
public boolean validForPass(int i)
|
||||||
|
{
|
||||||
|
return itemStorage.validForPass( i );
|
||||||
|
}
|
||||||
|
|
||||||
}
|
}
|
||||||
|
|||||||
Vendored
+6
@@ -300,4 +300,10 @@ public class CraftingCache implements IGridCache, ICraftingProviderHelper, ICell
|
|||||||
return o;
|
return o;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
@Override
|
||||||
|
public boolean validForPass(int i)
|
||||||
|
{
|
||||||
|
return i == 1;
|
||||||
|
}
|
||||||
|
|
||||||
}
|
}
|
||||||
|
|||||||
@@ -106,4 +106,10 @@ public class CreativeCellInventory implements IMEInventoryHandler<IAEItemStack>
|
|||||||
return 0;
|
return 0;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
@Override
|
||||||
|
public boolean validForPass(int i)
|
||||||
|
{
|
||||||
|
return true;
|
||||||
|
}
|
||||||
|
|
||||||
}
|
}
|
||||||
|
|||||||
@@ -25,13 +25,13 @@ public class MEInventoryHandler<T extends IAEStack<T>> implements IMEInventoryHa
|
|||||||
public AccessRestriction myAccess = AccessRestriction.READ_WRITE;
|
public AccessRestriction myAccess = AccessRestriction.READ_WRITE;
|
||||||
public IPartitionList<T> myPartitionList = new DefaultPriorityList<T>();
|
public IPartitionList<T> myPartitionList = new DefaultPriorityList<T>();
|
||||||
|
|
||||||
public MEInventoryHandler(IMEInventory<T> i,Class<? extends IAEStack> cla) {
|
public MEInventoryHandler(IMEInventory<T> i, Class<? extends IAEStack> cla) {
|
||||||
clz = cla;
|
clz = cla;
|
||||||
|
|
||||||
if ( i instanceof IMEInventoryHandler )
|
if ( i instanceof IMEInventoryHandler )
|
||||||
internal = (IMEInventoryHandler<T>) i;
|
internal = (IMEInventoryHandler<T>) i;
|
||||||
else
|
else
|
||||||
internal = new MEPassthru<T>( i,clz );
|
internal = new MEPassthru<T>( i, clz );
|
||||||
|
|
||||||
monitor = internal instanceof IMEMonitor ? (IMEMonitor<T>) internal : null;
|
monitor = internal instanceof IMEMonitor ? (IMEMonitor<T>) internal : null;
|
||||||
}
|
}
|
||||||
@@ -113,4 +113,10 @@ public class MEInventoryHandler<T extends IAEStack<T>> implements IMEInventoryHa
|
|||||||
return internal;
|
return internal;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
@Override
|
||||||
|
public boolean validForPass(int i)
|
||||||
|
{
|
||||||
|
return true;
|
||||||
|
}
|
||||||
|
|
||||||
}
|
}
|
||||||
|
|||||||
@@ -245,4 +245,10 @@ public class MEMonitorIInventory implements IMEInventory<IAEItemStack>, IMEMonit
|
|||||||
return StorageChannel.ITEMS;
|
return StorageChannel.ITEMS;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
@Override
|
||||||
|
public boolean validForPass(int i)
|
||||||
|
{
|
||||||
|
return true;
|
||||||
|
}
|
||||||
|
|
||||||
}
|
}
|
||||||
|
|||||||
@@ -20,7 +20,7 @@ public class MEPassthru<T extends IAEStack<T>> implements IMEInventoryHandler<T>
|
|||||||
return internal;
|
return internal;
|
||||||
}
|
}
|
||||||
|
|
||||||
public MEPassthru(IMEInventory<T> i,Class<? extends IAEStack> cla) {
|
public MEPassthru(IMEInventory<T> i, Class<? extends IAEStack> cla) {
|
||||||
setInternal( i );
|
setInternal( i );
|
||||||
clz = cla;
|
clz = cla;
|
||||||
}
|
}
|
||||||
@@ -84,4 +84,10 @@ public class MEPassthru<T extends IAEStack<T>> implements IMEInventoryHandler<T>
|
|||||||
return 0;
|
return 0;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
@Override
|
||||||
|
public boolean validForPass(int i)
|
||||||
|
{
|
||||||
|
return true;
|
||||||
|
}
|
||||||
|
|
||||||
}
|
}
|
||||||
|
|||||||
@@ -272,4 +272,10 @@ public class NetworkInventoryHandler<T extends IAEStack<T>> implements IMEInvent
|
|||||||
return 0;
|
return 0;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
@Override
|
||||||
|
public boolean validForPass(int i)
|
||||||
|
{
|
||||||
|
return true;
|
||||||
|
}
|
||||||
|
|
||||||
}
|
}
|
||||||
|
|||||||
@@ -65,4 +65,10 @@ public class NullInventory<T extends IAEStack<T>> implements IMEInventoryHandler
|
|||||||
return 0;
|
return 0;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
@Override
|
||||||
|
public boolean validForPass(int i)
|
||||||
|
{
|
||||||
|
return i == 2;
|
||||||
|
}
|
||||||
|
|
||||||
}
|
}
|
||||||
|
|||||||
@@ -19,7 +19,7 @@ public class SecurityInventory implements IMEInventoryHandler<IAEItemStack>
|
|||||||
{
|
{
|
||||||
|
|
||||||
final TileSecurity securityTile;
|
final TileSecurity securityTile;
|
||||||
final public IItemList<IAEItemStack> storedItems = new ItemList(IAEItemStack.class);
|
final public IItemList<IAEItemStack> storedItems = new ItemList( IAEItemStack.class );
|
||||||
|
|
||||||
public SecurityInventory(TileSecurity ts) {
|
public SecurityInventory(TileSecurity ts) {
|
||||||
securityTile = ts;
|
securityTile = ts;
|
||||||
@@ -146,4 +146,10 @@ public class SecurityInventory implements IMEInventoryHandler<IAEItemStack>
|
|||||||
return 0;
|
return 0;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
@Override
|
||||||
|
public boolean validForPass(int i)
|
||||||
|
{
|
||||||
|
return true;
|
||||||
|
}
|
||||||
|
|
||||||
}
|
}
|
||||||
|
|||||||
@@ -74,4 +74,10 @@ public class VoidFluidInventory implements IMEInventoryHandler<IAEFluidStack>
|
|||||||
return 0;
|
return 0;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
@Override
|
||||||
|
public boolean validForPass(int i)
|
||||||
|
{
|
||||||
|
return i == 2;
|
||||||
|
}
|
||||||
|
|
||||||
}
|
}
|
||||||
|
|||||||
@@ -74,4 +74,10 @@ public class VoidItemInventory implements IMEInventoryHandler<IAEItemStack>
|
|||||||
return 0;
|
return 0;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
@Override
|
||||||
|
public boolean validForPass(int i)
|
||||||
|
{
|
||||||
|
return i == 2;
|
||||||
|
}
|
||||||
|
|
||||||
}
|
}
|
||||||
|
|||||||
@@ -219,6 +219,12 @@ public class TileMolecularAssembler extends AENetworkInvTile implements IAEAppEn
|
|||||||
return false;
|
return false;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
@Override
|
||||||
|
public boolean acceptsPlans()
|
||||||
|
{
|
||||||
|
return inv.getStackInSlot( 10 ) == null;
|
||||||
|
}
|
||||||
|
|
||||||
private boolean hasPattern()
|
private boolean hasPattern()
|
||||||
{
|
{
|
||||||
return myPlan != null && inv.getStackInSlot( 10 ) != null;
|
return myPlan != null && inv.getStackInSlot( 10 ) != null;
|
||||||
|
|||||||
Reference in New Issue
Block a user