[Proposal] Greenhouse Controller (aka Farming Station) (#1928)

* Added Greenhouse Controller (aka Farming Station)

* Greenhouse tiny code cleanup

* Greenhouse Controller can collect sap
This commit is contained in:
vhd 2019-12-29 16:06:56 +02:00 committed by modmuss50
parent 8a4baa8d27
commit 4f45a63a7a
15 changed files with 453 additions and 1 deletions

View file

@ -127,6 +127,7 @@ public class TRBlockEntities {
public static final BlockEntityType<FluidReplicatorBlockEntity> FLUID_REPLICATOR = register(FluidReplicatorBlockEntity.class, "fluid_replicator", TRContent.Machine.FLUID_REPLICATOR);
public static final BlockEntityType<SoildCanningMachineBlockEntity> SOLID_CANNING_MACHINE = register(SoildCanningMachineBlockEntity.class, "solid_canning_machine", TRContent.Machine.SOLID_CANNING_MACHINE);
public static final BlockEntityType<WireMillBlockEntity> WIRE_MILL = register(WireMillBlockEntity.class, "wire_mill", TRContent.Machine.WIRE_MILL);
public static final BlockEntityType<GreenhouseControllerBlockEntity> GREENHOUSE_CONTROLLER = register(GreenhouseControllerBlockEntity.class, "greenhouse_controller", TRContent.Machine.GREENHOUSE_CONTROLLER);
public static <T extends BlockEntity> BlockEntityType<T> register(Class<T> tClass, String name, ItemConvertible... items) {
return register(tClass, name, Arrays.stream(items).map(itemConvertible -> Block.getBlockFromItem(itemConvertible.asItem())).toArray(Block[]::new));

View file

@ -416,6 +416,7 @@ public class TRContent {
VACUUM_FREEZER(new GenericMachineBlock(EGui.VACUUM_FREEZER, VacuumFreezerBlockEntity::new)),
SOLID_CANNING_MACHINE(new GenericMachineBlock(EGui.SOLID_CANNING_MACHINE, SoildCanningMachineBlockEntity::new)),
WIRE_MILL(new GenericMachineBlock(EGui.WIRE_MILL, WireMillBlockEntity::new)),
GREENHOUSE_CONTROLLER(new GenericMachineBlock(EGui.GREENHOUSE_CONTROLLER, GreenhouseControllerBlockEntity::new)),
DIESEL_GENERATOR(new GenericGeneratorBlock(EGui.DIESEL_GENERATOR, DieselGeneratorBlockEntity::new)),
DRAGON_EGG_SYPHON(new GenericGeneratorBlock(null, DragonEggSyphonBlockEntity::new)),