use of forestry.greenhouse.api.greenhouse.IGreenhouseProviderListener in project ForestryMC by ForestryMC.
the class WallBlockHandler method onCheckPosition.
@Override
public boolean onCheckPosition(IGreenhouseBlockStorage storage, IBlankBlock rootBlock, BlockPos position, EnumFacing facing, IGreenhouseBlock block, List<IGreenhouseBlock> newBlocksToCheck) {
IGreenhouseProvider provider = storage.getProvider();
if (block == null && isValidWallBlock(provider.getWorld(), position)) {
for (IGreenhouseProviderListener listener : provider.getListeners()) {
listener.onCheckPosition(position);
}
IWallBlock wallBlock = createBlock(storage, rootBlock, facing, position);
storage.setBlock(position, wallBlock);
rootBlock.setFaceTested(facing, true);
rootBlock.setNearWall(true);
return true;
}
return false;
}
Aggregations