Class WeatherResource

java.lang.Object
com.hypixel.hytale.builtin.weather.resources.WeatherResource
All Implemented Interfaces:
Resource<EntityStore>, Cloneable

public class WeatherResource extends Object implements Resource<EntityStore>
  • Field Details

    • WEATHER_UPDATE_RATE_S

      public static final float WEATHER_UPDATE_RATE_S
      See Also:
    • forcedWeatherIndex

      private int forcedWeatherIndex
    • previousForcedWeatherIndex

      private int previousForcedWeatherIndex
    • environmentWeather

      @Nonnull private final it.unimi.dsi.fastutil.ints.Int2IntMap environmentWeather
    • previousHour

      private int previousHour
    • playerUpdateDelay

      public float playerUpdateDelay
  • Constructor Details

    • WeatherResource

      public WeatherResource()
  • Method Details

    • getResourceType

      public static ResourceType<EntityStore,WeatherResource> getResourceType()
    • getEnvironmentWeather

      @Nonnull public it.unimi.dsi.fastutil.ints.Int2IntMap getEnvironmentWeather()
    • getWeatherIndexForEnvironment

      public int getWeatherIndexForEnvironment(int environmentId)
    • getForcedWeatherIndex

      public int getForcedWeatherIndex()
    • setForcedWeather

      public void setForcedWeather(@Nullable String forcedWeather)
    • consumeForcedWeatherChange

      public boolean consumeForcedWeatherChange()
    • compareAndSwapHour

      public boolean compareAndSwapHour(int currentHour)
    • clone

      @Nonnull public Resource<EntityStore> clone()
      Specified by:
      clone in interface Resource<EntityStore>
      Overrides:
      clone in class Object