Add missing key files and cleanup registry definition order

This commit is contained in:
Jake Potrebic 2024-09-23 17:36:29 -07:00
parent acdd6d35ad
commit 9b1ee0d87d
No known key found for this signature in database
GPG key ID: ECE0B3C133C016C5
16 changed files with 8946 additions and 36 deletions

View file

@ -0,0 +1,343 @@
package io.papermc.paper.registry.keys;
import static net.kyori.adventure.key.Key.key;
import io.papermc.paper.generated.GeneratedFrom;
import io.papermc.paper.registry.RegistryKey;
import io.papermc.paper.registry.TypedKey;
import net.kyori.adventure.key.Key;
import org.bukkit.block.banner.PatternType;
import org.checkerframework.checker.nullness.qual.NonNull;
import org.jetbrains.annotations.ApiStatus;
/**
* Vanilla keys for {@link RegistryKey#BANNER_PATTERN}.
*
* @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"
})
@GeneratedFrom("1.21.1")
@ApiStatus.Experimental
public final class BannerPatternKeys {
/**
* {@code minecraft:base}
*
* @apiNote This field is version-dependant and may be removed in future Minecraft versions
*/
public static final TypedKey<PatternType> BASE = create(key("base"));
/**
* {@code minecraft:border}
*
* @apiNote This field is version-dependant and may be removed in future Minecraft versions
*/
public static final TypedKey<PatternType> BORDER = create(key("border"));
/**
* {@code minecraft:bricks}
*
* @apiNote This field is version-dependant and may be removed in future Minecraft versions
*/
public static final TypedKey<PatternType> BRICKS = create(key("bricks"));
/**
* {@code minecraft:circle}
*
* @apiNote This field is version-dependant and may be removed in future Minecraft versions
*/
public static final TypedKey<PatternType> CIRCLE = create(key("circle"));
/**
* {@code minecraft:creeper}
*
* @apiNote This field is version-dependant and may be removed in future Minecraft versions
*/
public static final TypedKey<PatternType> CREEPER = create(key("creeper"));
/**
* {@code minecraft:cross}
*
* @apiNote This field is version-dependant and may be removed in future Minecraft versions
*/
public static final TypedKey<PatternType> CROSS = create(key("cross"));
/**
* {@code minecraft:curly_border}
*
* @apiNote This field is version-dependant and may be removed in future Minecraft versions
*/
public static final TypedKey<PatternType> CURLY_BORDER = create(key("curly_border"));
/**
* {@code minecraft:diagonal_left}
*
* @apiNote This field is version-dependant and may be removed in future Minecraft versions
*/
public static final TypedKey<PatternType> DIAGONAL_LEFT = create(key("diagonal_left"));
/**
* {@code minecraft:diagonal_right}
*
* @apiNote This field is version-dependant and may be removed in future Minecraft versions
*/
public static final TypedKey<PatternType> DIAGONAL_RIGHT = create(key("diagonal_right"));
/**
* {@code minecraft:diagonal_up_left}
*
* @apiNote This field is version-dependant and may be removed in future Minecraft versions
*/
public static final TypedKey<PatternType> DIAGONAL_UP_LEFT = create(key("diagonal_up_left"));
/**
* {@code minecraft:diagonal_up_right}
*
* @apiNote This field is version-dependant and may be removed in future Minecraft versions
*/
public static final TypedKey<PatternType> DIAGONAL_UP_RIGHT = create(key("diagonal_up_right"));
/**
* {@code minecraft:flow}
*
* @apiNote This field is version-dependant and may be removed in future Minecraft versions
*/
public static final TypedKey<PatternType> FLOW = create(key("flow"));
/**
* {@code minecraft:flower}
*
* @apiNote This field is version-dependant and may be removed in future Minecraft versions
*/
public static final TypedKey<PatternType> FLOWER = create(key("flower"));
/**
* {@code minecraft:globe}
*
* @apiNote This field is version-dependant and may be removed in future Minecraft versions
*/
public static final TypedKey<PatternType> GLOBE = create(key("globe"));
/**
* {@code minecraft:gradient}
*
* @apiNote This field is version-dependant and may be removed in future Minecraft versions
*/
public static final TypedKey<PatternType> GRADIENT = create(key("gradient"));
/**
* {@code minecraft:gradient_up}
*
* @apiNote This field is version-dependant and may be removed in future Minecraft versions
*/
public static final TypedKey<PatternType> GRADIENT_UP = create(key("gradient_up"));
/**
* {@code minecraft:guster}
*
* @apiNote This field is version-dependant and may be removed in future Minecraft versions
*/
public static final TypedKey<PatternType> GUSTER = create(key("guster"));
/**
* {@code minecraft:half_horizontal}
*
* @apiNote This field is version-dependant and may be removed in future Minecraft versions
*/
public static final TypedKey<PatternType> HALF_HORIZONTAL = create(key("half_horizontal"));
/**
* {@code minecraft:half_horizontal_bottom}
*
* @apiNote This field is version-dependant and may be removed in future Minecraft versions
*/
public static final TypedKey<PatternType> HALF_HORIZONTAL_BOTTOM = create(key("half_horizontal_bottom"));
/**
* {@code minecraft:half_vertical}
*
* @apiNote This field is version-dependant and may be removed in future Minecraft versions
*/
public static final TypedKey<PatternType> HALF_VERTICAL = create(key("half_vertical"));
/**
* {@code minecraft:half_vertical_right}
*
* @apiNote This field is version-dependant and may be removed in future Minecraft versions
*/
public static final TypedKey<PatternType> HALF_VERTICAL_RIGHT = create(key("half_vertical_right"));
/**
* {@code minecraft:mojang}
*
* @apiNote This field is version-dependant and may be removed in future Minecraft versions
*/
public static final TypedKey<PatternType> MOJANG = create(key("mojang"));
/**
* {@code minecraft:piglin}
*
* @apiNote This field is version-dependant and may be removed in future Minecraft versions
*/
public static final TypedKey<PatternType> PIGLIN = create(key("piglin"));
/**
* {@code minecraft:rhombus}
*
* @apiNote This field is version-dependant and may be removed in future Minecraft versions
*/
public static final TypedKey<PatternType> RHOMBUS = create(key("rhombus"));
/**
* {@code minecraft:skull}
*
* @apiNote This field is version-dependant and may be removed in future Minecraft versions
*/
public static final TypedKey<PatternType> SKULL = create(key("skull"));
/**
* {@code minecraft:small_stripes}
*
* @apiNote This field is version-dependant and may be removed in future Minecraft versions
*/
public static final TypedKey<PatternType> SMALL_STRIPES = create(key("small_stripes"));
/**
* {@code minecraft:square_bottom_left}
*
* @apiNote This field is version-dependant and may be removed in future Minecraft versions
*/
public static final TypedKey<PatternType> SQUARE_BOTTOM_LEFT = create(key("square_bottom_left"));
/**
* {@code minecraft:square_bottom_right}
*
* @apiNote This field is version-dependant and may be removed in future Minecraft versions
*/
public static final TypedKey<PatternType> SQUARE_BOTTOM_RIGHT = create(key("square_bottom_right"));
/**
* {@code minecraft:square_top_left}
*
* @apiNote This field is version-dependant and may be removed in future Minecraft versions
*/
public static final TypedKey<PatternType> SQUARE_TOP_LEFT = create(key("square_top_left"));
/**
* {@code minecraft:square_top_right}
*
* @apiNote This field is version-dependant and may be removed in future Minecraft versions
*/
public static final TypedKey<PatternType> SQUARE_TOP_RIGHT = create(key("square_top_right"));
/**
* {@code minecraft:straight_cross}
*
* @apiNote This field is version-dependant and may be removed in future Minecraft versions
*/
public static final TypedKey<PatternType> STRAIGHT_CROSS = create(key("straight_cross"));
/**
* {@code minecraft:stripe_bottom}
*
* @apiNote This field is version-dependant and may be removed in future Minecraft versions
*/
public static final TypedKey<PatternType> STRIPE_BOTTOM = create(key("stripe_bottom"));
/**
* {@code minecraft:stripe_center}
*
* @apiNote This field is version-dependant and may be removed in future Minecraft versions
*/
public static final TypedKey<PatternType> STRIPE_CENTER = create(key("stripe_center"));
/**
* {@code minecraft:stripe_downleft}
*
* @apiNote This field is version-dependant and may be removed in future Minecraft versions
*/
public static final TypedKey<PatternType> STRIPE_DOWNLEFT = create(key("stripe_downleft"));
/**
* {@code minecraft:stripe_downright}
*
* @apiNote This field is version-dependant and may be removed in future Minecraft versions
*/
public static final TypedKey<PatternType> STRIPE_DOWNRIGHT = create(key("stripe_downright"));
/**
* {@code minecraft:stripe_left}
*
* @apiNote This field is version-dependant and may be removed in future Minecraft versions
*/
public static final TypedKey<PatternType> STRIPE_LEFT = create(key("stripe_left"));
/**
* {@code minecraft:stripe_middle}
*
* @apiNote This field is version-dependant and may be removed in future Minecraft versions
*/
public static final TypedKey<PatternType> STRIPE_MIDDLE = create(key("stripe_middle"));
/**
* {@code minecraft:stripe_right}
*
* @apiNote This field is version-dependant and may be removed in future Minecraft versions
*/
public static final TypedKey<PatternType> STRIPE_RIGHT = create(key("stripe_right"));
/**
* {@code minecraft:stripe_top}
*
* @apiNote This field is version-dependant and may be removed in future Minecraft versions
*/
public static final TypedKey<PatternType> STRIPE_TOP = create(key("stripe_top"));
/**
* {@code minecraft:triangle_bottom}
*
* @apiNote This field is version-dependant and may be removed in future Minecraft versions
*/
public static final TypedKey<PatternType> TRIANGLE_BOTTOM = create(key("triangle_bottom"));
/**
* {@code minecraft:triangle_top}
*
* @apiNote This field is version-dependant and may be removed in future Minecraft versions
*/
public static final TypedKey<PatternType> TRIANGLE_TOP = create(key("triangle_top"));
/**
* {@code minecraft:triangles_bottom}
*
* @apiNote This field is version-dependant and may be removed in future Minecraft versions
*/
public static final TypedKey<PatternType> TRIANGLES_BOTTOM = create(key("triangles_bottom"));
/**
* {@code minecraft:triangles_top}
*
* @apiNote This field is version-dependant and may be removed in future Minecraft versions
*/
public static final TypedKey<PatternType> TRIANGLES_TOP = create(key("triangles_top"));
private BannerPatternKeys() {
}
/**
* Creates a key for {@link PatternType} in the registry {@code minecraft:banner_pattern}.
*
* @param key the value's key in the registry
* @return a new typed key
*/
@ApiStatus.Experimental
public static @NonNull TypedKey<PatternType> create(final @NonNull Key key) {
return TypedKey.create(RegistryKey.BANNER_PATTERN, key);
}
}

