This commit is contained in:
Shadows_of_Fire 2018-08-12 10:44:35 -04:00
parent 33d9cb9fdb
commit 9db46b9efc

View file

@ -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;