TemperatureUtil

It has been packaged in mods.simpletweaker.util.TemperatureUtil.

Static Methods

You can call these by TemperatureUtil.method(parameters).

int clampTemperature(int temp)

Returns a temperature value.

If temp is lower than 0, return 0; upper than 25, return 25; between 0 and 25, return itself.

  • temp -> temperature

string getTemperatureState(int temp)

Returns the state of temperature.

If it is beyond 0~25, will return "unknown".

  • temp -> temperature

float getArmorTemperatureTag(IItemStack item)

Returns the temperature of the armor.

  • item -> an IItemStack instance, should be an armor

void setArmorTemperatureTag(IItemStack item, float temp)

Sets the temperature of the armor, will provide for player when it is equipped.

  • item -> an IItemStack instance, should be an armor

  • temp -> the temperature the armor provided

void removeArmorTemperatureTag(IItemStack item)

Removes the temperature of the armor.

  • item -> an IItemStack instance, should be an armor

Last updated