File diff suppressed because it is too large Load diff

View file

@ -0,0 +1,112 @@
package io.papermc.paper.registry.keys;
import static net.kyori.adventure.key.Key.key;
import io.papermc.paper.generated.GeneratedFrom;
import io.papermc.paper.registry.RegistryKey;
import io.papermc.paper.registry.TypedKey;
import net.kyori.adventure.key.Key;
import org.bukkit.entity.Cat;
import org.checkerframework.checker.nullness.qual.NonNull;
import org.jetbrains.annotations.ApiStatus;
/**
* Vanilla keys for {@link RegistryKey#CAT_VARIANT}.
*
* @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"
})
@GeneratedFrom("1.21.1")
@ApiStatus.Experimental
public final class CatVariantKeys {
/**
* {@code minecraft:all_black}
*
* @apiNote This field is version-dependant and may be removed in future Minecraft versions
*/
public static final TypedKey<Cat.Type> ALL_BLACK = create(key("all_black"));
/**
* {@code minecraft:black}
*
* @apiNote This field is version-dependant and may be removed in future Minecraft versions
*/
public static final TypedKey<Cat.Type> BLACK = create(key("black"));
/**
* {@code minecraft:british_shorthair}
*
* @apiNote This field is version-dependant and may be removed in future Minecraft versions
*/
public static final TypedKey<Cat.Type> BRITISH_SHORTHAIR = create(key("british_shorthair"));
/**
* {@code minecraft:calico}
*
* @apiNote This field is version-dependant and may be removed in future Minecraft versions
*/
public static final TypedKey<Cat.Type> CALICO = create(key("calico"));
/**
* {@code minecraft:jellie}
*
* @apiNote This field is version-dependant and may be removed in future Minecraft versions
*/
public static final TypedKey<Cat.Type> JELLIE = create(key("jellie"));
/**
* {@code minecraft:persian}
*
* @apiNote This field is version-dependant and may be removed in future Minecraft versions
*/
public static final TypedKey<Cat.Type> PERSIAN = create(key("persian"));
/**
* {@code minecraft:ragdoll}
*
* @apiNote This field is version-dependant and may be removed in future Minecraft versions
*/
public static final TypedKey<Cat.Type> RAGDOLL = create(key("ragdoll"));
/**
* {@code minecraft:red}
*
* @apiNote This field is version-dependant and may be removed in future Minecraft versions
*/
public static final TypedKey<Cat.Type> RED = create(key("red"));
/**
* {@code minecraft:siamese}
*
* @apiNote This field is version-dependant and may be removed in future Minecraft versions
*/
public static final TypedKey<Cat.Type> SIAMESE = create(key("siamese"));
/**
* {@code minecraft:tabby}
*
* @apiNote This field is version-dependant and may be removed in future Minecraft versions
*/
public static final TypedKey<Cat.Type> TABBY = create(key("tabby"));
/**
* {@code minecraft:white}
*
* @apiNote This field is version-dependant and may be removed in future Minecraft versions
*/
public static final TypedKey<Cat.Type> WHITE = create(key("white"));
private CatVariantKeys() {
}
private static @NonNull TypedKey<Cat.Type> create(final @NonNull Key key) {
return TypedKey.create(RegistryKey.CAT_VARIANT, key);
}
}

View file

@ -0,0 +1,56 @@
package io.papermc.paper.registry.keys;
import static net.kyori.adventure.key.Key.key;
import io.papermc.paper.generated.GeneratedFrom;
import io.papermc.paper.registry.RegistryKey;
import io.papermc.paper.registry.TypedKey;
import net.kyori.adventure.key.Key;
import org.bukkit.entity.Frog;
import org.checkerframework.checker.nullness.qual.NonNull;
import org.jetbrains.annotations.ApiStatus;
/**
* Vanilla keys for {@link RegistryKey#FROG_VARIANT}.
*
* @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"
})
@GeneratedFrom("1.21.1")
@ApiStatus.Experimental
public final class FrogVariantKeys {
/**
* {@code minecraft:cold}
*
* @apiNote This field is version-dependant and may be removed in future Minecraft versions
*/
public static final TypedKey<Frog.Variant> COLD = create(key("cold"));
/**
* {@code minecraft:temperate}
*
* @apiNote This field is version-dependant and may be removed in future Minecraft versions
*/
public static final TypedKey<Frog.Variant> TEMPERATE = create(key("temperate"));
/**
* {@code minecraft:warm}
*
* @apiNote This field is version-dependant and may be removed in future Minecraft versions
*/
public static final TypedKey<Frog.Variant> WARM = create(key("warm"));
private FrogVariantKeys() {
}
private static @NonNull TypedKey<Frog.Variant> create(final @NonNull Key key) {
return TypedKey.create(RegistryKey.FROG_VARIANT, key);
}
}

View file

@ -0,0 +1,175 @@
package io.papermc.paper.registry.keys;
import static net.kyori.adventure.key.Key.key;
import io.papermc.paper.generated.GeneratedFrom;
import io.papermc.paper.registry.RegistryKey;
import io.papermc.paper.registry.TypedKey;
import net.kyori.adventure.key.Key;
import org.bukkit.JukeboxSong;
import org.checkerframework.checker.nullness.qual.NonNull;
import org.jetbrains.annotations.ApiStatus;
/**
* Vanilla keys for {@link RegistryKey#JUKEBOX_SONG}.
*
* @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"
})
@GeneratedFrom("1.21.1")
@ApiStatus.Experimental
public final class JukeboxSongKeys {
/**
* {@code minecraft:11}
*
* @apiNote This field is version-dependant and may be removed in future Minecraft versions
*/
public static final TypedKey<JukeboxSong> ELEVEN = create(key("11"));
/**
* {@code minecraft:13}
*
* @apiNote This field is version-dependant and may be removed in future Minecraft versions
*/
public static final TypedKey<JukeboxSong> THIRTEEN = create(key("13"));
/**
* {@code minecraft:5}
*
* @apiNote This field is version-dependant and may be removed in future Minecraft versions
*/
public static final TypedKey<JukeboxSong> FIVE = create(key("5"));
/**
* {@code minecraft:blocks}
*
* @apiNote This field is version-dependant and may be removed in future Minecraft versions
*/
public static final TypedKey<JukeboxSong> BLOCKS = create(key("blocks"));
/**
* {@code minecraft:cat}
*
* @apiNote This field is version-dependant and may be removed in future Minecraft versions
*/
public static final TypedKey<JukeboxSong> CAT = create(key("cat"));
/**
* {@code minecraft:chirp}
*
* @apiNote This field is version-dependant and may be removed in future Minecraft versions
*/
public static final TypedKey<JukeboxSong> CHIRP = create(key("chirp"));
/**
* {@code minecraft:creator}
*
* @apiNote This field is version-dependant and may be removed in future Minecraft versions
*/
public static final TypedKey<JukeboxSong> CREATOR = create(key("creator"));
/**
* {@code minecraft:creator_music_box}
*
* @apiNote This field is version-dependant and may be removed in future Minecraft versions
*/
public static final TypedKey<JukeboxSong> CREATOR_MUSIC_BOX = create(key("creator_music_box"));
/**
* {@code minecraft:far}
*
* @apiNote This field is version-dependant and may be removed in future Minecraft versions
*/
public static final TypedKey<JukeboxSong> FAR = create(key("far"));
/**
* {@code minecraft:mall}
*
* @apiNote This field is version-dependant and may be removed in future Minecraft versions
*/
public static final TypedKey<JukeboxSong> MALL = create(key("mall"));
/**
* {@code minecraft:mellohi}
*
* @apiNote This field is version-dependant and may be removed in future Minecraft versions
*/
public static final TypedKey<JukeboxSong> MELLOHI = create(key("mellohi"));
/**
* {@code minecraft:otherside}
*
* @apiNote This field is version-dependant and may be removed in future Minecraft versions
*/
public static final TypedKey<JukeboxSong> OTHERSIDE = create(key("otherside"));
/**
* {@code minecraft:pigstep}
*
* @apiNote This field is version-dependant and may be removed in future Minecraft versions
*/
public static final TypedKey<JukeboxSong> PIGSTEP = create(key("pigstep"));
/**
* {@code minecraft:precipice}
*
* @apiNote This field is version-dependant and may be removed in future Minecraft versions
*/
public static final TypedKey<JukeboxSong> PRECIPICE = create(key("precipice"));
/**
* {@code minecraft:relic}
*
* @apiNote This field is version-dependant and may be removed in future Minecraft versions
*/
public static final TypedKey<JukeboxSong> RELIC = create(key("relic"));
/**
* {@code minecraft:stal}
*
* @apiNote This field is version-dependant and may be removed in future Minecraft versions
*/
public static final TypedKey<JukeboxSong> STAL = create(key("stal"));
/**
* {@code minecraft:strad}
*
* @apiNote This field is version-dependant and may be removed in future Minecraft versions
*/
public static final TypedKey<JukeboxSong> STRAD = create(key("strad"));
/**
* {@code minecraft:wait}
*
* @apiNote This field is version-dependant and may be removed in future Minecraft versions
*/
public static final TypedKey<JukeboxSong> WAIT = create(key("wait"));
/**
* {@code minecraft:ward}
*
* @apiNote This field is version-dependant and may be removed in future Minecraft versions
*/
public static final TypedKey<JukeboxSong> WARD = create(key("ward"));
private JukeboxSongKeys() {
}
/**
* Creates a key for {@link JukeboxSong} in the registry {@code minecraft:jukebox_song}.
*
* @param key the value's key in the registry
* @return a new typed key
*/
@ApiStatus.Experimental
public static @NonNull TypedKey<JukeboxSong> create(final @NonNull Key key) {
return TypedKey.create(RegistryKey.JUKEBOX_SONG, key);
}
}

