Search in sources :

Example 1 with IClimateSourceCircuitable

use of forestry.greenhouse.api.climate.IClimateSourceCircuitable in project ForestryMC by ForestryMC.

the class CircuitClimateSource method onRemoval.

@Override
public void onRemoval(int slot, Object tile) {
    IClimateSourceOwner owner = getCircuitable(tile);
    if (owner == null) {
        return;
    }
    IClimateSource source = owner.getClimateSource();
    if (!(source instanceof IClimateSourceCircuitable)) {
        return;
    }
    ((IClimateSourceCircuitable) source).changeSourceConfig(type, -changeChange, -rangeChange, -energyChange);
}
Also used : IClimateSourceOwner(forestry.greenhouse.api.climate.IClimateSourceOwner) IClimateSource(forestry.greenhouse.api.climate.IClimateSource) IClimateSourceCircuitable(forestry.greenhouse.api.climate.IClimateSourceCircuitable)

Example 2 with IClimateSourceCircuitable

use of forestry.greenhouse.api.climate.IClimateSourceCircuitable in project ForestryMC by ForestryMC.

the class CircuitClimateSource method onInsertion.

@Override
public void onInsertion(int slot, Object tile) {
    IClimateSourceOwner owner = getCircuitable(tile);
    if (owner == null) {
        return;
    }
    IClimateSource source = owner.getClimateSource();
    if (!(source instanceof IClimateSourceCircuitable)) {
        return;
    }
    ((IClimateSourceCircuitable) source).changeSourceConfig(type, changeChange, rangeChange, energyChange);
}
Also used : IClimateSourceOwner(forestry.greenhouse.api.climate.IClimateSourceOwner) IClimateSource(forestry.greenhouse.api.climate.IClimateSource) IClimateSourceCircuitable(forestry.greenhouse.api.climate.IClimateSourceCircuitable)

Aggregations

IClimateSource (forestry.greenhouse.api.climate.IClimateSource)2 IClimateSourceCircuitable (forestry.greenhouse.api.climate.IClimateSourceCircuitable)2 IClimateSourceOwner (forestry.greenhouse.api.climate.IClimateSourceOwner)2