Enum Class ItemWeatherContainer.WeatherContainerType

java.lang.Object
java.lang.Enum<ItemWeatherContainer.WeatherContainerType>
org.cyclops.evilcraft.item.ItemWeatherContainer.WeatherContainerType
All Implemented Interfaces:
Serializable, Comparable<ItemWeatherContainer.WeatherContainerType>, Constable
Enclosing class:
ItemWeatherContainer

public static enum ItemWeatherContainer.WeatherContainerType extends Enum<ItemWeatherContainer.WeatherContainerType>
Enum containing the data for the different weather container types. New weather containers should be added by adding an entry in this enum
  • Enum Constant Details

  • Method Details

    • values

      Returns an array containing the constants of this enum class, in the order they are declared.
      Returns:
      an array containing the constants of this enum class, in the order they are declared
    • valueOf

      public static ItemWeatherContainer.WeatherContainerType valueOf(String name)
      Returns the enum constant of this class with the specified name. The string must match exactly an identifier used to declare an enum constant in this class. (Extraneous whitespace characters are not permitted.)
      Parameters:
      name - the name of the enum constant to be returned.
      Returns:
      the enum constant with the specified name
      Throws:
      IllegalArgumentException - if this enum class has no constant with the specified name
      NullPointerException - if the argument is null
    • onFill

      public void onFill(net.minecraft.server.level.ServerLevel world, net.minecraft.world.item.ItemStack containerStack)
      When the actual filling of the container should be called.
      Parameters:
      world - The world.
      containerStack - The weather container that was filled.
    • onUse

      public void onUse(net.minecraft.server.level.ServerLevel world, net.minecraft.world.item.ItemStack containerStack)
      When the actual usage of the container should be called.
      Parameters:
      world - The world.
      containerStack - The weather container that was thrown.
    • getWeatherContainerType

      public static ItemWeatherContainer.WeatherContainerType getWeatherContainerType(WeatherType weatherType)
      Returns the WeatherContainerType corresponding to the given WeatherType.
      Parameters:
      weatherType - The WeatherType.
      Returns:
      The corresponding WeatherContainerType, or null in case no match was found.