public final class ClimateStateHelper extends java.lang.Object implements IClimateStateHelper
| Modifier and Type | Field and Description |
|---|---|
static float |
CLIMATE_CHANGE |
static ClimateStateHelper |
INSTANCE |
static IClimateState |
ZERO_STATE |
| Modifier and Type | Method and Description |
|---|---|
IClimateState |
absent() |
IClimateState |
checkState(IClimateState climateState)
Checks if the given state is valid and returns the absent state if the given state is not valid.
|
IClimateState |
clamp(IClimateState climateState) |
IClimateState |
create(ClimateType type,
float value)
Creates a state that contains the given value of the given type and 0.0F as the value of the other type.
|
IClimateState |
create(float temperature,
float humidity)
Creates a climate state of the given two climate values.
|
IClimateState |
create(float temperature,
float humidity,
boolean mutable)
Creates a climate state of the given two climate values.
|
IClimateState |
create(IClimateState climateState)
Creates a copy of the given state.
|
IClimateState |
create(IClimateState climateState,
boolean mutable)
Creates a copy of the given state.
|
IClimateState |
create(net.minecraft.nbt.NBTTagCompound compound)
Creates a state based on the data that the given compound contains.
|
IClimateState |
create(net.minecraft.nbt.NBTTagCompound compound,
boolean mutable)
Creates a state based on the data that the given compound contains.
|
static boolean |
isNearTarget(ClimateType type,
IClimateState state,
IClimateState target) |
static boolean |
isNearTarget(IClimateState state,
IClimateState target) |
static boolean |
isNearZero(ClimateType type,
IClimateState state) |
static boolean |
isNearZero(IClimateState state) |
static boolean |
isZero(ClimateType type,
IClimateState state) |
static boolean |
isZero(IClimateState state) |
IClimateState |
max() |
IClimateState |
min() |
static IClimateState |
mutableOf(float temperature,
float humidity) |
IClimateState |
mutableZero() |
static IClimateState |
of(float temperature,
float humidity) |
static IClimateState |
of(float temperature,
float humidity,
boolean mutable) |
net.minecraft.nbt.NBTTagCompound |
writeToNBT(net.minecraft.nbt.NBTTagCompound compound,
IClimateState state)
Writes the data of the given state to the given compound.
|
IClimateState |
zero() |
public static final ClimateStateHelper INSTANCE
public static final IClimateState ZERO_STATE
public static final float CLIMATE_CHANGE
public static IClimateState of(float temperature, float humidity, boolean mutable)
public static IClimateState of(float temperature, float humidity)
public static IClimateState mutableOf(float temperature, float humidity)
public static boolean isNearTarget(IClimateState state, IClimateState target)
public static boolean isNearTarget(ClimateType type, IClimateState state, IClimateState target)
public static boolean isZero(IClimateState state)
public static boolean isNearZero(ClimateType type, IClimateState state)
public static boolean isZero(ClimateType type, IClimateState state)
public static boolean isNearZero(IClimateState state)
public IClimateState create(float temperature, float humidity)
IClimateStateHelpercreate in interface IClimateStateHelpertemperature - The temperature value of the new state.humidity - The humidity value of the new state.public IClimateState create(ClimateType type, float value)
IClimateStateHelpercreate in interface IClimateStateHelpertype - The type of the given value.value - The value of the given type.public IClimateState create(IClimateState climateState)
IClimateStateHelpercreate in interface IClimateStateHelperclimateState - The state that should be copied.public IClimateState create(IClimateState climateState, boolean mutable)
IClimateStateHelpercreate in interface IClimateStateHelperclimateState - The state that should be copied.mutable - If the copy should be mutable.public IClimateState create(float temperature, float humidity, boolean mutable)
IClimateStateHelpercreate in interface IClimateStateHelpertemperature - The temperature value of the new state.humidity - The humidity value of the new state.mutable - If the new state should be mutable.public IClimateState create(net.minecraft.nbt.NBTTagCompound compound, boolean mutable)
IClimateStateHelpercreate in interface IClimateStateHelpercompound - The compound that contains the data.mutable - If the copy should be mutable.public IClimateState create(net.minecraft.nbt.NBTTagCompound compound)
IClimateStateHelpercreate in interface IClimateStateHelpercompound - The compound that contains the data.public net.minecraft.nbt.NBTTagCompound writeToNBT(net.minecraft.nbt.NBTTagCompound compound,
IClimateState state)
IClimateStateHelperwriteToNBT in interface IClimateStateHelpercompound - The compound that the data will be writen to.state - The state that contains the data.public IClimateState checkState(IClimateState climateState)
IClimateStateHelpercheckState in interface IClimateStateHelperpublic IClimateState clamp(IClimateState climateState)
clamp in interface IClimateStateHelperpublic IClimateState absent()
absent in interface IClimateStateHelperpublic IClimateState min()
min in interface IClimateStateHelperIClimateState.public IClimateState max()
max in interface IClimateStateHelperIClimateState.public IClimateState zero()
zero in interface IClimateStateHelperIClimateState.getHumidity() and
IClimateState.getTemperature() are zero.public IClimateState mutableZero()
mutableZero in interface IClimateStateHelperIClimateState.getHumidity() and
IClimateState.getTemperature() are zero.