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);
}
}
Aggregations