mirror of
https://github.com/GTNewHorizons/ForestryMC.git
synced 2026-11-17 10:55:06 +00:00
46 lines
1.1 KiB
Java
46 lines
1.1 KiB
Java
/*******************************************************************************
|
|
* Copyright 2011-2014 SirSengir
|
|
*
|
|
* This work (the API) is licensed under the "MIT" License, see LICENSE.txt for details.
|
|
******************************************************************************/
|
|
package forestry.api.climate;
|
|
|
|
import net.minecraft.world.biome.Biome;
|
|
|
|
import forestry.api.core.INbtWritable;
|
|
|
|
/**
|
|
* A {@link IClimateState} is used to store and handle temperature and humidity.
|
|
*
|
|
* The values are oriented on the values of {@link Biome#getTemperature()} and {@link Biome#getRainfall()}.
|
|
*/
|
|
public interface IClimateState extends INbtWritable {
|
|
|
|
float getTemperature();
|
|
|
|
float getHumidity();
|
|
|
|
IClimateState addTemperature(float temperature);
|
|
|
|
IClimateState addHumidity(float humidity);
|
|
|
|
IClimateState add(IClimateState state);
|
|
|
|
IClimateState scale(double factor);
|
|
|
|
IClimateState remove(IClimateState state);
|
|
|
|
default float get(ClimateType type){
|
|
return type == ClimateType.HUMIDITY ? getHumidity() : getTemperature();
|
|
}
|
|
|
|
IClimateState copy(ClimateStateType type);
|
|
|
|
IClimateState copy();
|
|
|
|
boolean isPresent();
|
|
|
|
ClimateStateType getType();
|
|
|
|
}
|