View file

@ -0,0 +1,280 @@
package io.papermc.paper.registry.keys;
import static net.kyori.adventure.key.Key.key;
import io.papermc.paper.generated.GeneratedFrom;
import io.papermc.paper.registry.RegistryKey;
import io.papermc.paper.registry.TypedKey;
import net.kyori.adventure.key.Key;
import org.bukkit.map.MapCursor;
import org.checkerframework.checker.nullness.qual.NonNull;
import org.jetbrains.annotations.ApiStatus;
/**
* Vanilla keys for {@link RegistryKey#MAP_DECORATION_TYPE}.
*
* @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"
})
@GeneratedFrom("1.21.1")
@ApiStatus.Experimental
public final class MapDecorationTypeKeys {
/**
* {@code minecraft:banner_black}
*
* @apiNote This field is version-dependant and may be removed in future Minecraft versions
*/
public static final TypedKey<MapCursor.Type> BANNER_BLACK = create(key("banner_black"));
/**
* {@code minecraft:banner_blue}
*
* @apiNote This field is version-dependant and may be removed in future Minecraft versions
*/
public static final TypedKey<MapCursor.Type> BANNER_BLUE = create(key("banner_blue"));
/**
* {@code minecraft:banner_brown}
*
* @apiNote This field is version-dependant and may be removed in future Minecraft versions
*/
public static final TypedKey<MapCursor.Type> BANNER_BROWN = create(key("banner_brown"));
/**
* {@code minecraft:banner_cyan}
*
* @apiNote This field is version-dependant and may be removed in future Minecraft versions
*/
public static final TypedKey<MapCursor.Type> BANNER_CYAN = create(key("banner_cyan"));
/**
* {@code minecraft:banner_gray}
*
* @apiNote This field is version-dependant and may be removed in future Minecraft versions
*/
public static final TypedKey<MapCursor.Type> BANNER_GRAY = create(key("banner_gray"));
/**
* {@code minecraft:banner_green}
*
* @apiNote This field is version-dependant and may be removed in future Minecraft versions
*/
public static final TypedKey<MapCursor.Type> BANNER_GREEN = create(key("banner_green"));
/**
* {@code minecraft:banner_light_blue}
*
* @apiNote This field is version-dependant and may be removed in future Minecraft versions
*/
public static final TypedKey<MapCursor.Type> BANNER_LIGHT_BLUE = create(key("banner_light_blue"));
/**
* {@code minecraft:banner_light_gray}
*
* @apiNote This field is version-dependant and may be removed in future Minecraft versions
*/
public static final TypedKey<MapCursor.Type> BANNER_LIGHT_GRAY = create(key("banner_light_gray"));
/**
* {@code minecraft:banner_lime}
*
* @apiNote This field is version-dependant and may be removed in future Minecraft versions
*/
public static final TypedKey<MapCursor.Type> BANNER_LIME = create(key("banner_lime"));
/**
* {@code minecraft:banner_magenta}
*
* @apiNote This field is version-dependant and may be removed in future Minecraft versions
*/
public static final TypedKey<MapCursor.Type> BANNER_MAGENTA = create(key("banner_magenta"));
/**
* {@code minecraft:banner_orange}
*
* @apiNote This field is version-dependant and may be removed in future Minecraft versions
*/
public static final TypedKey<MapCursor.Type> BANNER_ORANGE = create(key("banner_orange"));
/**
* {@code minecraft:banner_pink}
*
* @apiNote This field is version-dependant and may be removed in future Minecraft versions
*/
public static final TypedKey<MapCursor.Type> BANNER_PINK = create(key("banner_pink"));
/**
* {@code minecraft:banner_purple}
*
* @apiNote This field is version-dependant and may be removed in future Minecraft versions
*/
public static final TypedKey<MapCursor.Type> BANNER_PURPLE = create(key("banner_purple"));
/**
* {@code minecraft:banner_red}
*
* @apiNote This field is version-dependant and may be removed in future Minecraft versions
*/
public static final TypedKey<MapCursor.Type> BANNER_RED = create(key("banner_red"));
/**
* {@code minecraft:banner_white}
*
* @apiNote This field is version-dependant and may be removed in future Minecraft versions
*/
public static final TypedKey<MapCursor.Type> BANNER_WHITE = create(key("banner_white"));
/**
* {@code minecraft:banner_yellow}
*
* @apiNote This field is version-dependant and may be removed in future Minecraft versions
*/
public static final TypedKey<MapCursor.Type> BANNER_YELLOW = create(key("banner_yellow"));
/**
* {@code minecraft:blue_marker}
*
* @apiNote This field is version-dependant and may be removed in future Minecraft versions
*/
public static final TypedKey<MapCursor.Type> BLUE_MARKER = create(key("blue_marker"));
/**
* {@code minecraft:frame}
*
* @apiNote This field is version-dependant and may be removed in future Minecraft versions
*/
public static final TypedKey<MapCursor.Type> FRAME = create(key("frame"));
/**
* {@code minecraft:jungle_temple}
*
* @apiNote This field is version-dependant and may be removed in future Minecraft versions
*/
public static final TypedKey<MapCursor.Type> JUNGLE_TEMPLE = create(key("jungle_temple"));
/**
* {@code minecraft:mansion}
*
* @apiNote This field is version-dependant and may be removed in future Minecraft versions
*/
public static final TypedKey<MapCursor.Type> MANSION = create(key("mansion"));
/**
* {@code minecraft:monument}
*
* @apiNote This field is version-dependant and may be removed in future Minecraft versions
*/
public static final TypedKey<MapCursor.Type> MONUMENT = create(key("monument"));
/**
* {@code minecraft:player}
*
* @apiNote This field is version-dependant and may be removed in future Minecraft versions
*/
public static final TypedKey<MapCursor.Type> PLAYER = create(key("player"));
/**
* {@code minecraft:player_off_limits}
*
* @apiNote This field is version-dependant and may be removed in future Minecraft versions
*/
public static final TypedKey<MapCursor.Type> PLAYER_OFF_LIMITS = create(key("player_off_limits"));
/**
* {@code minecraft:player_off_map}
*
* @apiNote This field is version-dependant and may be removed in future Minecraft versions
*/
public static final TypedKey<MapCursor.Type> PLAYER_OFF_MAP = create(key("player_off_map"));
/**
* {@code minecraft:red_marker}
*
* @apiNote This field is version-dependant and may be removed in future Minecraft versions
*/
public static final TypedKey<MapCursor.Type> RED_MARKER = create(key("red_marker"));
/**
* {@code minecraft:red_x}
*
* @apiNote This field is version-dependant and may be removed in future Minecraft versions
*/
public static final TypedKey<MapCursor.Type> RED_X = create(key("red_x"));
/**
* {@code minecraft:swamp_hut}
*
* @apiNote This field is version-dependant and may be removed in future Minecraft versions
*/
public static final TypedKey<MapCursor.Type> SWAMP_HUT = create(key("swamp_hut"));
/**
* {@code minecraft:target_point}
*
* @apiNote This field is version-dependant and may be removed in future Minecraft versions
*/
public static final TypedKey<MapCursor.Type> TARGET_POINT = create(key("target_point"));
/**
* {@code minecraft:target_x}
*
* @apiNote This field is version-dependant and may be removed in future Minecraft versions
*/
public static final TypedKey<MapCursor.Type> TARGET_X = create(key("target_x"));
/**
* {@code minecraft:trial_chambers}
*
* @apiNote This field is version-dependant and may be removed in future Minecraft versions
*/
public static final TypedKey<MapCursor.Type> TRIAL_CHAMBERS = create(key("trial_chambers"));
/**
* {@code minecraft:village_desert}
*
* @apiNote This field is version-dependant and may be removed in future Minecraft versions
*/
public static final TypedKey<MapCursor.Type> VILLAGE_DESERT = create(key("village_desert"));
/**
* {@code minecraft:village_plains}
*
* @apiNote This field is version-dependant and may be removed in future Minecraft versions
*/
public static final TypedKey<MapCursor.Type> VILLAGE_PLAINS = create(key("village_plains"));
/**
* {@code minecraft:village_savanna}
*
* @apiNote This field is version-dependant and may be removed in future Minecraft versions
*/
public static final TypedKey<MapCursor.Type> VILLAGE_SAVANNA = create(key("village_savanna"));
/**
* {@code minecraft:village_snowy}
*
* @apiNote This field is version-dependant and may be removed in future Minecraft versions
*/
public static final TypedKey<MapCursor.Type> VILLAGE_SNOWY = create(key("village_snowy"));
/**
* {@code minecraft:village_taiga}
*
* @apiNote This field is version-dependant and may be removed in future Minecraft versions
*/
public static final TypedKey<MapCursor.Type> VILLAGE_TAIGA = create(key("village_taiga"));
private MapDecorationTypeKeys() {
}
private static @NonNull TypedKey<MapCursor.Type> create(final @NonNull Key key) {
return TypedKey.create(RegistryKey.MAP_DECORATION_TYPE, key);
}
}

