Merge branch 'rv1' of https://bitbucket.org/AlgorithmX2/appliedenergistics2 into rv2
This commit is contained in:
+26
-11
@@ -108,6 +108,7 @@ import appeng.util.item.AEItemStack;
|
||||
import appeng.util.item.AESharedNBT;
|
||||
import appeng.util.item.OreHelper;
|
||||
import appeng.util.item.OreRefrence;
|
||||
import appeng.util.prioitylist.IPartitionList;
|
||||
import buildcraft.api.tools.IToolWrench;
|
||||
import cpw.mods.fml.common.FMLCommonHandler;
|
||||
import cpw.mods.fml.common.Loader;
|
||||
@@ -1639,7 +1640,8 @@ public class Platform
|
||||
}
|
||||
|
||||
public static ItemStack extractItemsByRecipe(IEnergySource energySrc, BaseActionSource mySrc, IMEMonitor<IAEItemStack> src, World w, IRecipe r,
|
||||
ItemStack output, InventoryCrafting ci, ItemStack providedTemplate, int slot, IItemList<IAEItemStack> aitems, Actionable realForFake)
|
||||
ItemStack output, InventoryCrafting ci, ItemStack providedTemplate, int slot, IItemList<IAEItemStack> aitems, Actionable realForFake,
|
||||
IPartitionList<IAEItemStack> filter)
|
||||
{
|
||||
if ( energySrc.extractAEPower( 1, Actionable.SIMULATE, PowerMultiplier.CONFIG ) > 0.9 )
|
||||
{
|
||||
@@ -1649,14 +1651,17 @@ public class Platform
|
||||
AEItemStack ae_req = AEItemStack.create( providedTemplate );
|
||||
ae_req.setStackSize( 1 );
|
||||
|
||||
IAEItemStack ae_ext = src.extractItems( ae_req, realForFake, mySrc );
|
||||
if ( ae_ext != null )
|
||||
if ( filter == null || filter.isListed( ae_req ) )
|
||||
{
|
||||
ItemStack extracted = ae_ext.getItemStack();
|
||||
if ( extracted != null )
|
||||
IAEItemStack ae_ext = src.extractItems( ae_req, realForFake, mySrc );
|
||||
if ( ae_ext != null )
|
||||
{
|
||||
energySrc.extractAEPower( 1, realForFake, PowerMultiplier.CONFIG );
|
||||
return extracted;
|
||||
ItemStack extracted = ae_ext.getItemStack();
|
||||
if ( extracted != null )
|
||||
{
|
||||
energySrc.extractAEPower( 1, realForFake, PowerMultiplier.CONFIG );
|
||||
return extracted;
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
@@ -1677,11 +1682,14 @@ public class Platform
|
||||
{
|
||||
IAEItemStack ax = x.copy();
|
||||
ax.setStackSize( 1 );
|
||||
IAEItemStack ex = src.extractItems( ax, realForFake, mySrc );
|
||||
if ( ex != null )
|
||||
if ( filter == null || filter.isListed( ax ) )
|
||||
{
|
||||
energySrc.extractAEPower( 1, realForFake, PowerMultiplier.CONFIG );
|
||||
return ex.getItemStack();
|
||||
IAEItemStack ex = src.extractItems( ax, realForFake, mySrc );
|
||||
if ( ex != null )
|
||||
{
|
||||
energySrc.extractAEPower( 1, realForFake, PowerMultiplier.CONFIG );
|
||||
return ex.getItemStack();
|
||||
}
|
||||
}
|
||||
}
|
||||
ci.setInventorySlotContents( slot, providedTemplate );
|
||||
@@ -1836,4 +1844,11 @@ public class Platform
|
||||
// p.addStat( achivement, 1 );
|
||||
}
|
||||
}
|
||||
|
||||
public static boolean isRecipePrioritized(ItemStack what)
|
||||
{
|
||||
return AEApi.instance().materials().materialPureifiedCertusQuartzCrystal.sameAsStack( what )
|
||||
|| AEApi.instance().materials().materialPureifiedFluixCrystal.sameAsStack( what )
|
||||
|| AEApi.instance().materials().materialPureifiedNetherQuartzCrystal.sameAsStack( what );
|
||||
}
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user