Feature #3832: Made onRequestChange() less ambiguous (#3833)

This commit is contained in:
yueh
2018-12-23 22:41:52 +01:00
committed by GitHub
parent ed643787df
commit a847a01d8a
3 changed files with 29 additions and 13 deletions
+11 -5
View File
@@ -576,15 +576,21 @@ public class CraftingGridCache implements ICraftingGrid, ICraftingProviderHelper
@Override
public boolean isRequesting( final IAEItemStack what )
{
return this.requesting( what ) > 0;
}
@Override
public long requesting( IAEItemStack what )
{
long requested = 0;
for( final CraftingCPUCluster cluster : this.craftingCPUClusters )
{
if( cluster.isMaking( what ) )
{
return true;
}
final IAEItemStack stack = cluster.making( what );
requested += stack != null ? stack.getStackSize() : 0;
}
return false;
return requested;
}
public List<ICraftingMedium> getMediums( final ICraftingPatternDetails key )