View file

@ -0,0 +1,210 @@
package io.papermc.paper.registry.keys;
import static net.kyori.adventure.key.Key.key;
import io.papermc.paper.generated.GeneratedFrom;
import io.papermc.paper.registry.RegistryKey;
import io.papermc.paper.registry.TypedKey;
import net.kyori.adventure.key.Key;
import org.bukkit.inventory.MenuType;
import org.checkerframework.checker.nullness.qual.NonNull;
import org.jetbrains.annotations.ApiStatus;
/**
* Vanilla keys for {@link RegistryKey#MENU}.
*
* @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"
})
@GeneratedFrom("1.21.1")
@ApiStatus.Experimental
public final class MenuTypeKeys {
/**
* {@code minecraft:anvil}
*
* @apiNote This field is version-dependant and may be removed in future Minecraft versions
*/
public static final TypedKey<MenuType> ANVIL = create(key("anvil"));
/**
* {@code minecraft:beacon}
*
* @apiNote This field is version-dependant and may be removed in future Minecraft versions
*/
public static final TypedKey<MenuType> BEACON = create(key("beacon"));
/**
* {@code minecraft:blast_furnace}
*
* @apiNote This field is version-dependant and may be removed in future Minecraft versions
*/
public static final TypedKey<MenuType> BLAST_FURNACE = create(key("blast_furnace"));
/**
* {@code minecraft:brewing_stand}
*
* @apiNote This field is version-dependant and may be removed in future Minecraft versions
*/
public static final TypedKey<MenuType> BREWING_STAND = create(key("brewing_stand"));
/**
* {@code minecraft:cartography_table}
*
* @apiNote This field is version-dependant and may be removed in future Minecraft versions
*/
public static final TypedKey<MenuType> CARTOGRAPHY_TABLE = create(key("cartography_table"));
/**
* {@code minecraft:crafter_3x3}
*
* @apiNote This field is version-dependant and may be removed in future Minecraft versions
*/
public static final TypedKey<MenuType> CRAFTER_3X3 = create(key("crafter_3x3"));
/**
* {@code minecraft:crafting}
*
* @apiNote This field is version-dependant and may be removed in future Minecraft versions
*/
public static final TypedKey<MenuType> CRAFTING = create(key("crafting"));
/**
* {@code minecraft:enchantment}
*
* @apiNote This field is version-dependant and may be removed in future Minecraft versions
*/
public static final TypedKey<MenuType> ENCHANTMENT = create(key("enchantment"));
/**
* {@code minecraft:furnace}
*
* @apiNote This field is version-dependant and may be removed in future Minecraft versions
*/
public static final TypedKey<MenuType> FURNACE = create(key("furnace"));
/**
* {@code minecraft:generic_3x3}
*
* @apiNote This field is version-dependant and may be removed in future Minecraft versions
*/
public static final TypedKey<MenuType> GENERIC_3X3 = create(key("generic_3x3"));
/**
* {@code minecraft:generic_9x1}
*
* @apiNote This field is version-dependant and may be removed in future Minecraft versions
*/
public static final TypedKey<MenuType> GENERIC_9X1 = create(key("generic_9x1"));
/**
* {@code minecraft:generic_9x2}
*
* @apiNote This field is version-dependant and may be removed in future Minecraft versions
*/
public static final TypedKey<MenuType> GENERIC_9X2 = create(key("generic_9x2"));
/**
* {@code minecraft:generic_9x3}
*
* @apiNote This field is version-dependant and may be removed in future Minecraft versions
*/
public static final TypedKey<MenuType> GENERIC_9X3 = create(key("generic_9x3"));
/**
* {@code minecraft:generic_9x4}
*
* @apiNote This field is version-dependant and may be removed in future Minecraft versions
*/
public static final TypedKey<MenuType> GENERIC_9X4 = create(key("generic_9x4"));
/**
* {@code minecraft:generic_9x5}
*
* @apiNote This field is version-dependant and may be removed in future Minecraft versions
*/
public static final TypedKey<MenuType> GENERIC_9X5 = create(key("generic_9x5"));
/**
* {@code minecraft:generic_9x6}
*
* @apiNote This field is version-dependant and may be removed in future Minecraft versions
*/
public static final TypedKey<MenuType> GENERIC_9X6 = create(key("generic_9x6"));
/**
* {@code minecraft:grindstone}
*
* @apiNote This field is version-dependant and may be removed in future Minecraft versions
*/
public static final TypedKey<MenuType> GRINDSTONE = create(key("grindstone"));
/**
* {@code minecraft:hopper}
*
* @apiNote This field is version-dependant and may be removed in future Minecraft versions
*/
public static final TypedKey<MenuType> HOPPER = create(key("hopper"));
/**
* {@code minecraft:lectern}
*
* @apiNote This field is version-dependant and may be removed in future Minecraft versions
*/
public static final TypedKey<MenuType> LECTERN = create(key("lectern"));
/**
* {@code minecraft:loom}
*
* @apiNote This field is version-dependant and may be removed in future Minecraft versions
*/
public static final TypedKey<MenuType> LOOM = create(key("loom"));
/**
* {@code minecraft:merchant}
*
* @apiNote This field is version-dependant and may be removed in future Minecraft versions
*/
public static final TypedKey<MenuType> MERCHANT = create(key("merchant"));
/**
* {@code minecraft:shulker_box}
*
* @apiNote This field is version-dependant and may be removed in future Minecraft versions
*/
public static final TypedKey<MenuType> SHULKER_BOX = create(key("shulker_box"));
/**
* {@code minecraft:smithing}
*
* @apiNote This field is version-dependant and may be removed in future Minecraft versions
*/
public static final TypedKey<MenuType> SMITHING = create(key("smithing"));
/**
* {@code minecraft:smoker}
*
* @apiNote This field is version-dependant and may be removed in future Minecraft versions
*/
public static final TypedKey<MenuType> SMOKER = create(key("smoker"));
/**
* {@code minecraft:stonecutter}
*
* @apiNote This field is version-dependant and may be removed in future Minecraft versions
*/
public static final TypedKey<MenuType> STONECUTTER = create(key("stonecutter"));
private MenuTypeKeys() {
}
private static @NonNull TypedKey<MenuType> create(final @NonNull Key key) {
return TypedKey.create(RegistryKey.MENU, key);
}
}

View file

