remove crafting penalties

This commit is contained in:
PrototypeTrousers
2022-02-28 00:13:07 -03:00
parent 285fc6314c
commit 6b29288de6
2 changed files with 4 additions and 51 deletions
@@ -19,7 +19,6 @@
package appeng.parts.automation;
import javax.annotation.Nullable;
import com.google.common.collect.ImmutableList;
import com.google.common.collect.ImmutableSet;
@@ -72,8 +71,6 @@ import appeng.util.item.AEItemStack;
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" );
@PartModels
@@ -156,22 +153,8 @@ public class PartExportBus extends PartSharedItemBus implements ICraftingRequest
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;
@@ -197,21 +180,7 @@ public class PartExportBus extends PartSharedItemBus implements ICraftingRequest
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;
if( this.didSomething )
{
this.failedCraftTriesSlot[x] = 0;
}
else
{
this.failedCraftTriesSlot[x] += 2;
}
}
this.failedCraftTriesSlot[x] -= 1;
this.didSomething = this.craftingTracker.handleCrafting( slotToExport, this.itemToSend, ais, destination, this.getTile().getWorld(), this.getProxy().getGrid(), cg, this.mySrc ) || this.didSomething;
}
}
@@ -310,7 +279,7 @@ public class PartExportBus extends PartSharedItemBus implements ICraftingRequest
items.setCachedItemStack( remaining );
}
}
if( remaining == inputStack )
{
return items;