use of forestry.greenhouse.api.climate.IClimateContainer in project ForestryMC by ForestryMC.
the class WallBlock method onCreate.
@Override
public void onCreate() {
IClimateContainer container = provider.getClimateContainer();
for (IClimateSourceOwner sourceOwner : GreenhouseManager.climateManager.getSources(provider.getWorld(), new Position2D(pos))) {
IClimateSource source = sourceOwner.getClimateSource();
sources.add(source);
container.addClimateSource(source);
source.onAdded(container);
}
}
use of forestry.greenhouse.api.climate.IClimateContainer in project ForestryMC by ForestryMC.
the class WallBlock method onRemove.
@Override
public void onRemove() {
IClimateContainer container = provider.getClimateContainer();
Iterator<IClimateSource> iterator = sources.iterator();
while (iterator.hasNext()) {
IClimateSource source = iterator.next();
source.onRemoved(container);
container.removeClimateSource(source);
iterator.remove();
}
}
Aggregations