This commit is contained in:
Anuken 2022-06-22 10:26:32 -04:00
parent 76735b01f7
commit fdc7f0468f

View File

@ -60,7 +60,7 @@ public class UnitFactory extends UnitBlock{
tile.progress = 0;
});
consume(new ConsumeItemDynamic((UnitFactoryBuild e) -> e.currentPlan != -1 ? plans.get(e.currentPlan).requirements : ItemStack.empty));
consume(new ConsumeItemDynamic((UnitFactoryBuild e) -> e.currentPlan != -1 ? plans.get(Math.min(e.currentPlan, plans.size - 1)).requirements : ItemStack.empty));
}
@Override