formating fixes

This commit is contained in:
Salomão
2020-10-28 17:50:40 -03:00
parent d6499c16b0
commit b2a660ec9b
@@ -432,7 +432,7 @@ public class DualityInterface implements IGridTickable, IStorageMonitorable, IIn
} }
else if( req.isSameType( stored ) ) // same type and quantity )! else if( req.isSameType( stored ) ) // same type and quantity )!
{ {
if( req.getStackSize() == stored.getCount()) if( req.getStackSize() == stored.getCount() )
{ {
this.requireWork[slot] = null; this.requireWork[slot] = null;
} }
@@ -695,7 +695,7 @@ public class DualityInterface implements IGridTickable, IStorageMonitorable, IIn
} }
else else
{ {
changed = this.handleCrafting(x, adaptor, itemStack) || changed; changed = this.handleCrafting( x, adaptor, itemStack ) || changed;
} }
} }
else if( itemStack.getStackSize() < 0 ) else if( itemStack.getStackSize() < 0 )
@@ -759,10 +759,12 @@ public class DualityInterface implements IGridTickable, IStorageMonitorable, IIn
private boolean handleCrafting( final int x, final InventoryAdaptor d, final IAEItemStack itemStack ) private boolean handleCrafting( final int x, final InventoryAdaptor d, final IAEItemStack itemStack )
{ {
try { try
if (this.getInstalledUpgrades(Upgrades.CRAFTING) > 0 && itemStack != null) { {
this.craftingTracker.handleCrafting(x, itemStack.getStackSize(), itemStack, d, this.iHost.getTileEntity().getWorld(), if( this.getInstalledUpgrades( Upgrades.CRAFTING ) > 0 && itemStack != null )
this.gridProxy.getGrid(), this.gridProxy.getCrafting(), this.mySource); {
this.craftingTracker.handleCrafting( x, itemStack.getStackSize(), itemStack, d, this.iHost.getTileEntity().getWorld(),
this.gridProxy.getGrid(), this.gridProxy.getCrafting(), this.mySource );
} }
} }
@@ -896,17 +898,18 @@ public class DualityInterface implements IGridTickable, IStorageMonitorable, IIn
}; };
} }
private static boolean invIsBlocked(InventoryAdaptor inv) { private static boolean invIsBlocked( InventoryAdaptor inv )
if (AEConfig.instance().isFeatureEnabled(AEFeature.INSANE_BLOCKING_MODE)) {
if( AEConfig.instance().isFeatureEnabled( AEFeature.INSANE_BLOCKING_MODE ) )
{ {
return !inv.simulateRemove( 1, ItemStack.EMPTY, null ).isEmpty(); return !inv.simulateRemove( 1, ItemStack.EMPTY, null ).isEmpty();
} }
else return inv.containsItems(); else return inv.containsItems();
} }
private static boolean invIsBlockedGTCE(GTCEInventoryAdaptor inv) private static boolean invIsBlockedGTCE( GTCEInventoryAdaptor inv )
{ {
return (!inv.canRemoveAllExceptCircuits()); return ( !inv.canRemoveAllExceptCircuits() );
} }
@Override @Override
@@ -957,17 +960,17 @@ public class DualityInterface implements IGridTickable, IStorageMonitorable, IIn
{ {
if( this.isBlocking() ) if( this.isBlocking() )
{ {
if (te.getBlockType().getRegistryName().getResourceDomain().equals("gregtech")) if( te.getBlockType().getRegistryName().getResourceDomain().equals( "gregtech" ) )
{ {
GTad = GTCEInventoryAdaptor.getAdaptor( te, s.getOpposite() ); GTad = GTCEInventoryAdaptor.getAdaptor( te, s.getOpposite() );
if (invIsBlockedGTCE(GTad)) if( invIsBlockedGTCE( GTad ) )
{ {
continue; continue;
} }
} }
else else
{ {
if (invIsBlocked(ad)) if( invIsBlocked( ad ) )
{ {
continue; continue;
} }
@@ -1019,10 +1022,10 @@ public class DualityInterface implements IGridTickable, IStorageMonitorable, IIn
final InventoryAdaptor ad = InventoryAdaptor.getAdaptor( te, s.getOpposite() ); final InventoryAdaptor ad = InventoryAdaptor.getAdaptor( te, s.getOpposite() );
if( ad != null ) if( ad != null )
{ {
if (te.getBlockType().getRegistryName().getResourceDomain().equals("gregtech")) if( te.getBlockType().getRegistryName().getResourceDomain().equals( "gregtech" ) )
{ {
GTad = GTCEInventoryAdaptor.getAdaptor( te, s.getOpposite() ); GTad = GTCEInventoryAdaptor.getAdaptor( te, s.getOpposite() );
if ( !invIsBlockedGTCE(GTad) ) if( !invIsBlockedGTCE( GTad ) )
{ {
allAreBusy = false; allAreBusy = false;
break; break;
@@ -1030,7 +1033,7 @@ public class DualityInterface implements IGridTickable, IStorageMonitorable, IIn
} }
else else
{ {
if( !invIsBlocked(ad) ) if( !invIsBlocked( ad ) )
{ {
allAreBusy = false; allAreBusy = false;
break; break;