geforkt von Mirrors/FastAsyncWorldEdit
WeatherTypes now matches upstream
Dieser Commit ist enthalten in:
Ursprung
6ccd0eb58e
Commit
4af43eb84c
@ -23,20 +23,20 @@ import javax.annotation.Nullable;
|
|||||||
|
|
||||||
public class WeatherTypes {
|
public class WeatherTypes {
|
||||||
|
|
||||||
public static final WeatherType CLEAR = register("clear");
|
static {
|
||||||
public static final WeatherType RAIN = register("rain");
|
// This isn't really a proper registry - so inject these before they're obtained.
|
||||||
public static final WeatherType THUNDER_STORM = register("thunder_storm");
|
WeatherType.REGISTRY.register("clear", new WeatherType("clear"));
|
||||||
|
WeatherType.REGISTRY.register("rain", new WeatherType("rain"));
|
||||||
|
WeatherType.REGISTRY.register("thunder_storm", new WeatherType("thunder_storm"));
|
||||||
|
}
|
||||||
|
|
||||||
|
@Nullable public static final WeatherType CLEAR = get("clear");
|
||||||
|
@Nullable public static final WeatherType RAIN = get("rain");
|
||||||
|
@Nullable public static final WeatherType THUNDER_STORM = get("thunder_storm");
|
||||||
|
|
||||||
private WeatherTypes() {
|
private WeatherTypes() {
|
||||||
}
|
}
|
||||||
|
|
||||||
private static WeatherType register(final String id) {
|
|
||||||
return register(new WeatherType(id));
|
|
||||||
}
|
|
||||||
|
|
||||||
public static WeatherType register(final WeatherType weatherType) {
|
|
||||||
return WeatherType.REGISTRY.register(weatherType.getId(), weatherType);
|
|
||||||
}
|
|
||||||
|
|
||||||
public static @Nullable WeatherType get(final String id) {
|
public static @Nullable WeatherType get(final String id) {
|
||||||
return WeatherType.REGISTRY.get(id);
|
return WeatherType.REGISTRY.get(id);
|
||||||
|
Laden…
In neuem Issue referenzieren
Einen Benutzer sperren