remove crafting penalties
This commit is contained in:
@@ -108,8 +108,6 @@ import static gregtech.api.block.machines.BlockMachine.getMetaTileEntity;
|
|||||||
|
|
||||||
public class DualityInterface implements IGridTickable, IStorageMonitorable, IInventoryDestination, IAEAppEngInventory, IConfigManagerHost, ICraftingProvider, IUpgradeableHost
|
public class DualityInterface implements IGridTickable, IStorageMonitorable, IInventoryDestination, IAEAppEngInventory, IConfigManagerHost, ICraftingProvider, IUpgradeableHost
|
||||||
{
|
{
|
||||||
private final 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;
|
||||||
public static final int NUMBER_OF_PATTERN_SLOTS = 36;
|
public static final int NUMBER_OF_PATTERN_SLOTS = 36;
|
||||||
@@ -970,21 +968,7 @@ 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 )
|
return this.craftingTracker.handleCrafting( x, itemStack.getStackSize(), itemStack, d, this.iHost.getTileEntity().getWorld(), this.gridProxy.getGrid(), this.gridProxy.getCrafting(), this.mySource );
|
||||||
{
|
|
||||||
boolean crafted = this.craftingTracker.handleCrafting( x, itemStack.getStackSize(), itemStack, d, this.iHost.getTileEntity().getWorld(), this.gridProxy.getGrid(), this.gridProxy.getCrafting(), this.mySource );
|
|
||||||
|
|
||||||
if( crafted )
|
|
||||||
{
|
|
||||||
this.failedCraftTriesSlot[x] = 0;
|
|
||||||
}
|
|
||||||
else
|
|
||||||
{
|
|
||||||
this.failedCraftTriesSlot[x] += 2;
|
|
||||||
}
|
|
||||||
return crafted;
|
|
||||||
}
|
|
||||||
this.failedCraftTriesSlot[x] -= 1;
|
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
catch( final GridAccessException e )
|
catch( final GridAccessException e )
|
||||||
|
|||||||
@@ -19,7 +19,6 @@
|
|||||||
package appeng.parts.automation;
|
package appeng.parts.automation;
|
||||||
|
|
||||||
|
|
||||||
import javax.annotation.Nullable;
|
|
||||||
import com.google.common.collect.ImmutableList;
|
import com.google.common.collect.ImmutableList;
|
||||||
import com.google.common.collect.ImmutableSet;
|
import com.google.common.collect.ImmutableSet;
|
||||||
|
|
||||||
@@ -72,8 +71,6 @@ import appeng.util.item.AEItemStack;
|
|||||||
|
|
||||||
public class PartExportBus extends PartSharedItemBus implements ICraftingRequester
|
public class PartExportBus extends PartSharedItemBus implements ICraftingRequester
|
||||||
{
|
{
|
||||||
private final int[] failedCraftTriesSlot = {0, 0, 0, 0, 0, 0, 0, 0, 0};
|
|
||||||
|
|
||||||
public static final ResourceLocation MODEL_BASE = new ResourceLocation( AppEng.MOD_ID, "part/export_bus_base" );
|
public static final ResourceLocation MODEL_BASE = new ResourceLocation( AppEng.MOD_ID, "part/export_bus_base" );
|
||||||
|
|
||||||
@PartModels
|
@PartModels
|
||||||
@@ -156,22 +153,8 @@ public class PartExportBus extends PartSharedItemBus implements ICraftingRequest
|
|||||||
|
|
||||||
if( this.craftOnly() )
|
if( this.craftOnly() )
|
||||||
{
|
{
|
||||||
if( this.failedCraftTriesSlot[x] <= 0 )
|
this.didSomething = this.craftingTracker.handleCrafting( slotToExport, this.itemToSend, ais, destination, this.getTile().getWorld(), this.getProxy().getGrid(), cg, this.mySrc ) || this.didSomething;
|
||||||
{
|
|
||||||
|
|
||||||
this.didSomething = this.craftingTracker.handleCrafting( slotToExport, this.itemToSend, ais, destination, this.getTile().getWorld(), this.getProxy().getGrid(), cg, this.mySrc ) || this.didSomething;
|
|
||||||
|
|
||||||
if( this.didSomething )
|
|
||||||
{
|
|
||||||
this.failedCraftTriesSlot[x] = 0;
|
|
||||||
}
|
|
||||||
else
|
|
||||||
{
|
|
||||||
this.failedCraftTriesSlot[x] += 2;
|
|
||||||
}
|
|
||||||
}
|
|
||||||
this.failedCraftTriesSlot[x] -= 1;
|
|
||||||
continue;
|
|
||||||
}
|
}
|
||||||
|
|
||||||
final long before = this.itemToSend;
|
final long before = this.itemToSend;
|
||||||
@@ -197,21 +180,7 @@ public class PartExportBus extends PartSharedItemBus implements ICraftingRequest
|
|||||||
|
|
||||||
if( this.itemToSend == before && this.isCraftingEnabled() )
|
if( this.itemToSend == before && this.isCraftingEnabled() )
|
||||||
{
|
{
|
||||||
if( this.failedCraftTriesSlot[x] <= 0 )
|
this.didSomething = this.craftingTracker.handleCrafting( slotToExport, this.itemToSend, ais, destination, this.getTile().getWorld(), this.getProxy().getGrid(), cg, this.mySrc ) || this.didSomething;
|
||||||
{
|
|
||||||
|
|
||||||
this.didSomething = this.craftingTracker.handleCrafting( slotToExport, this.itemToSend, ais, destination, this.getTile().getWorld(), this.getProxy().getGrid(), cg, this.mySrc ) || this.didSomething;
|
|
||||||
|
|
||||||
if( this.didSomething )
|
|
||||||
{
|
|
||||||
this.failedCraftTriesSlot[x] = 0;
|
|
||||||
}
|
|
||||||
else
|
|
||||||
{
|
|
||||||
this.failedCraftTriesSlot[x] += 2;
|
|
||||||
}
|
|
||||||
}
|
|
||||||
this.failedCraftTriesSlot[x] -= 1;
|
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
@@ -310,7 +279,7 @@ public class PartExportBus extends PartSharedItemBus implements ICraftingRequest
|
|||||||
items.setCachedItemStack( remaining );
|
items.setCachedItemStack( remaining );
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
if( remaining == inputStack )
|
if( remaining == inputStack )
|
||||||
{
|
{
|
||||||
return items;
|
return items;
|
||||||
|
|||||||
Reference in New Issue
Block a user