Package org.cyclops.evilcraft.item
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
-
Nested Class Summary
Nested classes/interfaces inherited from class java.lang.Enum
Enum.EnumDesc<E extends Enum<E>> -
Enum Constant Summary
Enum Constants -
Method Summary
Modifier and TypeMethodDescriptiongetWeatherContainerType(WeatherType weatherType) Returns the WeatherContainerType corresponding to the given WeatherType.voidonFill(net.minecraft.server.level.ServerLevel world, net.minecraft.world.item.ItemStack containerStack) When the actual filling of the container should be called.voidonUse(net.minecraft.server.level.ServerLevel world, net.minecraft.world.item.ItemStack containerStack) When the actual usage of the container should be called.Returns the enum constant of this class with the specified name.values()Returns an array containing the constants of this enum class, in the order they are declared.
-
Enum Constant Details
-
EMPTY
Empty weather container. -
CLEAR
Clear weather container. -
RAIN
Rain weather container. -
LIGHTNING
Lightning weather container.
-
-
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
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 nameNullPointerException- 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.
-