Blocking mode support for input buses and the like

(https://github.com/GTNewHorizons/GT-New-Horizons-Modpack/issues/7288)
This commit is contained in:
repo_alt committed 2021-01-11 11:37:13 +03:00
1 parent bbe3ca9c62
commit 35ab1a4436
2 files changed
+9 -6

No files matched your search

+1 -1
View File
@@ -1,6 +1,6 @@
aeversion=rv3
aechannel=beta
aebuild=39-GTNH
aebuild=40-GTNH
#KEEP V6 FOR MOD SUPPORT
aegroup=appeng
aebasename=appliedenergistics2
@@ -889,6 +889,11 @@ public class DualityInterface
}
return true;
}
private boolean inventoryCountsAsEmpty(TileEntity te, InventoryAdaptor ad)
{
return te.getBlockType().getUnlocalizedName().equals("gt.blockmachines") && gtMachineHasOnlyCircuit(ad);
}
@Override
public boolean pushPattern( final ICraftingPatternDetails patternDetails, final InventoryCrafting table )
{
@@ -935,10 +940,8 @@ public class DualityInterface
final InventoryAdaptor ad = InventoryAdaptor.getAdaptor( te, s.getOpposite() );
if( ad != null )
{
if (this.isBlocking() && ad.containsItems()) {
if (!te.getBlockType().getUnlocalizedName().equals("gt.blockmachines") || !gtMachineHasOnlyCircuit(ad))
continue;
}
if (this.isBlocking() && ad.containsItems() && !inventoryCountsAsEmpty(te, ad))
continue;
if( this.acceptsItems( ad, table ) )
{
@@ -985,7 +988,7 @@ public class DualityInterface
final InventoryAdaptor ad = InventoryAdaptor.getAdaptor( te, s.getOpposite() );
if( ad != null )
{
if( ad.simulateRemove( 1, null, null ) == null )
if( ad.simulateRemove( 1, null, null ) == null || inventoryCountsAsEmpty(te, ad))
{
allAreBusy = false;
break;