Search in sources :

Example 1 with BlockGreenhouseType

use of forestry.greenhouse.blocks.BlockGreenhouseType in project ForestryMC by ForestryMC.

the class TileGreenhousePlain method onMachineAssembled.

@Override
public void onMachineAssembled(IMultiblockController multiblockController, BlockPos minCoord, BlockPos maxCoord) {
    super.onMachineAssembled(multiblockController, minCoord, maxCoord);
    IGreenhouseController greenhouseController = (IGreenhouseController) multiblockController;
    // set border block state
    int bandY = maxCoord.getY();
    if (getPos().getY() == bandY) {
        BlockGreenhouseType type = BlockGreenhouseType.BORDER;
        if (getPos().equals(greenhouseController.getCenterCoordinates())) {
            type = BlockGreenhouseType.BORDER_CENTER;
        }
        this.world.setBlockState(getPos(), ModuleGreenhouse.getBlocks().greenhouseBlock.getDefaultState().withProperty(BlockGreenhouse.TYPE, type), 2);
    }
}
Also used : BlockGreenhouseType(forestry.greenhouse.blocks.BlockGreenhouseType) IGreenhouseController(forestry.api.multiblock.IGreenhouseController)

Aggregations

IGreenhouseController (forestry.api.multiblock.IGreenhouseController)1 BlockGreenhouseType (forestry.greenhouse.blocks.BlockGreenhouseType)1