Minestom/src/autogenerated/java/net/minestom/server/potion/PotionType.java

139 lines
3.8 KiB
Java

package net.minestom.server.potion;
import net.kyori.adventure.key.Key;
import net.kyori.adventure.key.Keyed;
import net.minestom.server.registry.Registries;
import net.minestom.server.utils.NamespaceID;
import org.jetbrains.annotations.NotNull;
import org.jetbrains.annotations.Nullable;
/**
* AUTOGENERATED by PotionTypeGenerator
*/
public enum PotionType implements Keyed {
EMPTY(NamespaceID.from("minecraft:empty")),
WATER(NamespaceID.from("minecraft:water")),
MUNDANE(NamespaceID.from("minecraft:mundane")),
THICK(NamespaceID.from("minecraft:thick")),
AWKWARD(NamespaceID.from("minecraft:awkward")),
NIGHT_VISION(NamespaceID.from("minecraft:night_vision")),
LONG_NIGHT_VISION(NamespaceID.from("minecraft:long_night_vision")),
INVISIBILITY(NamespaceID.from("minecraft:invisibility")),
LONG_INVISIBILITY(NamespaceID.from("minecraft:long_invisibility")),
LEAPING(NamespaceID.from("minecraft:leaping")),
LONG_LEAPING(NamespaceID.from("minecraft:long_leaping")),
STRONG_LEAPING(NamespaceID.from("minecraft:strong_leaping")),
FIRE_RESISTANCE(NamespaceID.from("minecraft:fire_resistance")),
LONG_FIRE_RESISTANCE(NamespaceID.from("minecraft:long_fire_resistance")),
SWIFTNESS(NamespaceID.from("minecraft:swiftness")),
LONG_SWIFTNESS(NamespaceID.from("minecraft:long_swiftness")),
STRONG_SWIFTNESS(NamespaceID.from("minecraft:strong_swiftness")),
SLOWNESS(NamespaceID.from("minecraft:slowness")),
LONG_SLOWNESS(NamespaceID.from("minecraft:long_slowness")),
STRONG_SLOWNESS(NamespaceID.from("minecraft:strong_slowness")),
TURTLE_MASTER(NamespaceID.from("minecraft:turtle_master")),
LONG_TURTLE_MASTER(NamespaceID.from("minecraft:long_turtle_master")),
STRONG_TURTLE_MASTER(NamespaceID.from("minecraft:strong_turtle_master")),
WATER_BREATHING(NamespaceID.from("minecraft:water_breathing")),
LONG_WATER_BREATHING(NamespaceID.from("minecraft:long_water_breathing")),
HEALING(NamespaceID.from("minecraft:healing")),
STRONG_HEALING(NamespaceID.from("minecraft:strong_healing")),
HARMING(NamespaceID.from("minecraft:harming")),
STRONG_HARMING(NamespaceID.from("minecraft:strong_harming")),
POISON(NamespaceID.from("minecraft:poison")),
LONG_POISON(NamespaceID.from("minecraft:long_poison")),
STRONG_POISON(NamespaceID.from("minecraft:strong_poison")),
REGENERATION(NamespaceID.from("minecraft:regeneration")),
LONG_REGENERATION(NamespaceID.from("minecraft:long_regeneration")),
STRONG_REGENERATION(NamespaceID.from("minecraft:strong_regeneration")),
STRENGTH(NamespaceID.from("minecraft:strength")),
LONG_STRENGTH(NamespaceID.from("minecraft:long_strength")),
STRONG_STRENGTH(NamespaceID.from("minecraft:strong_strength")),
WEAKNESS(NamespaceID.from("minecraft:weakness")),
LONG_WEAKNESS(NamespaceID.from("minecraft:long_weakness")),
LUCK(NamespaceID.from("minecraft:luck")),
SLOW_FALLING(NamespaceID.from("minecraft:slow_falling")),
LONG_SLOW_FALLING(NamespaceID.from("minecraft:long_slow_falling"));
private static final PotionType[] VALUES = values();
@NotNull
private final NamespaceID id;
PotionType(@NotNull NamespaceID id) {
this.id = id;
Registries.potionTypes.put(id, this);
}
@Override
@NotNull
public Key key() {
return this.id;
}
public short getId() {
return (short) ordinal();
}
@NotNull
public NamespaceID getNamespaceID() {
return this.id;
}
@Nullable
public static PotionType fromId(short id) {
if(id >= 0 && id < VALUES.length) {
return VALUES[id];
}
return null;
}
@NotNull
@Override
public String toString() {
return "[" + this.id + "]";
}
}