mirror of
https://github.com/Ellpeck/ActuallyAdditions.git
synced 2024-11-25 16:38:33 +01:00
Closes #1159
This commit is contained in:
parent
33d9cb9fdb
commit
9db46b9efc
1 changed files with 28 additions and 19 deletions
|
@ -76,6 +76,14 @@ public class TileEntityEmpowerer extends TileEntityInventoryBase {
|
|||
if (recipe != null) {
|
||||
this.recipeForRenderIndex = ActuallyAdditionsAPI.EMPOWERER_RECIPES.indexOf(recipe);
|
||||
|
||||
boolean hasPower = true;
|
||||
|
||||
for (TileEntityDisplayStand stand : stands) {
|
||||
if (stand.storage.getEnergyStored() < recipe.getEnergyPerStand() / recipe.getTime()) hasPower = false;
|
||||
}
|
||||
|
||||
if (hasPower) {
|
||||
|
||||
this.processTime++;
|
||||
boolean done = this.processTime >= recipe.getTime();
|
||||
|
||||
|
@ -101,6 +109,7 @@ public class TileEntityEmpowerer extends TileEntityInventoryBase {
|
|||
this.processTime = 0;
|
||||
this.recipeForRenderIndex = -1;
|
||||
}
|
||||
}
|
||||
} else {
|
||||
this.processTime = 0;
|
||||
this.recipeForRenderIndex = -1;
|
||||
|
|
Loading…
Reference in a new issue