FZ Integration Re-Added.
This commit is contained in:
parent
9e85c33b16
commit
43beaea742
2 changed files with 16 additions and 8 deletions
|
@ -99,8 +99,6 @@ public class FZ implements IFZ, IIntegrationModule
|
|||
{
|
||||
if ( day_BarrelClass.isInstance( te ) )
|
||||
day_item.set( te, input == null ? null : input.copy() );
|
||||
|
||||
te.markDirty();
|
||||
}
|
||||
catch (IllegalArgumentException e)
|
||||
{
|
||||
|
@ -168,7 +166,11 @@ public class FZ implements IFZ, IIntegrationModule
|
|||
{
|
||||
Class c = Class.forName( "factorization.oreprocessing.TileEntityGrinder" );
|
||||
Method m = c.getMethod( "addRecipe", Object.class, ItemStack.class, float.class );
|
||||
m.invoke( c, in, out, 1.0 );
|
||||
|
||||
float amt = out.stackSize;
|
||||
out.stackSize = 1;
|
||||
|
||||
m.invoke( c, in, out, amt );
|
||||
}
|
||||
catch (Throwable t)
|
||||
{
|
||||
|
|
|
@ -38,9 +38,15 @@ public class FactorizationBarrel implements IMEInventory<IAEItemStack>
|
|||
return fProxy.barrelGetMaxItemCount( te ) - fProxy.barrelGetItemCount( te );
|
||||
}
|
||||
|
||||
public boolean containsItemType(IAEItemStack i)
|
||||
public boolean containsItemType(IAEItemStack i, boolean acceptEmpty)
|
||||
{
|
||||
return i.equals( fProxy.barrelGetItem( te ) );
|
||||
ItemStack currentItem = fProxy.barrelGetItem( te );
|
||||
|
||||
// empty barrels want your love too!
|
||||
if ( acceptEmpty && currentItem == null )
|
||||
return true;
|
||||
|
||||
return i.equals( currentItem );
|
||||
}
|
||||
|
||||
public long storedItemCount()
|
||||
|
@ -66,7 +72,7 @@ public class FactorizationBarrel implements IMEInventory<IAEItemStack>
|
|||
fProxy.setItemType( te, input.getItemStack() );
|
||||
}
|
||||
|
||||
if ( containsItemType( input ) )
|
||||
if ( containsItemType( input, mode == Actionable.SIMULATE ) )
|
||||
{
|
||||
int max = fProxy.barrelGetMaxItemCount( te );
|
||||
int newTotal = (int) storedItemCount() + (int) input.getStackSize();
|
||||
|
@ -92,7 +98,7 @@ public class FactorizationBarrel implements IMEInventory<IAEItemStack>
|
|||
@Override
|
||||
public IAEItemStack extractItems(IAEItemStack request, Actionable mode, BaseActionSource src)
|
||||
{
|
||||
if ( containsItemType( request ) )
|
||||
if ( containsItemType( request, false ) )
|
||||
{
|
||||
int howMany = (int) storedItemCount();
|
||||
if ( request.getStackSize() >= howMany )
|
||||
|
|
Loading…
Reference in a new issue