Class TemperatureUnitLookup

java.lang.Object
com.github.thedeathlycow.thermoo.api.util.TemperatureUnitLookup

public final class TemperatureUnitLookup extends Object
  • Method Details

    • fromCurrentLanguage

      @Environment(CLIENT) public static TemperatureUnit fromCurrentLanguage()
      Gets the currently selected temperature unit from the player's currently selected language. For languages based on a language from the United States locale, this will be Fahrenheit. For all other locales, this is Celsius.

      Currently, the languages that will return Fahrenheit are English (U.S.), Hawaiian, and LOLCAT.

      This method is only available on the client.

      Returns:
      Returns Fahrenheit if the currently selected language is from a US-based locale.
    • fromLanguageCode

      public static TemperatureUnit fromLanguageCode(String mcLanguageCode)
      Gets the temperature unit from the given language Minecraft language code. For languages based on a language from the United States locale, this will be Fahrenheit. For all other locales, this is Celsius.

      Currently, the languages that will return Fahrenheit are English (U.S.), Hawaiian, and LOLCAT.

      Returns:
      Returns Fahrenheit if the language code is from a US-based locale.
    • fromLocale

      public static TemperatureUnit fromLocale()
      Gets the temperature unit from the default locale. For the United States, Liberia, and a few Caribbean countries, this is Fahrenheit. For all others it is Celsius.
      Returns:
      Returns the temperature unit associated with the default locale
    • fromLocale

      public static TemperatureUnit fromLocale(Locale locale)
      Gets the temperature unit from the given locale. For the United States, Liberia, and a few Caribbean countries, this is Fahrenheit. For all others it is Celsius.
      Returns:
      Returns the temperature unit associated with the given locale