Skip to content
Draft
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
Original file line number Diff line number Diff line change
@@ -0,0 +1,356 @@
package io.papermc.paper.registry.keys;

import static net.kyori.adventure.key.Key.key;

import io.papermc.paper.annotation.GeneratedClass;
import io.papermc.paper.registry.RegistryKey;
import io.papermc.paper.registry.TypedKey;
import net.kyori.adventure.key.Key;
import org.bukkit.potion.PotionType;
import org.jspecify.annotations.NullMarked;

/**
* Vanilla keys for {@link RegistryKey#POTION}.
*
* @apiNote The fields provided here are a direct representation of
* what is available from the vanilla game source. They may be
* changed (including removals) on any Minecraft version
* bump, so cross-version compatibility is not provided on the
* same level as it is on most of the other API.
*/
@SuppressWarnings({
"unused",
"SpellCheckingInspection"
})
@NullMarked
@GeneratedClass
public final class PotionTypeKeys {
/**
* {@code minecraft:awkward}
*
* @apiNote This field is version-dependant and may be removed in future Minecraft versions
*/
public static final TypedKey<PotionType> AWKWARD = create(key("awkward"));

/**
* {@code minecraft:fire_resistance}
*
* @apiNote This field is version-dependant and may be removed in future Minecraft versions
*/
public static final TypedKey<PotionType> FIRE_RESISTANCE = create(key("fire_resistance"));

/**
* {@code minecraft:harming}
*
* @apiNote This field is version-dependant and may be removed in future Minecraft versions
*/
public static final TypedKey<PotionType> HARMING = create(key("harming"));

/**
* {@code minecraft:healing}
*
* @apiNote This field is version-dependant and may be removed in future Minecraft versions
*/
public static final TypedKey<PotionType> HEALING = create(key("healing"));

/**
* {@code minecraft:infested}
*
* @apiNote This field is version-dependant and may be removed in future Minecraft versions
*/
public static final TypedKey<PotionType> INFESTED = create(key("infested"));

/**
* {@code minecraft:invisibility}
*
* @apiNote This field is version-dependant and may be removed in future Minecraft versions
*/
public static final TypedKey<PotionType> INVISIBILITY = create(key("invisibility"));

/**
* {@code minecraft:leaping}
*
* @apiNote This field is version-dependant and may be removed in future Minecraft versions
*/
public static final TypedKey<PotionType> LEAPING = create(key("leaping"));

/**
* {@code minecraft:long_fire_resistance}
*
* @apiNote This field is version-dependant and may be removed in future Minecraft versions
*/
public static final TypedKey<PotionType> LONG_FIRE_RESISTANCE = create(key("long_fire_resistance"));

/**
* {@code minecraft:long_invisibility}
*
* @apiNote This field is version-dependant and may be removed in future Minecraft versions
*/
public static final TypedKey<PotionType> LONG_INVISIBILITY = create(key("long_invisibility"));

/**
* {@code minecraft:long_leaping}
*
* @apiNote This field is version-dependant and may be removed in future Minecraft versions
*/
public static final TypedKey<PotionType> LONG_LEAPING = create(key("long_leaping"));

/**
* {@code minecraft:long_night_vision}
*
* @apiNote This field is version-dependant and may be removed in future Minecraft versions
*/
public static final TypedKey<PotionType> LONG_NIGHT_VISION = create(key("long_night_vision"));

/**
* {@code minecraft:long_poison}
*
* @apiNote This field is version-dependant and may be removed in future Minecraft versions
*/
public static final TypedKey<PotionType> LONG_POISON = create(key("long_poison"));

/**
* {@code minecraft:long_regeneration}
*
* @apiNote This field is version-dependant and may be removed in future Minecraft versions
*/
public static final TypedKey<PotionType> LONG_REGENERATION = create(key("long_regeneration"));

/**
* {@code minecraft:long_slow_falling}
*
* @apiNote This field is version-dependant and may be removed in future Minecraft versions
*/
public static final TypedKey<PotionType> LONG_SLOW_FALLING = create(key("long_slow_falling"));

/**
* {@code minecraft:long_slowness}
*
* @apiNote This field is version-dependant and may be removed in future Minecraft versions
*/
public static final TypedKey<PotionType> LONG_SLOWNESS = create(key("long_slowness"));

/**
* {@code minecraft:long_strength}
*
* @apiNote This field is version-dependant and may be removed in future Minecraft versions
*/
public static final TypedKey<PotionType> LONG_STRENGTH = create(key("long_strength"));

/**
* {@code minecraft:long_swiftness}
*
* @apiNote This field is version-dependant and may be removed in future Minecraft versions
*/
public static final TypedKey<PotionType> LONG_SWIFTNESS = create(key("long_swiftness"));

/**
* {@code minecraft:long_turtle_master}
*
* @apiNote This field is version-dependant and may be removed in future Minecraft versions
*/
public static final TypedKey<PotionType> LONG_TURTLE_MASTER = create(key("long_turtle_master"));

/**
* {@code minecraft:long_water_breathing}
*
* @apiNote This field is version-dependant and may be removed in future Minecraft versions
*/
public static final TypedKey<PotionType> LONG_WATER_BREATHING = create(key("long_water_breathing"));

/**
* {@code minecraft:long_weakness}
*
* @apiNote This field is version-dependant and may be removed in future Minecraft versions
*/
public static final TypedKey<PotionType> LONG_WEAKNESS = create(key("long_weakness"));

/**
* {@code minecraft:luck}
*
* @apiNote This field is version-dependant and may be removed in future Minecraft versions
*/
public static final TypedKey<PotionType> LUCK = create(key("luck"));

/**
* {@code minecraft:mundane}
*
* @apiNote This field is version-dependant and may be removed in future Minecraft versions
*/
public static final TypedKey<PotionType> MUNDANE = create(key("mundane"));

/**
* {@code minecraft:night_vision}
*
* @apiNote This field is version-dependant and may be removed in future Minecraft versions
*/
public static final TypedKey<PotionType> NIGHT_VISION = create(key("night_vision"));

/**
* {@code minecraft:oozing}
*
* @apiNote This field is version-dependant and may be removed in future Minecraft versions
*/
public static final TypedKey<PotionType> OOZING = create(key("oozing"));

/**
* {@code minecraft:poison}
*
* @apiNote This field is version-dependant and may be removed in future Minecraft versions
*/
public static final TypedKey<PotionType> POISON = create(key("poison"));

/**
* {@code minecraft:regeneration}
*
* @apiNote This field is version-dependant and may be removed in future Minecraft versions
*/
public static final TypedKey<PotionType> REGENERATION = create(key("regeneration"));

/**
* {@code minecraft:slow_falling}
*
* @apiNote This field is version-dependant and may be removed in future Minecraft versions
*/
public static final TypedKey<PotionType> SLOW_FALLING = create(key("slow_falling"));

/**
* {@code minecraft:slowness}
*
* @apiNote This field is version-dependant and may be removed in future Minecraft versions
*/
public static final TypedKey<PotionType> SLOWNESS = create(key("slowness"));

/**
* {@code minecraft:strength}
*
* @apiNote This field is version-dependant and may be removed in future Minecraft versions
*/
public static final TypedKey<PotionType> STRENGTH = create(key("strength"));

/**
* {@code minecraft:strong_harming}
*
* @apiNote This field is version-dependant and may be removed in future Minecraft versions
*/
public static final TypedKey<PotionType> STRONG_HARMING = create(key("strong_harming"));

/**
* {@code minecraft:strong_healing}
*
* @apiNote This field is version-dependant and may be removed in future Minecraft versions
*/
public static final TypedKey<PotionType> STRONG_HEALING = create(key("strong_healing"));

/**
* {@code minecraft:strong_leaping}
*
* @apiNote This field is version-dependant and may be removed in future Minecraft versions
*/
public static final TypedKey<PotionType> STRONG_LEAPING = create(key("strong_leaping"));

/**
* {@code minecraft:strong_poison}
*
* @apiNote This field is version-dependant and may be removed in future Minecraft versions
*/
public static final TypedKey<PotionType> STRONG_POISON = create(key("strong_poison"));

/**
* {@code minecraft:strong_regeneration}
*
* @apiNote This field is version-dependant and may be removed in future Minecraft versions
*/
public static final TypedKey<PotionType> STRONG_REGENERATION = create(key("strong_regeneration"));

/**
* {@code minecraft:strong_slowness}
*
* @apiNote This field is version-dependant and may be removed in future Minecraft versions
*/
public static final TypedKey<PotionType> STRONG_SLOWNESS = create(key("strong_slowness"));

/**
* {@code minecraft:strong_strength}
*
* @apiNote This field is version-dependant and may be removed in future Minecraft versions
*/
public static final TypedKey<PotionType> STRONG_STRENGTH = create(key("strong_strength"));

/**
* {@code minecraft:strong_swiftness}
*
* @apiNote This field is version-dependant and may be removed in future Minecraft versions
*/
public static final TypedKey<PotionType> STRONG_SWIFTNESS = create(key("strong_swiftness"));

/**
* {@code minecraft:strong_turtle_master}
*
* @apiNote This field is version-dependant and may be removed in future Minecraft versions
*/
public static final TypedKey<PotionType> STRONG_TURTLE_MASTER = create(key("strong_turtle_master"));

/**
* {@code minecraft:swiftness}
*
* @apiNote This field is version-dependant and may be removed in future Minecraft versions
*/
public static final TypedKey<PotionType> SWIFTNESS = create(key("swiftness"));

/**
* {@code minecraft:thick}
*
* @apiNote This field is version-dependant and may be removed in future Minecraft versions
*/
public static final TypedKey<PotionType> THICK = create(key("thick"));

/**
* {@code minecraft:turtle_master}
*
* @apiNote This field is version-dependant and may be removed in future Minecraft versions
*/
public static final TypedKey<PotionType> TURTLE_MASTER = create(key("turtle_master"));

/**
* {@code minecraft:water}
*
* @apiNote This field is version-dependant and may be removed in future Minecraft versions
*/
public static final TypedKey<PotionType> WATER = create(key("water"));

/**
* {@code minecraft:water_breathing}
*
* @apiNote This field is version-dependant and may be removed in future Minecraft versions
*/
public static final TypedKey<PotionType> WATER_BREATHING = create(key("water_breathing"));

/**
* {@code minecraft:weakness}
*
* @apiNote This field is version-dependant and may be removed in future Minecraft versions
*/
public static final TypedKey<PotionType> WEAKNESS = create(key("weakness"));

/**
* {@code minecraft:weaving}
*
* @apiNote This field is version-dependant and may be removed in future Minecraft versions
*/
public static final TypedKey<PotionType> WEAVING = create(key("weaving"));

/**
* {@code minecraft:wind_charged}
*
* @apiNote This field is version-dependant and may be removed in future Minecraft versions
*/
public static final TypedKey<PotionType> WIND_CHARGED = create(key("wind_charged"));

private PotionTypeKeys() {
}

private static TypedKey<PotionType> create(final Key key) {
return TypedKey.create(RegistryKey.POTION, key);
}
}
Original file line number Diff line number Diff line change
Expand Up @@ -132,6 +132,11 @@ public sealed interface RegistryKey<T> extends Keyed permits RegistryKeyImpl {
* @see io.papermc.paper.registry.keys.GameRuleKeys
*/
RegistryKey<GameRule<?>> GAME_RULE = create("game_rule");
/**
* Built-in registry for potions.
* @see io.papermc.paper.registry.keys.PotionTypeKeys
*/
RegistryKey<PotionType> POTION = create("potion");

/* ********************** *
* Data-driven Registries *
Expand Down Expand Up @@ -238,7 +243,6 @@ public sealed interface RegistryKey<T> extends Keyed permits RegistryKeyImpl {
* ******************* */
RegistryKey<EntityType> ENTITY_TYPE = create("entity_type");
RegistryKey<Particle> PARTICLE_TYPE = create("particle_type");
RegistryKey<PotionType> POTION = create("potion");
RegistryKey<MemoryKey<?>> MEMORY_MODULE_TYPE = create("memory_module_type");

/**
Expand Down
2 changes: 1 addition & 1 deletion paper-api/src/main/java/org/bukkit/Registry.java
Original file line number Diff line number Diff line change
Expand Up @@ -215,7 +215,7 @@ public Iterator<KeyedBossBar> iterator() {
*
* @see PotionType
*/
Registry<PotionType> POTION = registryFor(RegistryKey.POTION); // Paper
Registry<PotionType> POTION = registryFor(RegistryKey.POTION);
/**
* Server statistics.
*
Expand Down
Loading
Loading