@ -0,0 +1,140 @@
package io.papermc.paper.registry.keys;
import static net.kyori.adventure.key.Key.key;
import io.papermc.paper.generated.GeneratedFrom;
import io.papermc.paper.registry.RegistryKey;
import io.papermc.paper.registry.TypedKey;
import net.kyori.adventure.key.Key;
import org.bukkit.entity.Villager;
import org.checkerframework.checker.nullness.qual.NonNull;
import org.jetbrains.annotations.ApiStatus;
/**
* Vanilla keys for {@link RegistryKey#VILLAGER_PROFESSION}.
*
* @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"
})
@GeneratedFrom("1.21.1")
@ApiStatus.Experimental
public final class VillagerProfessionKeys {
/**
* {@code minecraft:armorer}
*
* @apiNote This field is version-dependant and may be removed in future Minecraft versions
*/
public static final TypedKey<Villager.Profession> ARMORER = create(key("armorer"));
/**
* {@code minecraft:butcher}
*
* @apiNote This field is version-dependant and may be removed in future Minecraft versions
*/
public static final TypedKey<Villager.Profession> BUTCHER = create(key("butcher"));
/**
* {@code minecraft:cartographer}
*
* @apiNote This field is version-dependant and may be removed in future Minecraft versions
*/
public static final TypedKey<Villager.Profession> CARTOGRAPHER = create(key("cartographer"));
/**
* {@code minecraft:cleric}
*
* @apiNote This field is version-dependant and may be removed in future Minecraft versions
*/
public static final TypedKey<Villager.Profession> CLERIC = create(key("cleric"));
/**
* {@code minecraft:farmer}
*
* @apiNote This field is version-dependant and may be removed in future Minecraft versions
*/
public static final TypedKey<Villager.Profession> FARMER = create(key("farmer"));
/**
* {@code minecraft:fisherman}
*
* @apiNote This field is version-dependant and may be removed in future Minecraft versions
*/
public static final TypedKey<Villager.Profession> FISHERMAN = create(key("fisherman"));
/**
* {@code minecraft:fletcher}
*
* @apiNote This field is version-dependant and may be removed in future Minecraft versions
*/
public static final TypedKey<Villager.Profession> FLETCHER = create(key("fletcher"));
/**
* {@code minecraft:leatherworker}
*
* @apiNote This field is version-dependant and may be removed in future Minecraft versions
*/
public static final TypedKey<Villager.Profession> LEATHERWORKER = create(key("leatherworker"));
/**
* {@code minecraft:librarian}
*
* @apiNote This field is version-dependant and may be removed in future Minecraft versions
*/
public static final TypedKey<Villager.Profession> LIBRARIAN = create(key("librarian"));
/**
* {@code minecraft:mason}
*
* @apiNote This field is version-dependant and may be removed in future Minecraft versions
*/
public static final TypedKey<Villager.Profession> MASON = create(key("mason"));
/**
* {@code minecraft:nitwit}
*
* @apiNote This field is version-dependant and may be removed in future Minecraft versions
*/
public static final TypedKey<Villager.Profession> NITWIT = create(key("nitwit"));
/**
* {@code minecraft:none}
*
* @apiNote This field is version-dependant and may be removed in future Minecraft versions
*/
public static final TypedKey<Villager.Profession> NONE = create(key("none"));
/**
* {@code minecraft:shepherd}
*
* @apiNote This field is version-dependant and may be removed in future Minecraft versions
*/
public static final TypedKey<Villager.Profession> SHEPHERD = create(key("shepherd"));
/**
* {@code minecraft:toolsmith}
*
* @apiNote This field is version-dependant and may be removed in future Minecraft versions
*/
public static final TypedKey<Villager.Profession> TOOLSMITH = create(key("toolsmith"));
/**
* {@code minecraft:weaponsmith}
*
* @apiNote This field is version-dependant and may be removed in future Minecraft versions
*/
public static final TypedKey<Villager.Profession> WEAPONSMITH = create(key("weaponsmith"));
private VillagerProfessionKeys() {
}
private static @NonNull TypedKey<Villager.Profession> create(final @NonNull Key key) {
return TypedKey.create(RegistryKey.VILLAGER_PROFESSION, key);
}
}

View file

@ -0,0 +1,84 @@
package io.papermc.paper.registry.keys;
import static net.kyori.adventure.key.Key.key;
import io.papermc.paper.generated.GeneratedFrom;
import io.papermc.paper.registry.RegistryKey;
import io.papermc.paper.registry.TypedKey;
import net.kyori.adventure.key.Key;
import org.bukkit.entity.Villager;
import org.checkerframework.checker.nullness.qual.NonNull;
import org.jetbrains.annotations.ApiStatus;
/**
* Vanilla keys for {@link RegistryKey#VILLAGER_TYPE}.
*
* @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"
})
@GeneratedFrom("1.21.1")
@ApiStatus.Experimental
public final class VillagerTypeKeys {
/**
* {@code minecraft:desert}
*
* @apiNote This field is version-dependant and may be removed in future Minecraft versions
*/
public static final TypedKey<Villager.Type> DESERT = create(key("desert"));
/**
* {@code minecraft:jungle}
*
* @apiNote This field is version-dependant and may be removed in future Minecraft versions
*/
public static final TypedKey<Villager.Type> JUNGLE = create(key("jungle"));
/**
* {@code minecraft:plains}
*
* @apiNote This field is version-dependant and may be removed in future Minecraft versions
*/
public static final TypedKey<Villager.Type> PLAINS = create(key("plains"));
/**
* {@code minecraft:savanna}
*
* @apiNote This field is version-dependant and may be removed in future Minecraft versions
*/
public static final TypedKey<Villager.Type> SAVANNA = create(key("savanna"));
/**
* {@code minecraft:snow}
*
* @apiNote This field is version-dependant and may be removed in future Minecraft versions
*/
public static final TypedKey<Villager.Type> SNOW = create(key("snow"));
/**
* {@code minecraft:swamp}
*
* @apiNote This field is version-dependant and may be removed in future Minecraft versions
*/
public static final TypedKey<Villager.Type> SWAMP = create(key("swamp"));
/**
* {@code minecraft:taiga}
*
* @apiNote This field is version-dependant and may be removed in future Minecraft versions
*/
public static final TypedKey<Villager.Type> TAIGA = create(key("taiga"));
private VillagerTypeKeys() {
}
private static @NonNull TypedKey<Villager.Type> create(final @NonNull Key key) {
return TypedKey.create(RegistryKey.VILLAGER_TYPE, key);
}
}

View file

