mirror of
https://github.com/Ellpeck/ActuallyAdditions.git
synced 2024-11-22 15:18:34 +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) {
|
if (recipe != null) {
|
||||||
this.recipeForRenderIndex = ActuallyAdditionsAPI.EMPOWERER_RECIPES.indexOf(recipe);
|
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++;
|
this.processTime++;
|
||||||
boolean done = this.processTime >= recipe.getTime();
|
boolean done = this.processTime >= recipe.getTime();
|
||||||
|
|
||||||
|
@ -101,6 +109,7 @@ public class TileEntityEmpowerer extends TileEntityInventoryBase {
|
||||||
this.processTime = 0;
|
this.processTime = 0;
|
||||||
this.recipeForRenderIndex = -1;
|
this.recipeForRenderIndex = -1;
|
||||||
}
|
}
|
||||||
|
}
|
||||||
} else {
|
} else {
|
||||||
this.processTime = 0;
|
this.processTime = 0;
|
||||||
this.recipeForRenderIndex = -1;
|
this.recipeForRenderIndex = -1;
|
||||||
|
|
Loading…
Reference in a new issue