Fix electric furnace energy usage. Closes #1920
This commit is contained in:
parent
99b2342a1c
commit
a37a6e29a5
1 changed files with 7 additions and 17 deletions
|
@ -57,7 +57,7 @@ public class ElectricFurnaceBlockEntity extends PowerAcceptorBlockEntity
|
|||
private int cookTime;
|
||||
private int cookTimeTotal;
|
||||
// Energy cost per tick of cooking
|
||||
final int EnergyPerTick = 4;
|
||||
final int EnergyPerTick = 1;
|
||||
|
||||
public ElectricFurnaceBlockEntity() {
|
||||
super(TRBlockEntities.ELECTRIC_FURNACE );
|
||||
|
@ -99,9 +99,7 @@ public class ElectricFurnaceBlockEntity extends PowerAcceptorBlockEntity
|
|||
return true;
|
||||
}
|
||||
if (ItemUtils.isItemEqual(inventory.getInvStack(slot), recipeOutput, true, true)) {
|
||||
if (recipeOutput.getCount() + inventory.getInvStack(slot).getCount() <= recipeOutput.getMaxCount()) {
|
||||
return true;
|
||||
}
|
||||
return recipeOutput.getCount() + inventory.getInvStack(slot).getCount() <= recipeOutput.getMaxCount();
|
||||
}
|
||||
return false;
|
||||
}
|
||||
|
@ -116,11 +114,7 @@ public class ElectricFurnaceBlockEntity extends PowerAcceptorBlockEntity
|
|||
if (!canAcceptOutput(currentRecipe, outputSlot)) {
|
||||
return false;
|
||||
}
|
||||
if (getEnergy() < currentRecipe.getCookTime() * getEuPerTick(EnergyPerTick)) {
|
||||
return false;
|
||||
}
|
||||
|
||||
return true;
|
||||
return !(getEnergy() < currentRecipe.getCookTime() * getEuPerTick(EnergyPerTick));
|
||||
}
|
||||
|
||||
private void resetCrafter() {
|
||||
|
@ -149,11 +143,7 @@ public class ElectricFurnaceBlockEntity extends PowerAcceptorBlockEntity
|
|||
return false;
|
||||
}
|
||||
|
||||
if (!recipe.matches(inventory, world)) {
|
||||
return false;
|
||||
}
|
||||
|
||||
return true;
|
||||
return recipe.matches(inventory, world);
|
||||
}
|
||||
|
||||
private void craftRecipe(SmeltingRecipe recipe) {
|
||||
|
|
Loading…
Add table
Reference in a new issue