public abstract class WeatherType
extends java.lang.Object
| Modifier and Type | Field and Description |
|---|---|
static WeatherType |
ANY
Any weather type.
|
static WeatherType |
CLEAR
Clear weather.
|
static WeatherType |
LIGHTNING
Lightning.
|
static WeatherType |
RAIN
Rain.
|
static WeatherType[] |
WEATHER_TYPES
Array that contains all possible weather types
|
| Modifier | Constructor and Description |
|---|---|
protected |
WeatherType(java.lang.String name) |
| Modifier and Type | Method and Description |
|---|---|
abstract void |
activate(net.minecraft.world.World world)
Activate this weather in the given world.
|
void |
activate(net.minecraft.world.World world,
boolean activate)
Activate or deactivate this weather in the given world.
|
abstract void |
deactivate(net.minecraft.world.World world)
Deactivate this weather in the given world.
|
static WeatherType |
getActiveWeather(net.minecraft.world.World world)
Returns the current active weather type.
|
abstract boolean |
isActive(net.minecraft.world.World world)
Check if this weather is active in the given world.
|
java.lang.String |
toString() |
static WeatherType |
valueOf(java.lang.String type)
Get a weather type by name.
|
public static final WeatherType ANY
public static final WeatherType CLEAR
public static final WeatherType RAIN
public static final WeatherType LIGHTNING
public static final WeatherType[] WEATHER_TYPES
public java.lang.String toString()
toString in class java.lang.Objectpublic abstract boolean isActive(net.minecraft.world.World world)
world - The world.public abstract void activate(net.minecraft.world.World world)
world - The world.public abstract void deactivate(net.minecraft.world.World world)
world - The world.public void activate(net.minecraft.world.World world,
boolean activate)
world - The world.activate - If the weather must be activated.public static WeatherType getActiveWeather(net.minecraft.world.World world)
world - The world.WeatherType,
or null in case no known active weather
type was found.public static WeatherType valueOf(java.lang.String type)
type - The type name.