@ -9,34 +9,55 @@ import net.minecraft.core.Registry;
import net.minecraft.core.registries.Registries; import net.minecraft.core.registries.Registries;
import net.minecraft.resources.ResourceKey; import net.minecraft.resources.ResourceKey;
import org.bukkit.GameEvent; import org.bukkit.GameEvent;
import org.bukkit.JukeboxSong;
import org.bukkit.MusicInstrument; import org.bukkit.MusicInstrument;
import org.bukkit.block.Biome; import org.bukkit.block.Biome;
import org.bukkit.block.BlockType;
import org.bukkit.block.banner.PatternType;
import org.bukkit.damage.DamageType; import org.bukkit.damage.DamageType;
import org.bukkit.enchantments.Enchantment; import org.bukkit.enchantments.Enchantment;
import org.bukkit.entity.Cat;
import org.bukkit.entity.Frog;
import org.bukkit.entity.Villager;
import org.bukkit.entity.Wolf; import org.bukkit.entity.Wolf;
import org.bukkit.generator.structure.Structure; import org.bukkit.generator.structure.Structure;
import org.bukkit.generator.structure.StructureType; import org.bukkit.generator.structure.StructureType;
import org.bukkit.inventory.ItemType; import org.bukkit.inventory.ItemType;
import org.bukkit.inventory.MenuType;
import org.bukkit.inventory.meta.trim.TrimMaterial; import org.bukkit.inventory.meta.trim.TrimMaterial;
import org.bukkit.inventory.meta.trim.TrimPattern; import org.bukkit.inventory.meta.trim.TrimPattern;
import org.bukkit.map.MapCursor;
import org.bukkit.potion.PotionEffectType; import org.bukkit.potion.PotionEffectType;
public interface Generators { public interface Generators {
SourceGenerator[] API = { SourceGenerator[] API = {
// built-ins
simpleKey("GameEventKeys", GameEvent.class, Registries.GAME_EVENT, RegistryKey.GAME_EVENT, false), simpleKey("GameEventKeys", GameEvent.class, Registries.GAME_EVENT, RegistryKey.GAME_EVENT, false),
simpleKey("BiomeKeys", Biome.class, Registries.BIOME, RegistryKey.BIOME, true),
simpleKey("TrimMaterialKeys", TrimMaterial.class, Registries.TRIM_MATERIAL, RegistryKey.TRIM_MATERIAL, true),
simpleKey("TrimPatternKeys", TrimPattern.class, Registries.TRIM_PATTERN, RegistryKey.TRIM_PATTERN, true),
simpleKey("StructureKeys", Structure.class, Registries.STRUCTURE, RegistryKey.STRUCTURE, true),
simpleKey("StructureTypeKeys", StructureType.class, Registries.STRUCTURE_TYPE, RegistryKey.STRUCTURE_TYPE, false), simpleKey("StructureTypeKeys", StructureType.class, Registries.STRUCTURE_TYPE, RegistryKey.STRUCTURE_TYPE, false),
simpleKey("InstrumentKeys", MusicInstrument.class, Registries.INSTRUMENT, RegistryKey.INSTRUMENT, false), simpleKey("InstrumentKeys", MusicInstrument.class, Registries.INSTRUMENT, RegistryKey.INSTRUMENT, false),
simpleKey("EnchantmentKeys", Enchantment.class, Registries.ENCHANTMENT, RegistryKey.ENCHANTMENT, false),
simpleKey("MobEffectKeys", PotionEffectType.class, Registries.MOB_EFFECT, RegistryKey.MOB_EFFECT, false), simpleKey("MobEffectKeys", PotionEffectType.class, Registries.MOB_EFFECT, RegistryKey.MOB_EFFECT, false),
simpleKey("BlockTypeKeys", BlockType.class, Registries.BLOCK, RegistryKey.BLOCK, false),
simpleKey("ItemTypeKeys", ItemType.class, Registries.ITEM, RegistryKey.ITEM, false),
simpleKey("CatVariantKeys", Cat.Type.class, Registries.CAT_VARIANT, RegistryKey.CAT_VARIANT, false),
simpleKey("FrogVariantKeys", Frog.Variant.class, Registries.FROG_VARIANT, RegistryKey.FROG_VARIANT, false),
simpleKey("VillagerProfessionKeys", Villager.Profession.class, Registries.VILLAGER_PROFESSION, RegistryKey.VILLAGER_PROFESSION, false),
simpleKey("VillagerTypeKeys", Villager.Type.class, Registries.VILLAGER_TYPE, RegistryKey.VILLAGER_TYPE, false),
simpleKey("MapDecorationTypeKeys", MapCursor.Type.class, Registries.MAP_DECORATION_TYPE, RegistryKey.MAP_DECORATION_TYPE, false),
simpleKey("MenuTypeKeys", MenuType.class, Registries.MENU, RegistryKey.MENU, false),
// data-driven
simpleKey("BiomeKeys", Biome.class, Registries.BIOME, RegistryKey.BIOME, true),
simpleKey("StructureKeys", Structure.class, Registries.STRUCTURE, RegistryKey.STRUCTURE, true),
simpleKey("TrimMaterialKeys", TrimMaterial.class, Registries.TRIM_MATERIAL, RegistryKey.TRIM_MATERIAL, true),
simpleKey("TrimPatternKeys", TrimPattern.class, Registries.TRIM_PATTERN, RegistryKey.TRIM_PATTERN, true),
simpleKey("DamageTypeKeys", DamageType.class, Registries.DAMAGE_TYPE, RegistryKey.DAMAGE_TYPE, true), simpleKey("DamageTypeKeys", DamageType.class, Registries.DAMAGE_TYPE, RegistryKey.DAMAGE_TYPE, true),
simpleKey("WolfVariantKeys", Wolf.Variant.class, Registries.WOLF_VARIANT, RegistryKey.WOLF_VARIANT, true), simpleKey("WolfVariantKeys", Wolf.Variant.class, Registries.WOLF_VARIANT, RegistryKey.WOLF_VARIANT, true),
simpleKey("ItemTypeKeys", ItemType.class, Registries.ITEM, RegistryKey.ITEM, false), simpleKey("EnchantmentKeys", Enchantment.class, Registries.ENCHANTMENT, RegistryKey.ENCHANTMENT, false),
simpleKey("JukeboxSongKeys", JukeboxSong.class, Registries.JUKEBOX_SONG, RegistryKey.JUKEBOX_SONG, true),
simpleKey("BannerPatternKeys", PatternType.class, Registries.BANNER_PATTERN, RegistryKey.BANNER_PATTERN, true),
// tags
simpleTagKey("EnchantmentTagKeys", Enchantment.class, Registries.ENCHANTMENT, RegistryKey.ENCHANTMENT), simpleTagKey("EnchantmentTagKeys", Enchantment.class, Registries.ENCHANTMENT, RegistryKey.ENCHANTMENT),
simpleTagKey("ItemTypeTagKeys", ItemType.class, Registries.ITEM, RegistryKey.ITEM), simpleTagKey("ItemTypeTagKeys", ItemType.class, Registries.ITEM, RegistryKey.ITEM),
new MobGoalGenerator("VanillaGoal", "com.destroystokyo.paper.entity.ai") new MobGoalGenerator("VanillaGoal", "com.destroystokyo.paper.entity.ai")

View file

@ -1,5 +1,6 @@
package io.papermc.generator.utils; package io.papermc.generator.utils;
import java.util.Map;
import java.util.Optional; import java.util.Optional;
import org.apache.commons.lang3.math.NumberUtils; import org.apache.commons.lang3.math.NumberUtils;
import java.util.Comparator; import java.util.Comparator;
@ -12,8 +13,13 @@ public final class Formatting {
private static final Pattern ILLEGAL_FIELD_CHARACTERS = Pattern.compile("[.-/]"); private static final Pattern ILLEGAL_FIELD_CHARACTERS = Pattern.compile("[.-/]");
private static final Map<String, String> MANUAL_OVERRIDES = Map.of(
"5", "five",
"11", "eleven",
"13", "thirteen"
);
public static String formatKeyAsField(String path) { public static String formatKeyAsField(String path) {
return ILLEGAL_FIELD_CHARACTERS.matcher(path.toUpperCase(Locale.ROOT)).replaceAll("_"); return ILLEGAL_FIELD_CHARACTERS.matcher(MANUAL_OVERRIDES.getOrDefault(path, path).toUpperCase(Locale.ROOT)).replaceAll("_");
} }
public static Optional<String> formatTagKey(String tagDir, String resourcePath) { public static Optional<String> formatTagKey(String tagDir, String resourcePath) {

View file

@ -85,10 +85,10 @@ index 0000000000000000000000000000000000000000..2512dba27edfdccbc4430815b6cba048
+} +}
diff --git a/src/main/java/io/papermc/paper/registry/RegistryKey.java b/src/main/java/io/papermc/paper/registry/RegistryKey.java diff --git a/src/main/java/io/papermc/paper/registry/RegistryKey.java b/src/main/java/io/papermc/paper/registry/RegistryKey.java
new file mode 100644 new file mode 100644
index 0000000000000000000000000000000000000000..7763ea28a00c25ffd8ba8941cff29bae5ae117a2 index 0000000000000000000000000000000000000000..1e2765d296decbb3e61b8434e78b5e0214f8fee0
--- /dev/null --- /dev/null
+++ b/src/main/java/io/papermc/paper/registry/RegistryKey.java +++ b/src/main/java/io/papermc/paper/registry/RegistryKey.java
@@ -0,0 +1,149 @@ @@ -0,0 +1,177 @@
+package io.papermc.paper.registry; +package io.papermc.paper.registry;
+ +
+import net.kyori.adventure.key.Keyed; +import net.kyori.adventure.key.Keyed;
@ -172,6 +172,36 @@ index 0000000000000000000000000000000000000000..7763ea28a00c25ffd8ba8941cff29bae
+ */ + */
+ @ApiStatus.Internal + @ApiStatus.Internal
+ RegistryKey<ItemType> ITEM = create("item"); + RegistryKey<ItemType> ITEM = create("item");
+ /**
+ * Built-in registry for cat variants.
+ * @see io.papermc.paper.registry.keys.CatVariantKeys
+ */
+ RegistryKey<Cat.Type> CAT_VARIANT = create("cat_variant");
+ /**
+ * Built-in registry for frog variants.
+ * @see io.papermc.paper.registry.keys.FrogVariantKeys
+ */
+ RegistryKey<Frog.Variant> FROG_VARIANT = create("frog_variant");
+ /**
+ * Built-in registry for villager professions.
+ * @see io.papermc.paper.registry.keys.VillagerProfessionKeys
+ */
+ RegistryKey<Villager.Profession> VILLAGER_PROFESSION = create("villager_profession");
+ /**
+ * Built-in registry for villager types.
+ * @see io.papermc.paper.registry.keys.VillagerTypeKeys
+ */
+ RegistryKey<Villager.Type> VILLAGER_TYPE = create("villager_type");
+ /**
+ * Built-in registry for map decoration types.
+ * @see io.papermc.paper.registry.keys.MapDecorationTypeKeys
+ */
+ RegistryKey<MapCursor.Type> MAP_DECORATION_TYPE = create("map_decoration_type");
+ /**
+ * Built-in registry for menu types.
+ * @see io.papermc.paper.registry.keys.MenuTypeKeys
+ */
+ RegistryKey<MenuType> MENU = create("menu");
+ +
+ +
+ /* ********************** * + /* ********************** *
@ -214,9 +244,14 @@ index 0000000000000000000000000000000000000000..7763ea28a00c25ffd8ba8941cff29bae
+ RegistryKey<Enchantment> ENCHANTMENT = create("enchantment"); + RegistryKey<Enchantment> ENCHANTMENT = create("enchantment");
+ /** + /**
+ * Data-driven registry for jukebox songs. + * Data-driven registry for jukebox songs.
+ * @see io.papermc.paper.registry.keys.JukeboxSongKeys
+ */ + */
+ @ApiStatus.Experimental
+ RegistryKey<JukeboxSong> JUKEBOX_SONG = create("jukebox_song"); + RegistryKey<JukeboxSong> JUKEBOX_SONG = create("jukebox_song");
+ /**
+ * Data-driven registry for banner patterns.
+ * @see io.papermc.paper.registry.keys.BannerPatternKeys
+ */
+ RegistryKey<PatternType> BANNER_PATTERN = create("banner_pattern");
+ +
+ +
+ /* ******************* * + /* ******************* *
@ -224,19 +259,12 @@ index 0000000000000000000000000000000000000000..7763ea28a00c25ffd8ba8941cff29bae
+ * ******************* */ + * ******************* */
+ RegistryKey<Art> PAINTING_VARIANT = create("painting_variant"); + RegistryKey<Art> PAINTING_VARIANT = create("painting_variant");
+ RegistryKey<Attribute> ATTRIBUTE = create("attribute"); + RegistryKey<Attribute> ATTRIBUTE = create("attribute");
+ RegistryKey<PatternType> BANNER_PATTERN = create("banner_pattern");
+ RegistryKey<Cat.Type> CAT_VARIANT = create("cat_variant");
+ RegistryKey<EntityType> ENTITY_TYPE = create("entity_type"); + RegistryKey<EntityType> ENTITY_TYPE = create("entity_type");
+ RegistryKey<Particle> PARTICLE_TYPE = create("particle_type"); + RegistryKey<Particle> PARTICLE_TYPE = create("particle_type");
+ RegistryKey<PotionType> POTION = create("potion"); + RegistryKey<PotionType> POTION = create("potion");
+ RegistryKey<Sound> SOUND_EVENT = create("sound_event"); + RegistryKey<Sound> SOUND_EVENT = create("sound_event");
+ RegistryKey<Villager.Profession> VILLAGER_PROFESSION = create("villager_profession");
+ RegistryKey<Villager.Type> VILLAGER_TYPE = create("villager_type");
+ RegistryKey<MemoryKey<?>> MEMORY_MODULE_TYPE = create("memory_module_type"); + RegistryKey<MemoryKey<?>> MEMORY_MODULE_TYPE = create("memory_module_type");
+ RegistryKey<Fluid> FLUID = create("fluid"); + RegistryKey<Fluid> FLUID = create("fluid");
+ RegistryKey<Frog.Variant> FROG_VARIANT = create("frog_variant");
+ RegistryKey<MapCursor.Type> MAP_DECORATION_TYPE = create("map_decoration_type");
+ RegistryKey<MenuType> MENU = create("menu");
+} +}
diff --git a/src/main/java/io/papermc/paper/registry/RegistryKeyImpl.java b/src/main/java/io/papermc/paper/registry/RegistryKeyImpl.java diff --git a/src/main/java/io/papermc/paper/registry/RegistryKeyImpl.java b/src/main/java/io/papermc/paper/registry/RegistryKeyImpl.java
new file mode 100644 new file mode 100644

View file

@ -10,7 +10,7 @@ getKey() methods on Keyed objects that have a registry
are marked as Deprecated or Obsolete. are marked as Deprecated or Obsolete.
diff --git a/src/main/java/org/bukkit/Art.java b/src/main/java/org/bukkit/Art.java diff --git a/src/main/java/org/bukkit/Art.java b/src/main/java/org/bukkit/Art.java
index 042d1d932a33022e4fc873652f70dc6ed342d46a..dbbd997d4693f1d9f551bae2ed1d7906c9f39c12 100644 index 042d1d932a33022e4fc873652f70dc6ed342d46a..e57e34064262b90221b0621f1d13e9705e68421a 100644
--- a/src/main/java/org/bukkit/Art.java --- a/src/main/java/org/bukkit/Art.java
+++ b/src/main/java/org/bukkit/Art.java +++ b/src/main/java/org/bukkit/Art.java
@@ -103,6 +103,13 @@ public enum Art implements Keyed { @@ -103,6 +103,13 @@ public enum Art implements Keyed {
@ -19,8 +19,8 @@ index 042d1d932a33022e4fc873652f70dc6ed342d46a..dbbd997d4693f1d9f551bae2ed1d7906
+ // Paper start - deprecate getKey + // Paper start - deprecate getKey
+ /** + /**
+ * @deprecated use {@link Registry#getKey(Keyed)} and {@link Registry#ART}. Painting variants + * @deprecated use {@link Registry#getKey(Keyed)}, {@link io.papermc.paper.registry.RegistryAccess#getRegistry(io.papermc.paper.registry.RegistryKey)},
+ * can exist without a key. + * and {@link io.papermc.paper.registry.RegistryKey#PAINTING_VARIANT}. Painting variants can exist without a key.
+ */ + */
+ @Deprecated(since = "1.21") + @Deprecated(since = "1.21")
+ // Paper end - deprecate getKey + // Paper end - deprecate getKey
@ -164,7 +164,7 @@ index 8c7b50906fc5b84c5570408f357410810bbfbded..7a35120c82b88774de777d3c3176ef55
@Override @Override
public NamespacedKey getKey() { public NamespacedKey getKey() {
diff --git a/src/main/java/org/bukkit/block/banner/PatternType.java b/src/main/java/org/bukkit/block/banner/PatternType.java diff --git a/src/main/java/org/bukkit/block/banner/PatternType.java b/src/main/java/org/bukkit/block/banner/PatternType.java
index 9e90572745909538e942b7fbe788b5286c6cc9a3..e2afb2582a27b94a922754115dbb6b4ca35e0154 100644 index 9e90572745909538e942b7fbe788b5286c6cc9a3..8f651d3ebd5907836b5d09363a8b60f55e4afa38 100644
--- a/src/main/java/org/bukkit/block/banner/PatternType.java --- a/src/main/java/org/bukkit/block/banner/PatternType.java
+++ b/src/main/java/org/bukkit/block/banner/PatternType.java +++ b/src/main/java/org/bukkit/block/banner/PatternType.java
@@ -56,6 +56,13 @@ public interface PatternType extends OldEnum<PatternType>, Keyed { @@ -56,6 +56,13 @@ public interface PatternType extends OldEnum<PatternType>, Keyed {
@ -173,8 +173,8 @@ index 9e90572745909538e942b7fbe788b5286c6cc9a3..e2afb2582a27b94a922754115dbb6b4c
+ // Paper start - deprecate getKey + // Paper start - deprecate getKey
+ /** + /**
+ * @deprecated use {@link Registry#getKey(Keyed)} and {@link Registry#BANNER_PATTERN}. PatternTypes + * @deprecated use {@link Registry#getKey(Keyed)}, {@link io.papermc.paper.registry.RegistryAccess#getRegistry(io.papermc.paper.registry.RegistryKey)},
+ * can exist without a key. + * and {@link io.papermc.paper.registry.RegistryKey#BANNER_PATTERN}. PatternTypes can exist without a key.
+ */ + */
+ @Deprecated(since = "1.20.5") + @Deprecated(since = "1.20.5")
+ // Paper end - deprecate getKey + // Paper end - deprecate getKey
@ -200,7 +200,7 @@ index 1a766e68713d4014783b3224b9395644116784fa..978054ee364f9a3330525b9b50da5325
+ // Paper end - deprecate getKey + // Paper end - deprecate getKey
} }
diff --git a/src/main/java/org/bukkit/inventory/meta/trim/TrimMaterial.java b/src/main/java/org/bukkit/inventory/meta/trim/TrimMaterial.java diff --git a/src/main/java/org/bukkit/inventory/meta/trim/TrimMaterial.java b/src/main/java/org/bukkit/inventory/meta/trim/TrimMaterial.java
index 941fac4eee338870d8c30cb1f64cab572cf54548..74816d6da4d7c8d2fa8a7b93fdc4bf29c8d12803 100644 index 941fac4eee338870d8c30cb1f64cab572cf54548..9e98625d42199c169f79335bb6231ec355c3b930 100644
--- a/src/main/java/org/bukkit/inventory/meta/trim/TrimMaterial.java --- a/src/main/java/org/bukkit/inventory/meta/trim/TrimMaterial.java
+++ b/src/main/java/org/bukkit/inventory/meta/trim/TrimMaterial.java +++ b/src/main/java/org/bukkit/inventory/meta/trim/TrimMaterial.java
@@ -68,4 +68,14 @@ public interface TrimMaterial extends Keyed, Translatable { @@ -68,4 +68,14 @@ public interface TrimMaterial extends Keyed, Translatable {
@ -210,8 +210,8 @@ index 941fac4eee338870d8c30cb1f64cab572cf54548..74816d6da4d7c8d2fa8a7b93fdc4bf29
+ +
+ // Paper start - Registry#getKey + // Paper start - Registry#getKey
+ /** + /**
+ * @deprecated use {@link Registry#getKey(Keyed)} and {@link Registry#TRIM_MATERIAL}. TrimMaterials + * @deprecated use {@link Registry#getKey(Keyed)}, {@link io.papermc.paper.registry.RegistryAccess#getRegistry(io.papermc.paper.registry.RegistryKey)},
+ * can exist without a key. + * and {@link io.papermc.paper.registry.RegistryKey#TRIM_MATERIAL}. TrimMaterials can exist without a key.
+ */ + */
+ @Deprecated(forRemoval = true, since = "1.20.4") + @Deprecated(forRemoval = true, since = "1.20.4")
+ @Override + @Override
@ -219,7 +219,7 @@ index 941fac4eee338870d8c30cb1f64cab572cf54548..74816d6da4d7c8d2fa8a7b93fdc4bf29
+ // Paper end - Registry#getKey + // Paper end - Registry#getKey
} }
diff --git a/src/main/java/org/bukkit/inventory/meta/trim/TrimPattern.java b/src/main/java/org/bukkit/inventory/meta/trim/TrimPattern.java diff --git a/src/main/java/org/bukkit/inventory/meta/trim/TrimPattern.java b/src/main/java/org/bukkit/inventory/meta/trim/TrimPattern.java
index f2242ddc4085f7e7cdd748d860857822e3d9b007..087e99ed281c0b282d91345067bfca80762faa0b 100644 index f2242ddc4085f7e7cdd748d860857822e3d9b007..b84e495cb4bb4f833b6193c72ae241f0c69d491c 100644
--- a/src/main/java/org/bukkit/inventory/meta/trim/TrimPattern.java --- a/src/main/java/org/bukkit/inventory/meta/trim/TrimPattern.java
+++ b/src/main/java/org/bukkit/inventory/meta/trim/TrimPattern.java +++ b/src/main/java/org/bukkit/inventory/meta/trim/TrimPattern.java
@@ -100,4 +100,14 @@ public interface TrimPattern extends Keyed, Translatable { @@ -100,4 +100,14 @@ public interface TrimPattern extends Keyed, Translatable {
@ -229,8 +229,8 @@ index f2242ddc4085f7e7cdd748d860857822e3d9b007..087e99ed281c0b282d91345067bfca80
+ +
+ // Paper start - Registry#getKey + // Paper start - Registry#getKey
+ /** + /**
+ * @deprecated use {@link Registry#getKey(Keyed)} and {@link Registry#TRIM_PATTERN}. TrimPatterns + * @deprecated use {@link Registry#getKey(Keyed)}, {@link io.papermc.paper.registry.RegistryAccess#getRegistry(io.papermc.paper.registry.RegistryKey)},
+ * can exist without a key. + * and {@link io.papermc.paper.registry.RegistryKey#TRIM_PATTERN}. TrimPatterns can exist without a key.
+ */ + */
+ @Deprecated(forRemoval = true, since = "1.20.4") + @Deprecated(forRemoval = true, since = "1.20.4")
+ @Override + @Override

View file

@ -5,7 +5,7 @@ Subject: [PATCH] Introduce registry entry and builders
diff --git a/src/main/java/io/papermc/paper/registry/RegistryKey.java b/src/main/java/io/papermc/paper/registry/RegistryKey.java diff --git a/src/main/java/io/papermc/paper/registry/RegistryKey.java b/src/main/java/io/papermc/paper/registry/RegistryKey.java
index 7763ea28a00c25ffd8ba8941cff29bae5ae117a2..ccbe3fa2e01a80abb801d14891dce34ed179b5ee 100644 index 1e2765d296decbb3e61b8434e78b5e0214f8fee0..5e580649578d25f567b0f7d40bcdc68f62701f0a 100644
--- a/src/main/java/io/papermc/paper/registry/RegistryKey.java --- a/src/main/java/io/papermc/paper/registry/RegistryKey.java
+++ b/src/main/java/io/papermc/paper/registry/RegistryKey.java +++ b/src/main/java/io/papermc/paper/registry/RegistryKey.java
@@ -77,9 +77,10 @@ public sealed interface RegistryKey<T> extends Keyed permits RegistryKeyImpl { @@ -77,9 +77,10 @@ public sealed interface RegistryKey<T> extends Keyed permits RegistryKeyImpl {
@ -19,8 +19,8 @@ index 7763ea28a00c25ffd8ba8941cff29bae5ae117a2..ccbe3fa2e01a80abb801d14891dce34e
- @ApiStatus.Internal - @ApiStatus.Internal
+ @ApiStatus.Experimental // Paper - already required for registry builders + @ApiStatus.Experimental // Paper - already required for registry builders
RegistryKey<ItemType> ITEM = create("item"); RegistryKey<ItemType> ITEM = create("item");
/**
* Built-in registry for cat variants.
diff --git a/src/main/java/io/papermc/paper/registry/data/EnchantmentRegistryEntry.java b/src/main/java/io/papermc/paper/registry/data/EnchantmentRegistryEntry.java diff --git a/src/main/java/io/papermc/paper/registry/data/EnchantmentRegistryEntry.java b/src/main/java/io/papermc/paper/registry/data/EnchantmentRegistryEntry.java
new file mode 100644 new file mode 100644
index 0000000000000000000000000000000000000000..6c7d8b98103909428bb4dcf14825fe188db6d12f index 0000000000000000000000000000000000000000..6c7d8b98103909428bb4dcf14825fe188db6d12f

View file

@ -12,7 +12,7 @@ public net.minecraft.server.RegistryLayer STATIC_ACCESS
diff --git a/src/main/java/io/papermc/paper/registry/PaperRegistries.java b/src/main/java/io/papermc/paper/registry/PaperRegistries.java diff --git a/src/main/java/io/papermc/paper/registry/PaperRegistries.java b/src/main/java/io/papermc/paper/registry/PaperRegistries.java
new file mode 100644 new file mode 100644
index 0000000000000000000000000000000000000000..70e2c3b5cac9a0dfb043de218df20dc1ab2cc070 index 0000000000000000000000000000000000000000..c92ce42398a9bfd00eb4e05972289c521ee255cf
--- /dev/null --- /dev/null
+++ b/src/main/java/io/papermc/paper/registry/PaperRegistries.java +++ b/src/main/java/io/papermc/paper/registry/PaperRegistries.java
@@ -0,0 +1,146 @@ @@ -0,0 +1,146 @@
@ -87,9 +87,9 @@ index 0000000000000000000000000000000000000000..70e2c3b5cac9a0dfb043de218df20dc1
+ REGISTRY_ENTRIES = List.of( + REGISTRY_ENTRIES = List.of(
+ // built-ins + // built-ins
+ entry(Registries.GAME_EVENT, RegistryKey.GAME_EVENT, GameEvent.class, CraftGameEvent::new), + entry(Registries.GAME_EVENT, RegistryKey.GAME_EVENT, GameEvent.class, CraftGameEvent::new),
+ entry(Registries.STRUCTURE_TYPE, RegistryKey.STRUCTURE_TYPE, StructureType.class, CraftStructureType::new),
+ entry(Registries.INSTRUMENT, RegistryKey.INSTRUMENT, MusicInstrument.class, CraftMusicInstrument::new), + entry(Registries.INSTRUMENT, RegistryKey.INSTRUMENT, MusicInstrument.class, CraftMusicInstrument::new),
+ entry(Registries.MOB_EFFECT, RegistryKey.MOB_EFFECT, PotionEffectType.class, CraftPotionEffectType::new), + entry(Registries.MOB_EFFECT, RegistryKey.MOB_EFFECT, PotionEffectType.class, CraftPotionEffectType::new),
+ entry(Registries.STRUCTURE_TYPE, RegistryKey.STRUCTURE_TYPE, StructureType.class, CraftStructureType::new),
+ entry(Registries.BLOCK, RegistryKey.BLOCK, BlockType.class, CraftBlockType::new), + entry(Registries.BLOCK, RegistryKey.BLOCK, BlockType.class, CraftBlockType::new),
+ entry(Registries.ITEM, RegistryKey.ITEM, ItemType.class, CraftItemType::new), + entry(Registries.ITEM, RegistryKey.ITEM, ItemType.class, CraftItemType::new),
+ entry(Registries.CAT_VARIANT, RegistryKey.CAT_VARIANT, Cat.Type.class, CraftCat.CraftType::new), + entry(Registries.CAT_VARIANT, RegistryKey.CAT_VARIANT, Cat.Type.class, CraftCat.CraftType::new),

View file

@ -5,7 +5,7 @@ Subject: [PATCH] Add registry entry and builders
diff --git a/src/main/java/io/papermc/paper/registry/PaperRegistries.java b/src/main/java/io/papermc/paper/registry/PaperRegistries.java diff --git a/src/main/java/io/papermc/paper/registry/PaperRegistries.java b/src/main/java/io/papermc/paper/registry/PaperRegistries.java
index 38222dca2497cec5b104b21429a9ec3aaf05d99e..98b096339fe48b2fc8169ae0376e05d59236fc9a 100644 index fba7c1758439db9044d9f7368bc9b79642d6b1b9..d59e77811e4090d0f8207e4fff3300d17b1753b2 100644
--- a/src/main/java/io/papermc/paper/registry/PaperRegistries.java --- a/src/main/java/io/papermc/paper/registry/PaperRegistries.java
+++ b/src/main/java/io/papermc/paper/registry/PaperRegistries.java +++ b/src/main/java/io/papermc/paper/registry/PaperRegistries.java
@@ -1,6 +1,8 @@ @@ -1,6 +1,8 @@
@ -23,9 +23,9 @@ index 38222dca2497cec5b104b21429a9ec3aaf05d99e..98b096339fe48b2fc8169ae0376e05d5
// built-ins // built-ins
- entry(Registries.GAME_EVENT, RegistryKey.GAME_EVENT, GameEvent.class, CraftGameEvent::new), - entry(Registries.GAME_EVENT, RegistryKey.GAME_EVENT, GameEvent.class, CraftGameEvent::new),
+ writable(Registries.GAME_EVENT, RegistryKey.GAME_EVENT, GameEvent.class, CraftGameEvent::new, PaperGameEventRegistryEntry.PaperBuilder::new), + writable(Registries.GAME_EVENT, RegistryKey.GAME_EVENT, GameEvent.class, CraftGameEvent::new, PaperGameEventRegistryEntry.PaperBuilder::new),
entry(Registries.STRUCTURE_TYPE, RegistryKey.STRUCTURE_TYPE, StructureType.class, CraftStructureType::new),
entry(Registries.INSTRUMENT, RegistryKey.INSTRUMENT, MusicInstrument.class, CraftMusicInstrument::new), entry(Registries.INSTRUMENT, RegistryKey.INSTRUMENT, MusicInstrument.class, CraftMusicInstrument::new),
entry(Registries.MOB_EFFECT, RegistryKey.MOB_EFFECT, PotionEffectType.class, CraftPotionEffectType::new), entry(Registries.MOB_EFFECT, RegistryKey.MOB_EFFECT, PotionEffectType.class, CraftPotionEffectType::new),
entry(Registries.STRUCTURE_TYPE, RegistryKey.STRUCTURE_TYPE, StructureType.class, CraftStructureType::new),
@@ -89,7 +91,7 @@ public final class PaperRegistries { @@ -89,7 +91,7 @@ public final class PaperRegistries {
entry(Registries.TRIM_PATTERN, RegistryKey.TRIM_PATTERN, TrimPattern.class, CraftTrimPattern::new).delayed(), entry(Registries.TRIM_PATTERN, RegistryKey.TRIM_PATTERN, TrimPattern.class, CraftTrimPattern::new).delayed(),
entry(Registries.DAMAGE_TYPE, RegistryKey.DAMAGE_TYPE, DamageType.class, CraftDamageType::new).delayed(), entry(Registries.DAMAGE_TYPE, RegistryKey.DAMAGE_TYPE, DamageType.class, CraftDamageType::new).delayed(),