This commit is contained in:
Anuken
2020-10-24 10:21:57 -04:00
parent 1ffa3f21f0
commit 646b022d38
10 changed files with 51 additions and 19 deletions
@@ -33,8 +33,6 @@ public class UnitFactory extends UnitBlock{
hasPower = true;
hasItems = true;
solid = true;
//flags = EnumSet.of(BlockFlag.producer, BlockFlag.unitModifier);
//unitCapModifier = 2;
configurable = true;
outputsPayload = true;
rotate = true;
@@ -44,6 +42,11 @@ public class UnitFactory extends UnitBlock{
tile.progress = 0;
});
config(UnitType.class, (UnitFactoryBuild tile, UnitType val) -> {
tile.currentPlan = plans.indexOf(p -> p.unit == val);
tile.progress = 0;
});
consumes.add(new ConsumeItemDynamic((UnitFactoryBuild e) -> e.currentPlan != -1 ? plans.get(e.currentPlan).requirements : ItemStack.empty));
}