more tweaks testing
This commit is contained in:
@@ -112,7 +112,7 @@ import appeng.util.item.AEItemStack;
|
|||||||
|
|
||||||
public class DualityInterface implements IGridTickable, IStorageMonitorable, IInventoryDestination, IAEAppEngInventory, IConfigManagerHost, ICraftingProvider, IUpgradeableHost
|
public class DualityInterface implements IGridTickable, IStorageMonitorable, IInventoryDestination, IAEAppEngInventory, IConfigManagerHost, ICraftingProvider, IUpgradeableHost
|
||||||
{
|
{
|
||||||
private int failedCraftTriesSlot[] = {0,0,0,0,0,0,0,0,0};
|
private int[] failedCraftTriesSlot = {0,0,0,0,0,0,0,0,0};
|
||||||
|
|
||||||
public static final int NUMBER_OF_STORAGE_SLOTS = 9;
|
public static final int NUMBER_OF_STORAGE_SLOTS = 9;
|
||||||
public static final int NUMBER_OF_CONFIG_SLOTS = 9;
|
public static final int NUMBER_OF_CONFIG_SLOTS = 9;
|
||||||
@@ -765,16 +765,17 @@ public class DualityInterface implements IGridTickable, IStorageMonitorable, IIn
|
|||||||
{
|
{
|
||||||
if( this.getInstalledUpgrades( Upgrades.CRAFTING ) > 0 && itemStack != null )
|
if( this.getInstalledUpgrades( Upgrades.CRAFTING ) > 0 && itemStack != null )
|
||||||
{
|
{
|
||||||
if (this.failedCraftTriesSlot[x] <= 0) {
|
if (this.failedCraftTriesSlot[x] <= 0)
|
||||||
|
{
|
||||||
boolean crafted = this.craftingTracker.handleCrafting( x, itemStack.getStackSize(), itemStack, d, this.iHost.getTileEntity().getWorld(),
|
boolean crafted = this.craftingTracker.handleCrafting( x, itemStack.getStackSize(), itemStack, d, this.iHost.getTileEntity().getWorld(),
|
||||||
this.gridProxy.getGrid(), this.gridProxy.getCrafting(), this.mySource );
|
this.gridProxy.getGrid(), this.gridProxy.getCrafting(), this.mySource );
|
||||||
|
|
||||||
if (crafted) this.failedCraftTriesSlot[x] = 0;
|
if (crafted) this.failedCraftTriesSlot[x] = 0;
|
||||||
else this.failedCraftTriesSlot[x] += 5;
|
else{
|
||||||
|
this.failedCraftTriesSlot[x] += 4;
|
||||||
|
}
|
||||||
}
|
}
|
||||||
this.failedCraftTriesSlot[x] -= 1;
|
this.failedCraftTriesSlot[x] -= 1;
|
||||||
|
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
catch( final GridAccessException e )
|
catch( final GridAccessException e )
|
||||||
|
|||||||
@@ -150,19 +150,18 @@ public class PartExportBus extends PartSharedItemBus implements ICraftingRequest
|
|||||||
|
|
||||||
final IAEItemStack ais = this.getConfig().getAEStackInSlot( slotToExport );
|
final IAEItemStack ais = this.getConfig().getAEStackInSlot( slotToExport );
|
||||||
|
|
||||||
if( ais == null || this.itemToSend <= 0 || this.craftOnly() ) {
|
if( ais == null || this.itemToSend <= 0 ) continue;
|
||||||
if (this.isCraftingEnabled())
|
|
||||||
{
|
|
||||||
if (this.failedCraftTriesSlot[x] <= 0) {
|
|
||||||
|
|
||||||
this.didSomething = this.craftingTracker.handleCrafting(slotToExport, this.itemToSend, ais, destination, this.getTile().getWorld(),
|
if ( this.craftOnly() ) {
|
||||||
this.getProxy().getGrid(), cg, this.mySrc) || this.didSomething;
|
if (this.failedCraftTriesSlot[x] <= 0) {
|
||||||
|
|
||||||
if (this.didSomething) this.failedCraftTriesSlot[x] = 0;
|
this.didSomething = this.craftingTracker.handleCrafting(slotToExport, this.itemToSend, ais, destination, this.getTile().getWorld(),
|
||||||
else this.failedCraftTriesSlot[x] += 5;
|
this.getProxy().getGrid(), cg, this.mySrc) || this.didSomething;
|
||||||
}
|
|
||||||
this.failedCraftTriesSlot[x] -= 1;
|
if (this.didSomething) this.failedCraftTriesSlot[x] = 0;
|
||||||
|
else this.failedCraftTriesSlot[x] += 4;
|
||||||
}
|
}
|
||||||
|
this.failedCraftTriesSlot[x] -= 1;
|
||||||
continue;
|
continue;
|
||||||
}
|
}
|
||||||
|
|
||||||
@@ -192,7 +191,7 @@ public class PartExportBus extends PartSharedItemBus implements ICraftingRequest
|
|||||||
this.getProxy().getGrid(), cg, this.mySrc) || this.didSomething;
|
this.getProxy().getGrid(), cg, this.mySrc) || this.didSomething;
|
||||||
|
|
||||||
if (this.didSomething) this.failedCraftTriesSlot[x] = 0;
|
if (this.didSomething) this.failedCraftTriesSlot[x] = 0;
|
||||||
else this.failedCraftTriesSlot[x] += 5;
|
else this.failedCraftTriesSlot[x] += 4;
|
||||||
}
|
}
|
||||||
this.failedCraftTriesSlot[x] -= 1;
|
this.failedCraftTriesSlot[x] -= 1;
|
||||||
}
|
}
|
||||||
|
|||||||
Reference in New Issue
Block a user