Skip to content

Commit 11f1d36

Browse files
authored
Merge pull request #34 from repo-alt/rv3-1.7.10
Blocking mode support for input buses and the like
2 parents bbe3ca9 + 35ab1a4 commit 11f1d36

File tree

2 files changed

+9
-6
lines changed

2 files changed

+9
-6
lines changed

gradle.properties

+1-1
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,6 @@
11
aeversion=rv3
22
aechannel=beta
3-
aebuild=39-GTNH
3+
aebuild=40-GTNH
44
#KEEP V6 FOR MOD SUPPORT
55
aegroup=appeng
66
aebasename=appliedenergistics2

src/main/java/appeng/helpers/DualityInterface.java

+8-5
Original file line numberDiff line numberDiff line change
@@ -889,6 +889,11 @@ private boolean gtMachineHasOnlyCircuit(InventoryAdaptor ad) {
889889
}
890890
return true;
891891
}
892+
private boolean inventoryCountsAsEmpty(TileEntity te, InventoryAdaptor ad)
893+
{
894+
return te.getBlockType().getUnlocalizedName().equals("gt.blockmachines") && gtMachineHasOnlyCircuit(ad);
895+
}
896+
892897
@Override
893898
public boolean pushPattern( final ICraftingPatternDetails patternDetails, final InventoryCrafting table )
894899
{
@@ -935,10 +940,8 @@ public boolean pushPattern( final ICraftingPatternDetails patternDetails, final
935940
final InventoryAdaptor ad = InventoryAdaptor.getAdaptor( te, s.getOpposite() );
936941
if( ad != null )
937942
{
938-
if (this.isBlocking() && ad.containsItems()) {
939-
if (!te.getBlockType().getUnlocalizedName().equals("gt.blockmachines") || !gtMachineHasOnlyCircuit(ad))
940-
continue;
941-
}
943+
if (this.isBlocking() && ad.containsItems() && !inventoryCountsAsEmpty(te, ad))
944+
continue;
942945

943946
if( this.acceptsItems( ad, table ) )
944947
{
@@ -985,7 +988,7 @@ public boolean isBusy()
985988
final InventoryAdaptor ad = InventoryAdaptor.getAdaptor( te, s.getOpposite() );
986989
if( ad != null )
987990
{
988-
if( ad.simulateRemove( 1, null, null ) == null )
991+
if( ad.simulateRemove( 1, null, null ) == null || inventoryCountsAsEmpty(te, ad))
989992
{
990993
allAreBusy = false;
991994
break;

0 commit comments

Comments
 (0)