Co-authored-by: Bjarne Koll <git@lynxplay.dev>
Co-authored-by: Jake Potrebic <jake.m.potrebic@gmail.com>
Co-authored-by: Lulu13022002 <41980282+Lulu13022002@users.noreply.github.com>
Co-authored-by: MiniDigger | Martin <admin@minidigger.dev>
Co-authored-by: Nassim Jahnke <nassim@njahnke.dev>
Co-authored-by: Noah van der Aa <ndvdaa@gmail.com>
Co-authored-by: Owen1212055 <23108066+Owen1212055@users.noreply.github.com>
Co-authored-by: Shane Freeder <theboyetronic@gmail.com>
Co-authored-by: Spottedleaf <Spottedleaf@users.noreply.github.com>
Co-authored-by: Tamion <70228790+notTamion@users.noreply.github.com>
Co-authored-by: Warrior <50800980+Warriorrrr@users.noreply.github.com>
This commit is contained in:
Nassim Jahnke
2025-04-12 17:26:44 +02:00
parent 0767902699
commit f00727c57e
2092 changed files with 50551 additions and 48729 deletions

View File

@ -10,8 +10,10 @@ java {
}
val annotationsVersion = "26.0.1"
val bungeeCordChatVersion = "1.20-R0.2"
val adventureVersion = "4.20.0"
// Keep in sync with paper-server adventure-text-serializer-ansi dep
val adventureVersion = "4.21.0-mc1215-SNAPSHOT" // FIXME move to release asap
val adventureJavadocVersion = "4.20.0" // Fixme remove me
val bungeeCordChatVersion = "1.21-R0.2-deprecated+build.21"
val slf4jVersion = "2.0.9"
val log4jVersion = "2.17.1"
@ -56,17 +58,19 @@ dependencies {
api("com.mojang:brigadier:1.3.10")
// Deprecate bungeecord-chat in favor of adventure
api("net.md-5:bungeecord-chat:$bungeeCordChatVersion-deprecated+build.19") {
api("net.md-5:bungeecord-chat:$bungeeCordChatVersion") {
exclude("com.google.guava", "guava")
}
apiAndDocs(platform("net.kyori:adventure-bom:$adventureVersion"))
apiAndDocs("net.kyori:adventure-api")
apiAndDocs("net.kyori:adventure-text-minimessage")
apiAndDocs("net.kyori:adventure-text-serializer-gson")
apiAndDocs("net.kyori:adventure-text-serializer-legacy")
apiAndDocs("net.kyori:adventure-text-serializer-plain")
apiAndDocs("net.kyori:adventure-text-logger-slf4j")
// FIXME remove me when we are using a release again
val adventureGroup = "io.papermc.adventure"
apiAndDocs(platform("$adventureGroup:adventure-bom:$adventureVersion"))
apiAndDocs("$adventureGroup:adventure-api")
apiAndDocs("$adventureGroup:adventure-text-minimessage")
apiAndDocs("$adventureGroup:adventure-text-serializer-gson")
apiAndDocs("$adventureGroup:adventure-text-serializer-legacy")
apiAndDocs("$adventureGroup:adventure-text-serializer-plain")
apiAndDocs("$adventureGroup:adventure-text-logger-slf4j")
api("org.apache.maven:maven-resolver-provider:3.9.6") // make API dependency for Paper Plugins
compileOnly("org.apache.maven.resolver:maven-resolver-connector-basic:1.9.18")
@ -93,16 +97,16 @@ dependencies {
testRuntimeOnly("org.junit.platform:junit-platform-launcher")
}
val generatedApiPath: java.nio.file.Path = layout.projectDirectory.dir("src/generated/java").asFile.toPath()
val generatedDir: java.nio.file.Path = layout.projectDirectory.dir("src/generated/java").asFile.toPath()
idea {
module {
generatedSourceDirs.add(generatedApiPath.toFile())
generatedSourceDirs.add(generatedDir.toFile())
}
}
sourceSets {
main {
java {
srcDir(generatedApiPath)
srcDir(generatedDir)
}
}
}
@ -179,13 +183,13 @@ tasks.withType<Javadoc> {
"https://javadoc.io/doc/org.joml/joml/1.10.8/",
"https://www.javadoc.io/doc/com.google.code.gson/gson/2.11.0",
"https://jspecify.dev/docs/api/",
"https://jd.advntr.dev/api/$adventureVersion/",
"https://jd.advntr.dev/key/$adventureVersion/",
"https://jd.advntr.dev/text-minimessage/$adventureVersion/",
"https://jd.advntr.dev/text-serializer-gson/$adventureVersion/",
"https://jd.advntr.dev/text-serializer-legacy/$adventureVersion/",
"https://jd.advntr.dev/text-serializer-plain/$adventureVersion/",
"https://jd.advntr.dev/text-logger-slf4j/$adventureVersion/",
"https://jd.advntr.dev/api/$adventureJavadocVersion/",
"https://jd.advntr.dev/key/$adventureJavadocVersion/",
"https://jd.advntr.dev/text-minimessage/$adventureJavadocVersion/",
"https://jd.advntr.dev/text-serializer-gson/$adventureJavadocVersion/",
"https://jd.advntr.dev/text-serializer-legacy/$adventureJavadocVersion/",
"https://jd.advntr.dev/text-serializer-plain/$adventureJavadocVersion/",
"https://jd.advntr.dev/text-logger-slf4j/$adventureJavadocVersion/",
"https://javadoc.io/doc/org.slf4j/slf4j-api/$slf4jVersion/",
"https://javadoc.io/doc/org.apache.logging.log4j/log4j-api/$log4jVersion/",
"https://javadoc.io/doc/org.apache.maven.resolver/maven-resolver-api/1.7.3",
@ -228,21 +232,23 @@ tasks.compileTestJava {
options.compilerArgs.add("-parameters")
}
val scanJar = tasks.register("scanJarForBadCalls", io.papermc.paperweight.tasks.ScanJarForBadCalls::class) {
val scanJarForBadCalls by tasks.registering(io.papermc.paperweight.tasks.ScanJarForBadCalls::class) {
badAnnotations.add("Lio/papermc/paper/annotation/DoNotUse;")
jarToScan.set(tasks.jar.flatMap { it.archiveFile })
classpath.from(configurations.compileClasspath)
}
tasks.check {
dependsOn(scanJar)
dependsOn(scanJarForBadCalls)
}
val scanJarForOldGeneratedCode = tasks.register("scanJarForOldGeneratedCode", io.papermc.paperweight.tasks.ScanJarForOldGeneratedCode::class) {
mcVersion.set(providers.gradleProperty("mcVersion"))
annotation.set("Lio/papermc/paper/generated/GeneratedFrom;")
jarToScan.set(tasks.jar.flatMap { it.archiveFile })
classpath.from(configurations.compileClasspath)
}
tasks.check {
dependsOn(scanJarForOldGeneratedCode)
if (providers.gradleProperty("updatingMinecraft").getOrElse("false").toBoolean()) {
val scanJarForOldGeneratedCode by tasks.registering(io.papermc.paperweight.tasks.ScanJarForOldGeneratedCode::class) {
mcVersion.set(providers.gradleProperty("mcVersion"))
annotation.set("Lio/papermc/paper/generated/GeneratedFrom;")
jarToScan.set(tasks.jar.flatMap { it.archiveFile })
classpath.from(configurations.compileClasspath)
}
tasks.check {
dependsOn(scanJarForOldGeneratedCode)
}
}

View File

@ -66,8 +66,8 @@ import org.jspecify.annotations.NullMarked;
"unused",
"SpellCheckingInspection"
})
@GeneratedFrom("1.21.4")
@NullMarked
@GeneratedFrom("1.21.5")
public interface VanillaGoal<T extends Mob> extends Goal<T> {
GoalKey<AbstractHorse> RANDOM_STAND = create("random_stand", AbstractHorse.class);

View File

@ -22,8 +22,8 @@ import org.jspecify.annotations.NullMarked;
"unused",
"SpellCheckingInspection"
})
@GeneratedFrom("1.21.4")
@NullMarked
@GeneratedFrom("1.21.5")
public final class AttributeKeys {
/**
* {@code minecraft:armor}

View File

@ -22,8 +22,8 @@ import org.jspecify.annotations.NullMarked;
"unused",
"SpellCheckingInspection"
})
@GeneratedFrom("1.21.4")
@NullMarked
@GeneratedFrom("1.21.5")
public final class BannerPatternKeys {
/**
* {@code minecraft:base}
@ -330,7 +330,7 @@ public final class BannerPatternKeys {
}
/**
* Creates a key for {@link PatternType} in the registry {@code minecraft:banner_pattern}.
* Creates a typed 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

View File

@ -22,8 +22,8 @@ import org.jspecify.annotations.NullMarked;
"unused",
"SpellCheckingInspection"
})
@GeneratedFrom("1.21.4")
@NullMarked
@GeneratedFrom("1.21.5")
public final class BiomeKeys {
/**
* {@code minecraft:badlands}
@ -484,7 +484,7 @@ public final class BiomeKeys {
}
/**
* Creates a key for {@link Biome} in the registry {@code minecraft:worldgen/biome}.
* Creates a typed key for {@link Biome} in the registry {@code minecraft:worldgen/biome}.
*
* @param key the value's key in the registry
* @return a new typed key

View File

@ -22,8 +22,8 @@ import org.jspecify.annotations.NullMarked;
"unused",
"SpellCheckingInspection"
})
@GeneratedFrom("1.21.4")
@NullMarked
@GeneratedFrom("1.21.5")
public final class BlockTypeKeys {
/**
* {@code minecraft:acacia_button}
@ -1061,6 +1061,13 @@ public final class BlockTypeKeys {
*/
public static final TypedKey<BlockType> BUDDING_AMETHYST = create(key("budding_amethyst"));
/**
* {@code minecraft:bush}
*
* @apiNote This field is version-dependant and may be removed in future Minecraft versions
*/
public static final TypedKey<BlockType> BUSH = create(key("bush"));
/**
* {@code minecraft:cactus}
*
@ -1068,6 +1075,13 @@ public final class BlockTypeKeys {
*/
public static final TypedKey<BlockType> CACTUS = create(key("cactus"));
/**
* {@code minecraft:cactus_flower}
*
* @apiNote This field is version-dependant and may be removed in future Minecraft versions
*/
public static final TypedKey<BlockType> CACTUS_FLOWER = create(key("cactus_flower"));
/**
* {@code minecraft:cake}
*
@ -2685,6 +2699,13 @@ public final class BlockTypeKeys {
*/
public static final TypedKey<BlockType> FIRE_CORAL_WALL_FAN = create(key("fire_coral_wall_fan"));
/**
* {@code minecraft:firefly_bush}
*
* @apiNote This field is version-dependant and may be removed in future Minecraft versions
*/
public static final TypedKey<BlockType> FIREFLY_BUSH = create(key("firefly_bush"));
/**
* {@code minecraft:fletching_table}
*
@ -3406,6 +3427,13 @@ public final class BlockTypeKeys {
*/
public static final TypedKey<BlockType> LAVA_CAULDRON = create(key("lava_cauldron"));
/**
* {@code minecraft:leaf_litter}
*
* @apiNote This field is version-dependant and may be removed in future Minecraft versions
*/
public static final TypedKey<BlockType> LEAF_LITTER = create(key("leaf_litter"));
/**
* {@code minecraft:lectern}
*
@ -6080,6 +6108,13 @@ public final class BlockTypeKeys {
*/
public static final TypedKey<BlockType> SEAGRASS = create(key("seagrass"));
/**
* {@code minecraft:short_dry_grass}
*
* @apiNote This field is version-dependant and may be removed in future Minecraft versions
*/
public static final TypedKey<BlockType> SHORT_DRY_GRASS = create(key("short_dry_grass"));
/**
* {@code minecraft:short_grass}
*
@ -6731,6 +6766,13 @@ public final class BlockTypeKeys {
*/
public static final TypedKey<BlockType> SWEET_BERRY_BUSH = create(key("sweet_berry_bush"));
/**
* {@code minecraft:tall_dry_grass}
*
* @apiNote This field is version-dependant and may be removed in future Minecraft versions
*/
public static final TypedKey<BlockType> TALL_DRY_GRASS = create(key("tall_dry_grass"));
/**
* {@code minecraft:tall_grass}
*
@ -6759,6 +6801,20 @@ public final class BlockTypeKeys {
*/
public static final TypedKey<BlockType> TERRACOTTA = create(key("terracotta"));
/**
* {@code minecraft:test_block}
*
* @apiNote This field is version-dependant and may be removed in future Minecraft versions
*/
public static final TypedKey<BlockType> TEST_BLOCK = create(key("test_block"));
/**
* {@code minecraft:test_instance_block}
*
* @apiNote This field is version-dependant and may be removed in future Minecraft versions
*/
public static final TypedKey<BlockType> TEST_INSTANCE_BLOCK = create(key("test_instance_block"));
/**
* {@code minecraft:tinted_glass}
*
@ -7557,6 +7613,13 @@ public final class BlockTypeKeys {
*/
public static final TypedKey<BlockType> WHITE_WOOL = create(key("white_wool"));
/**
* {@code minecraft:wildflowers}
*
* @apiNote This field is version-dependant and may be removed in future Minecraft versions
*/
public static final TypedKey<BlockType> WILDFLOWERS = create(key("wildflowers"));
/**
* {@code minecraft:wither_rose}
*

View File

@ -22,8 +22,8 @@ import org.jspecify.annotations.NullMarked;
"unused",
"SpellCheckingInspection"
})
@GeneratedFrom("1.21.4")
@NullMarked
@GeneratedFrom("1.21.5")
public final class CatVariantKeys {
/**
* {@code minecraft:all_black}
@ -105,7 +105,13 @@ public final class CatVariantKeys {
private CatVariantKeys() {
}
private static TypedKey<Cat.Type> create(final Key key) {
/**
* Creates a typed key for {@link Cat.Type} in the registry {@code minecraft:cat_variant}.
*
* @param key the value's key in the registry
* @return a new typed key
*/
public static TypedKey<Cat.Type> create(final Key key) {
return TypedKey.create(RegistryKey.CAT_VARIANT, key);
}
}

View File

@ -0,0 +1,61 @@
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.Chicken;
import org.jspecify.annotations.NullMarked;
/**
* Vanilla keys for {@link RegistryKey#CHICKEN_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"
})
@NullMarked
@GeneratedFrom("1.21.5")
public final class ChickenVariantKeys {
/**
* {@code minecraft:cold}
*
* @apiNote This field is version-dependant and may be removed in future Minecraft versions
*/
public static final TypedKey<Chicken.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<Chicken.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<Chicken.Variant> WARM = create(key("warm"));
private ChickenVariantKeys() {
}
/**
* Creates a typed key for {@link Chicken.Variant} in the registry {@code minecraft:chicken_variant}.
*
* @param key the value's key in the registry
* @return a new typed key
*/
public static TypedKey<Chicken.Variant> create(final Key key) {
return TypedKey.create(RegistryKey.CHICKEN_VARIANT, key);
}
}

View File

@ -0,0 +1,61 @@
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.Cow;
import org.jspecify.annotations.NullMarked;
/**
* Vanilla keys for {@link RegistryKey#COW_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"
})
@NullMarked
@GeneratedFrom("1.21.5")
public final class CowVariantKeys {
/**
* {@code minecraft:cold}
*
* @apiNote This field is version-dependant and may be removed in future Minecraft versions
*/
public static final TypedKey<Cow.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<Cow.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<Cow.Variant> WARM = create(key("warm"));
private CowVariantKeys() {
}
/**
* Creates a typed key for {@link Cow.Variant} in the registry {@code minecraft:cow_variant}.
*
* @param key the value's key in the registry
* @return a new typed key
*/
public static TypedKey<Cow.Variant> create(final Key key) {
return TypedKey.create(RegistryKey.COW_VARIANT, key);
}
}

View File

@ -22,8 +22,8 @@ import org.jspecify.annotations.NullMarked;
"unused",
"SpellCheckingInspection"
})
@GeneratedFrom("1.21.4")
@NullMarked
@GeneratedFrom("1.21.5")
public final class DamageTypeKeys {
/**
* {@code minecraft:arrow}
@ -372,7 +372,7 @@ public final class DamageTypeKeys {
}
/**
* Creates a key for {@link DamageType} in the registry {@code minecraft:damage_type}.
* Creates a typed key for {@link DamageType} in the registry {@code minecraft:damage_type}.
*
* @param key the value's key in the registry
* @return a new typed key

View File

@ -0,0 +1,706 @@
package io.papermc.paper.registry.keys;
import static net.kyori.adventure.key.Key.key;
import io.papermc.paper.datacomponent.DataComponentType;
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.jspecify.annotations.NullMarked;
/**
* Vanilla keys for {@link RegistryKey#DATA_COMPONENT_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"
})
@NullMarked
@GeneratedFrom("1.21.5")
public final class DataComponentTypeKeys {
/**
* {@code minecraft:attribute_modifiers}
*
* @apiNote This field is version-dependant and may be removed in future Minecraft versions
*/
public static final TypedKey<DataComponentType> ATTRIBUTE_MODIFIERS = create(key("attribute_modifiers"));
/**
* {@code minecraft:axolotl/variant}
*
* @apiNote This field is version-dependant and may be removed in future Minecraft versions
*/
public static final TypedKey<DataComponentType> AXOLOTL_VARIANT = create(key("axolotl/variant"));
/**
* {@code minecraft:banner_patterns}
*
* @apiNote This field is version-dependant and may be removed in future Minecraft versions
*/
public static final TypedKey<DataComponentType> BANNER_PATTERNS = create(key("banner_patterns"));
/**
* {@code minecraft:base_color}
*
* @apiNote This field is version-dependant and may be removed in future Minecraft versions
*/
public static final TypedKey<DataComponentType> BASE_COLOR = create(key("base_color"));
/**
* {@code minecraft:bees}
*
* @apiNote This field is version-dependant and may be removed in future Minecraft versions
*/
public static final TypedKey<DataComponentType> BEES = create(key("bees"));
/**
* {@code minecraft:block_entity_data}
*
* @apiNote This field is version-dependant and may be removed in future Minecraft versions
*/
public static final TypedKey<DataComponentType> BLOCK_ENTITY_DATA = create(key("block_entity_data"));
/**
* {@code minecraft:block_state}
*
* @apiNote This field is version-dependant and may be removed in future Minecraft versions
*/
public static final TypedKey<DataComponentType> BLOCK_STATE = create(key("block_state"));
/**
* {@code minecraft:blocks_attacks}
*
* @apiNote This field is version-dependant and may be removed in future Minecraft versions
*/
public static final TypedKey<DataComponentType> BLOCKS_ATTACKS = create(key("blocks_attacks"));
/**
* {@code minecraft:break_sound}
*
* @apiNote This field is version-dependant and may be removed in future Minecraft versions
*/
public static final TypedKey<DataComponentType> BREAK_SOUND = create(key("break_sound"));
/**
* {@code minecraft:bucket_entity_data}
*
* @apiNote This field is version-dependant and may be removed in future Minecraft versions
*/
public static final TypedKey<DataComponentType> BUCKET_ENTITY_DATA = create(key("bucket_entity_data"));
/**
* {@code minecraft:bundle_contents}
*
* @apiNote This field is version-dependant and may be removed in future Minecraft versions
*/
public static final TypedKey<DataComponentType> BUNDLE_CONTENTS = create(key("bundle_contents"));
/**
* {@code minecraft:can_break}
*
* @apiNote This field is version-dependant and may be removed in future Minecraft versions
*/
public static final TypedKey<DataComponentType> CAN_BREAK = create(key("can_break"));
/**
* {@code minecraft:can_place_on}
*
* @apiNote This field is version-dependant and may be removed in future Minecraft versions
*/
public static final TypedKey<DataComponentType> CAN_PLACE_ON = create(key("can_place_on"));
/**
* {@code minecraft:cat/collar}
*
* @apiNote This field is version-dependant and may be removed in future Minecraft versions
*/
public static final TypedKey<DataComponentType> CAT_COLLAR = create(key("cat/collar"));
/**
* {@code minecraft:cat/variant}
*
* @apiNote This field is version-dependant and may be removed in future Minecraft versions
*/
public static final TypedKey<DataComponentType> CAT_VARIANT = create(key("cat/variant"));
/**
* {@code minecraft:charged_projectiles}
*
* @apiNote This field is version-dependant and may be removed in future Minecraft versions
*/
public static final TypedKey<DataComponentType> CHARGED_PROJECTILES = create(key("charged_projectiles"));
/**
* {@code minecraft:chicken/variant}
*
* @apiNote This field is version-dependant and may be removed in future Minecraft versions
*/
public static final TypedKey<DataComponentType> CHICKEN_VARIANT = create(key("chicken/variant"));
/**
* {@code minecraft:consumable}
*
* @apiNote This field is version-dependant and may be removed in future Minecraft versions
*/
public static final TypedKey<DataComponentType> CONSUMABLE = create(key("consumable"));
/**
* {@code minecraft:container}
*
* @apiNote This field is version-dependant and may be removed in future Minecraft versions
*/
public static final TypedKey<DataComponentType> CONTAINER = create(key("container"));
/**
* {@code minecraft:container_loot}
*
* @apiNote This field is version-dependant and may be removed in future Minecraft versions
*/
public static final TypedKey<DataComponentType> CONTAINER_LOOT = create(key("container_loot"));
/**
* {@code minecraft:cow/variant}
*
* @apiNote This field is version-dependant and may be removed in future Minecraft versions
*/
public static final TypedKey<DataComponentType> COW_VARIANT = create(key("cow/variant"));
/**
* {@code minecraft:creative_slot_lock}
*
* @apiNote This field is version-dependant and may be removed in future Minecraft versions
*/
public static final TypedKey<DataComponentType> CREATIVE_SLOT_LOCK = create(key("creative_slot_lock"));
/**
* {@code minecraft:custom_data}
*
* @apiNote This field is version-dependant and may be removed in future Minecraft versions
*/
public static final TypedKey<DataComponentType> CUSTOM_DATA = create(key("custom_data"));
/**
* {@code minecraft:custom_model_data}
*
* @apiNote This field is version-dependant and may be removed in future Minecraft versions
*/
public static final TypedKey<DataComponentType> CUSTOM_MODEL_DATA = create(key("custom_model_data"));
/**
* {@code minecraft:custom_name}
*
* @apiNote This field is version-dependant and may be removed in future Minecraft versions
*/
public static final TypedKey<DataComponentType> CUSTOM_NAME = create(key("custom_name"));
/**
* {@code minecraft:damage}
*
* @apiNote This field is version-dependant and may be removed in future Minecraft versions
*/
public static final TypedKey<DataComponentType> DAMAGE = create(key("damage"));
/**
* {@code minecraft:damage_resistant}
*
* @apiNote This field is version-dependant and may be removed in future Minecraft versions
*/
public static final TypedKey<DataComponentType> DAMAGE_RESISTANT = create(key("damage_resistant"));
/**
* {@code minecraft:death_protection}
*
* @apiNote This field is version-dependant and may be removed in future Minecraft versions
*/
public static final TypedKey<DataComponentType> DEATH_PROTECTION = create(key("death_protection"));
/**
* {@code minecraft:debug_stick_state}
*
* @apiNote This field is version-dependant and may be removed in future Minecraft versions
*/
public static final TypedKey<DataComponentType> DEBUG_STICK_STATE = create(key("debug_stick_state"));
/**
* {@code minecraft:dyed_color}
*
* @apiNote This field is version-dependant and may be removed in future Minecraft versions
*/
public static final TypedKey<DataComponentType> DYED_COLOR = create(key("dyed_color"));
/**
* {@code minecraft:enchantable}
*
* @apiNote This field is version-dependant and may be removed in future Minecraft versions
*/
public static final TypedKey<DataComponentType> ENCHANTABLE = create(key("enchantable"));
/**
* {@code minecraft:enchantment_glint_override}
*
* @apiNote This field is version-dependant and may be removed in future Minecraft versions
*/
public static final TypedKey<DataComponentType> ENCHANTMENT_GLINT_OVERRIDE = create(key("enchantment_glint_override"));
/**
* {@code minecraft:enchantments}
*
* @apiNote This field is version-dependant and may be removed in future Minecraft versions
*/
public static final TypedKey<DataComponentType> ENCHANTMENTS = create(key("enchantments"));
/**
* {@code minecraft:entity_data}
*
* @apiNote This field is version-dependant and may be removed in future Minecraft versions
*/
public static final TypedKey<DataComponentType> ENTITY_DATA = create(key("entity_data"));
/**
* {@code minecraft:equippable}
*
* @apiNote This field is version-dependant and may be removed in future Minecraft versions
*/
public static final TypedKey<DataComponentType> EQUIPPABLE = create(key("equippable"));
/**
* {@code minecraft:firework_explosion}
*
* @apiNote This field is version-dependant and may be removed in future Minecraft versions
*/
public static final TypedKey<DataComponentType> FIREWORK_EXPLOSION = create(key("firework_explosion"));
/**
* {@code minecraft:fireworks}
*
* @apiNote This field is version-dependant and may be removed in future Minecraft versions
*/
public static final TypedKey<DataComponentType> FIREWORKS = create(key("fireworks"));
/**
* {@code minecraft:food}
*
* @apiNote This field is version-dependant and may be removed in future Minecraft versions
*/
public static final TypedKey<DataComponentType> FOOD = create(key("food"));
/**
* {@code minecraft:fox/variant}
*
* @apiNote This field is version-dependant and may be removed in future Minecraft versions
*/
public static final TypedKey<DataComponentType> FOX_VARIANT = create(key("fox/variant"));
/**
* {@code minecraft:frog/variant}
*
* @apiNote This field is version-dependant and may be removed in future Minecraft versions
*/
public static final TypedKey<DataComponentType> FROG_VARIANT = create(key("frog/variant"));
/**
* {@code minecraft:glider}
*
* @apiNote This field is version-dependant and may be removed in future Minecraft versions
*/
public static final TypedKey<DataComponentType> GLIDER = create(key("glider"));
/**
* {@code minecraft:horse/variant}
*
* @apiNote This field is version-dependant and may be removed in future Minecraft versions
*/
public static final TypedKey<DataComponentType> HORSE_VARIANT = create(key("horse/variant"));
/**
* {@code minecraft:instrument}
*
* @apiNote This field is version-dependant and may be removed in future Minecraft versions
*/
public static final TypedKey<DataComponentType> INSTRUMENT = create(key("instrument"));
/**
* {@code minecraft:intangible_projectile}
*
* @apiNote This field is version-dependant and may be removed in future Minecraft versions
*/
public static final TypedKey<DataComponentType> INTANGIBLE_PROJECTILE = create(key("intangible_projectile"));
/**
* {@code minecraft:item_model}
*
* @apiNote This field is version-dependant and may be removed in future Minecraft versions
*/
public static final TypedKey<DataComponentType> ITEM_MODEL = create(key("item_model"));
/**
* {@code minecraft:item_name}
*
* @apiNote This field is version-dependant and may be removed in future Minecraft versions
*/
public static final TypedKey<DataComponentType> ITEM_NAME = create(key("item_name"));
/**
* {@code minecraft:jukebox_playable}
*
* @apiNote This field is version-dependant and may be removed in future Minecraft versions
*/
public static final TypedKey<DataComponentType> JUKEBOX_PLAYABLE = create(key("jukebox_playable"));
/**
* {@code minecraft:llama/variant}
*
* @apiNote This field is version-dependant and may be removed in future Minecraft versions
*/
public static final TypedKey<DataComponentType> LLAMA_VARIANT = create(key("llama/variant"));
/**
* {@code minecraft:lock}
*
* @apiNote This field is version-dependant and may be removed in future Minecraft versions
*/
public static final TypedKey<DataComponentType> LOCK = create(key("lock"));
/**
* {@code minecraft:lodestone_tracker}
*
* @apiNote This field is version-dependant and may be removed in future Minecraft versions
*/
public static final TypedKey<DataComponentType> LODESTONE_TRACKER = create(key("lodestone_tracker"));
/**
* {@code minecraft:lore}
*
* @apiNote This field is version-dependant and may be removed in future Minecraft versions
*/
public static final TypedKey<DataComponentType> LORE = create(key("lore"));
/**
* {@code minecraft:map_color}
*
* @apiNote This field is version-dependant and may be removed in future Minecraft versions
*/
public static final TypedKey<DataComponentType> MAP_COLOR = create(key("map_color"));
/**
* {@code minecraft:map_decorations}
*
* @apiNote This field is version-dependant and may be removed in future Minecraft versions
*/
public static final TypedKey<DataComponentType> MAP_DECORATIONS = create(key("map_decorations"));
/**
* {@code minecraft:map_id}
*
* @apiNote This field is version-dependant and may be removed in future Minecraft versions
*/
public static final TypedKey<DataComponentType> MAP_ID = create(key("map_id"));
/**
* {@code minecraft:map_post_processing}
*
* @apiNote This field is version-dependant and may be removed in future Minecraft versions
*/
public static final TypedKey<DataComponentType> MAP_POST_PROCESSING = create(key("map_post_processing"));
/**
* {@code minecraft:max_damage}
*
* @apiNote This field is version-dependant and may be removed in future Minecraft versions
*/
public static final TypedKey<DataComponentType> MAX_DAMAGE = create(key("max_damage"));
/**
* {@code minecraft:max_stack_size}
*
* @apiNote This field is version-dependant and may be removed in future Minecraft versions
*/
public static final TypedKey<DataComponentType> MAX_STACK_SIZE = create(key("max_stack_size"));
/**
* {@code minecraft:mooshroom/variant}
*
* @apiNote This field is version-dependant and may be removed in future Minecraft versions
*/
public static final TypedKey<DataComponentType> MOOSHROOM_VARIANT = create(key("mooshroom/variant"));
/**
* {@code minecraft:note_block_sound}
*
* @apiNote This field is version-dependant and may be removed in future Minecraft versions
*/
public static final TypedKey<DataComponentType> NOTE_BLOCK_SOUND = create(key("note_block_sound"));
/**
* {@code minecraft:ominous_bottle_amplifier}
*
* @apiNote This field is version-dependant and may be removed in future Minecraft versions
*/
public static final TypedKey<DataComponentType> OMINOUS_BOTTLE_AMPLIFIER = create(key("ominous_bottle_amplifier"));
/**
* {@code minecraft:painting/variant}
*
* @apiNote This field is version-dependant and may be removed in future Minecraft versions
*/
public static final TypedKey<DataComponentType> PAINTING_VARIANT = create(key("painting/variant"));
/**
* {@code minecraft:parrot/variant}
*
* @apiNote This field is version-dependant and may be removed in future Minecraft versions
*/
public static final TypedKey<DataComponentType> PARROT_VARIANT = create(key("parrot/variant"));
/**
* {@code minecraft:pig/variant}
*
* @apiNote This field is version-dependant and may be removed in future Minecraft versions
*/
public static final TypedKey<DataComponentType> PIG_VARIANT = create(key("pig/variant"));
/**
* {@code minecraft:pot_decorations}
*
* @apiNote This field is version-dependant and may be removed in future Minecraft versions
*/
public static final TypedKey<DataComponentType> POT_DECORATIONS = create(key("pot_decorations"));
/**
* {@code minecraft:potion_contents}
*
* @apiNote This field is version-dependant and may be removed in future Minecraft versions
*/
public static final TypedKey<DataComponentType> POTION_CONTENTS = create(key("potion_contents"));
/**
* {@code minecraft:potion_duration_scale}
*
* @apiNote This field is version-dependant and may be removed in future Minecraft versions
*/
public static final TypedKey<DataComponentType> POTION_DURATION_SCALE = create(key("potion_duration_scale"));
/**
* {@code minecraft:profile}
*
* @apiNote This field is version-dependant and may be removed in future Minecraft versions
*/
public static final TypedKey<DataComponentType> PROFILE = create(key("profile"));
/**
* {@code minecraft:provides_banner_patterns}
*
* @apiNote This field is version-dependant and may be removed in future Minecraft versions
*/
public static final TypedKey<DataComponentType> PROVIDES_BANNER_PATTERNS = create(key("provides_banner_patterns"));
/**
* {@code minecraft:provides_trim_material}
*
* @apiNote This field is version-dependant and may be removed in future Minecraft versions
*/
public static final TypedKey<DataComponentType> PROVIDES_TRIM_MATERIAL = create(key("provides_trim_material"));
/**
* {@code minecraft:rabbit/variant}
*
* @apiNote This field is version-dependant and may be removed in future Minecraft versions
*/
public static final TypedKey<DataComponentType> RABBIT_VARIANT = create(key("rabbit/variant"));
/**
* {@code minecraft:rarity}
*
* @apiNote This field is version-dependant and may be removed in future Minecraft versions
*/
public static final TypedKey<DataComponentType> RARITY = create(key("rarity"));
/**
* {@code minecraft:recipes}
*
* @apiNote This field is version-dependant and may be removed in future Minecraft versions
*/
public static final TypedKey<DataComponentType> RECIPES = create(key("recipes"));
/**
* {@code minecraft:repair_cost}
*
* @apiNote This field is version-dependant and may be removed in future Minecraft versions
*/
public static final TypedKey<DataComponentType> REPAIR_COST = create(key("repair_cost"));
/**
* {@code minecraft:repairable}
*
* @apiNote This field is version-dependant and may be removed in future Minecraft versions
*/
public static final TypedKey<DataComponentType> REPAIRABLE = create(key("repairable"));
/**
* {@code minecraft:salmon/size}
*
* @apiNote This field is version-dependant and may be removed in future Minecraft versions
*/
public static final TypedKey<DataComponentType> SALMON_SIZE = create(key("salmon/size"));
/**
* {@code minecraft:sheep/color}
*
* @apiNote This field is version-dependant and may be removed in future Minecraft versions
*/
public static final TypedKey<DataComponentType> SHEEP_COLOR = create(key("sheep/color"));
/**
* {@code minecraft:shulker/color}
*
* @apiNote This field is version-dependant and may be removed in future Minecraft versions
*/
public static final TypedKey<DataComponentType> SHULKER_COLOR = create(key("shulker/color"));
/**
* {@code minecraft:stored_enchantments}
*
* @apiNote This field is version-dependant and may be removed in future Minecraft versions
*/
public static final TypedKey<DataComponentType> STORED_ENCHANTMENTS = create(key("stored_enchantments"));
/**
* {@code minecraft:suspicious_stew_effects}
*
* @apiNote This field is version-dependant and may be removed in future Minecraft versions
*/
public static final TypedKey<DataComponentType> SUSPICIOUS_STEW_EFFECTS = create(key("suspicious_stew_effects"));
/**
* {@code minecraft:tool}
*
* @apiNote This field is version-dependant and may be removed in future Minecraft versions
*/
public static final TypedKey<DataComponentType> TOOL = create(key("tool"));
/**
* {@code minecraft:tooltip_display}
*
* @apiNote This field is version-dependant and may be removed in future Minecraft versions
*/
public static final TypedKey<DataComponentType> TOOLTIP_DISPLAY = create(key("tooltip_display"));
/**
* {@code minecraft:tooltip_style}
*
* @apiNote This field is version-dependant and may be removed in future Minecraft versions
*/
public static final TypedKey<DataComponentType> TOOLTIP_STYLE = create(key("tooltip_style"));
/**
* {@code minecraft:trim}
*
* @apiNote This field is version-dependant and may be removed in future Minecraft versions
*/
public static final TypedKey<DataComponentType> TRIM = create(key("trim"));
/**
* {@code minecraft:tropical_fish/base_color}
*
* @apiNote This field is version-dependant and may be removed in future Minecraft versions
*/
public static final TypedKey<DataComponentType> TROPICAL_FISH_BASE_COLOR = create(key("tropical_fish/base_color"));
/**
* {@code minecraft:tropical_fish/pattern}
*
* @apiNote This field is version-dependant and may be removed in future Minecraft versions
*/
public static final TypedKey<DataComponentType> TROPICAL_FISH_PATTERN = create(key("tropical_fish/pattern"));
/**
* {@code minecraft:tropical_fish/pattern_color}
*
* @apiNote This field is version-dependant and may be removed in future Minecraft versions
*/
public static final TypedKey<DataComponentType> TROPICAL_FISH_PATTERN_COLOR = create(key("tropical_fish/pattern_color"));
/**
* {@code minecraft:unbreakable}
*
* @apiNote This field is version-dependant and may be removed in future Minecraft versions
*/
public static final TypedKey<DataComponentType> UNBREAKABLE = create(key("unbreakable"));
/**
* {@code minecraft:use_cooldown}
*
* @apiNote This field is version-dependant and may be removed in future Minecraft versions
*/
public static final TypedKey<DataComponentType> USE_COOLDOWN = create(key("use_cooldown"));
/**
* {@code minecraft:use_remainder}
*
* @apiNote This field is version-dependant and may be removed in future Minecraft versions
*/
public static final TypedKey<DataComponentType> USE_REMAINDER = create(key("use_remainder"));
/**
* {@code minecraft:villager/variant}
*
* @apiNote This field is version-dependant and may be removed in future Minecraft versions
*/
public static final TypedKey<DataComponentType> VILLAGER_VARIANT = create(key("villager/variant"));
/**
* {@code minecraft:weapon}
*
* @apiNote This field is version-dependant and may be removed in future Minecraft versions
*/
public static final TypedKey<DataComponentType> WEAPON = create(key("weapon"));
/**
* {@code minecraft:wolf/collar}
*
* @apiNote This field is version-dependant and may be removed in future Minecraft versions
*/
public static final TypedKey<DataComponentType> WOLF_COLLAR = create(key("wolf/collar"));
/**
* {@code minecraft:wolf/sound_variant}
*
* @apiNote This field is version-dependant and may be removed in future Minecraft versions
*/
public static final TypedKey<DataComponentType> WOLF_SOUND_VARIANT = create(key("wolf/sound_variant"));
/**
* {@code minecraft:wolf/variant}
*
* @apiNote This field is version-dependant and may be removed in future Minecraft versions
*/
public static final TypedKey<DataComponentType> WOLF_VARIANT = create(key("wolf/variant"));
/**
* {@code minecraft:writable_book_content}
*
* @apiNote This field is version-dependant and may be removed in future Minecraft versions
*/
public static final TypedKey<DataComponentType> WRITABLE_BOOK_CONTENT = create(key("writable_book_content"));
/**
* {@code minecraft:written_book_content}
*
* @apiNote This field is version-dependant and may be removed in future Minecraft versions
*/
public static final TypedKey<DataComponentType> WRITTEN_BOOK_CONTENT = create(key("written_book_content"));
private DataComponentTypeKeys() {
}
private static TypedKey<DataComponentType> create(final Key key) {
return TypedKey.create(RegistryKey.DATA_COMPONENT_TYPE, key);
}
}

View File

@ -22,8 +22,8 @@ import org.jspecify.annotations.NullMarked;
"unused",
"SpellCheckingInspection"
})
@GeneratedFrom("1.21.4")
@NullMarked
@GeneratedFrom("1.21.5")
public final class EnchantmentKeys {
/**
* {@code minecraft:aqua_affinity}
@ -323,7 +323,7 @@ public final class EnchantmentKeys {
}
/**
* Creates a key for {@link Enchantment} in the registry {@code minecraft:enchantment}.
* Creates a typed key for {@link Enchantment} in the registry {@code minecraft:enchantment}.
*
* @param key the value's key in the registry
* @return a new typed key

View File

@ -22,8 +22,8 @@ import org.jspecify.annotations.NullMarked;
"unused",
"SpellCheckingInspection"
})
@GeneratedFrom("1.21.4")
@NullMarked
@GeneratedFrom("1.21.5")
public final class FluidKeys {
/**
* {@code minecraft:empty}

View File

@ -22,8 +22,8 @@ import org.jspecify.annotations.NullMarked;
"unused",
"SpellCheckingInspection"
})
@GeneratedFrom("1.21.4")
@NullMarked
@GeneratedFrom("1.21.5")
public final class FrogVariantKeys {
/**
* {@code minecraft:cold}
@ -49,7 +49,13 @@ public final class FrogVariantKeys {
private FrogVariantKeys() {
}
private static TypedKey<Frog.Variant> create(final Key key) {
/**
* Creates a typed key for {@link Frog.Variant} in the registry {@code minecraft:frog_variant}.
*
* @param key the value's key in the registry
* @return a new typed key
*/
public static TypedKey<Frog.Variant> create(final Key key) {
return TypedKey.create(RegistryKey.FROG_VARIANT, key);
}
}

View File

@ -22,8 +22,8 @@ import org.jspecify.annotations.NullMarked;
"unused",
"SpellCheckingInspection"
})
@GeneratedFrom("1.21.4")
@NullMarked
@GeneratedFrom("1.21.5")
public final class GameEventKeys {
/**
* {@code minecraft:block_activate}
@ -449,7 +449,7 @@ public final class GameEventKeys {
}
/**
* Creates a key for {@link GameEvent} in the registry {@code minecraft:game_event}.
* Creates a typed key for {@link GameEvent} in the registry {@code minecraft:game_event}.
*
* @param key the value's key in the registry
* @return a new typed key

View File

@ -22,8 +22,8 @@ import org.jspecify.annotations.NullMarked;
"unused",
"SpellCheckingInspection"
})
@GeneratedFrom("1.21.4")
@NullMarked
@GeneratedFrom("1.21.5")
public final class InstrumentKeys {
/**
* {@code minecraft:admire_goat_horn}
@ -85,7 +85,7 @@ public final class InstrumentKeys {
}
/**
* Creates a key for {@link MusicInstrument} in the registry {@code minecraft:instrument}.
* Creates a typed key for {@link MusicInstrument} in the registry {@code minecraft:instrument}.
*
* @param key the value's key in the registry
* @return a new typed key

View File

@ -22,8 +22,8 @@ import org.jspecify.annotations.NullMarked;
"unused",
"SpellCheckingInspection"
})
@GeneratedFrom("1.21.4")
@NullMarked
@GeneratedFrom("1.21.5")
public final class JukeboxSongKeys {
/**
* {@code minecraft:11}
@ -162,7 +162,7 @@ public final class JukeboxSongKeys {
}
/**
* Creates a key for {@link JukeboxSong} in the registry {@code minecraft:jukebox_song}.
* Creates a typed 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

View File

@ -22,8 +22,8 @@ import org.jspecify.annotations.NullMarked;
"unused",
"SpellCheckingInspection"
})
@GeneratedFrom("1.21.4")
@NullMarked
@GeneratedFrom("1.21.5")
public final class MapDecorationTypeKeys {
/**
* {@code minecraft:banner_black}

View File

@ -22,8 +22,8 @@ import org.jspecify.annotations.NullMarked;
"unused",
"SpellCheckingInspection"
})
@GeneratedFrom("1.21.4")
@NullMarked
@GeneratedFrom("1.21.5")
public final class MenuTypeKeys {
/**
* {@code minecraft:anvil}

View File

@ -22,8 +22,8 @@ import org.jspecify.annotations.NullMarked;
"unused",
"SpellCheckingInspection"
})
@GeneratedFrom("1.21.4")
@NullMarked
@GeneratedFrom("1.21.5")
public final class MobEffectKeys {
/**
* {@code minecraft:absorption}

View File

@ -22,8 +22,8 @@ import org.jspecify.annotations.NullMarked;
"unused",
"SpellCheckingInspection"
})
@GeneratedFrom("1.21.4")
@NullMarked
@GeneratedFrom("1.21.5")
public final class PaintingVariantKeys {
/**
* {@code minecraft:alban}
@ -379,7 +379,7 @@ public final class PaintingVariantKeys {
}
/**
* Creates a key for {@link Art} in the registry {@code minecraft:painting_variant}.
* Creates a typed key for {@link Art} in the registry {@code minecraft:painting_variant}.
*
* @param key the value's key in the registry
* @return a new typed key

View File

@ -0,0 +1,61 @@
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.Pig;
import org.jspecify.annotations.NullMarked;
/**
* Vanilla keys for {@link RegistryKey#PIG_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"
})
@NullMarked
@GeneratedFrom("1.21.5")
public final class PigVariantKeys {
/**
* {@code minecraft:cold}
*
* @apiNote This field is version-dependant and may be removed in future Minecraft versions
*/
public static final TypedKey<Pig.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<Pig.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<Pig.Variant> WARM = create(key("warm"));
private PigVariantKeys() {
}
/**
* Creates a typed key for {@link Pig.Variant} in the registry {@code minecraft:pig_variant}.
*
* @param key the value's key in the registry
* @return a new typed key
*/
public static TypedKey<Pig.Variant> create(final Key key) {
return TypedKey.create(RegistryKey.PIG_VARIANT, key);
}
}

View File

@ -22,8 +22,8 @@ import org.jspecify.annotations.NullMarked;
"unused",
"SpellCheckingInspection"
})
@GeneratedFrom("1.21.4")
@NullMarked
@GeneratedFrom("1.21.5")
public final class SoundEventKeys {
/**
* {@code minecraft:ambient.basalt_deltas.additions}
@ -879,6 +879,20 @@ public final class SoundEventKeys {
*/
public static final TypedKey<Sound> BLOCK_BUBBLE_COLUMN_WHIRLPOOL_INSIDE = create(key("block.bubble_column.whirlpool_inside"));
/**
* {@code minecraft:block.cactus_flower.break}
*
* @apiNote This field is version-dependant and may be removed in future Minecraft versions
*/
public static final TypedKey<Sound> BLOCK_CACTUS_FLOWER_BREAK = create(key("block.cactus_flower.break"));
/**
* {@code minecraft:block.cactus_flower.place}
*
* @apiNote This field is version-dependant and may be removed in future Minecraft versions
*/
public static final TypedKey<Sound> BLOCK_CACTUS_FLOWER_PLACE = create(key("block.cactus_flower.place"));
/**
* {@code minecraft:block.cake.add_candle}
*
@ -1726,6 +1740,13 @@ public final class SoundEventKeys {
*/
public static final TypedKey<Sound> BLOCK_CROP_BREAK = create(key("block.crop.break"));
/**
* {@code minecraft:block.deadbush.idle}
*
* @apiNote This field is version-dependant and may be removed in future Minecraft versions
*/
public static final TypedKey<Sound> BLOCK_DEADBUSH_IDLE = create(key("block.deadbush.idle"));
/**
* {@code minecraft:block.decorated_pot.break}
*
@ -2048,6 +2069,13 @@ public final class SoundEventKeys {
*/
public static final TypedKey<Sound> BLOCK_FIRE_EXTINGUISH = create(key("block.fire.extinguish"));
/**
* {@code minecraft:block.firefly_bush.idle}
*
* @apiNote This field is version-dependant and may be removed in future Minecraft versions
*/
public static final TypedKey<Sound> BLOCK_FIREFLY_BUSH_IDLE = create(key("block.firefly_bush.idle"));
/**
* {@code minecraft:block.flowering_azalea.break}
*
@ -2510,6 +2538,41 @@ public final class SoundEventKeys {
*/
public static final TypedKey<Sound> BLOCK_HONEY_BLOCK_STEP = create(key("block.honey_block.step"));
/**
* {@code minecraft:block.iron.break}
*
* @apiNote This field is version-dependant and may be removed in future Minecraft versions
*/
public static final TypedKey<Sound> BLOCK_IRON_BREAK = create(key("block.iron.break"));
/**
* {@code minecraft:block.iron.fall}
*
* @apiNote This field is version-dependant and may be removed in future Minecraft versions
*/
public static final TypedKey<Sound> BLOCK_IRON_FALL = create(key("block.iron.fall"));
/**
* {@code minecraft:block.iron.hit}
*
* @apiNote This field is version-dependant and may be removed in future Minecraft versions
*/
public static final TypedKey<Sound> BLOCK_IRON_HIT = create(key("block.iron.hit"));
/**
* {@code minecraft:block.iron.place}
*
* @apiNote This field is version-dependant and may be removed in future Minecraft versions
*/
public static final TypedKey<Sound> BLOCK_IRON_PLACE = create(key("block.iron.place"));
/**
* {@code minecraft:block.iron.step}
*
* @apiNote This field is version-dependant and may be removed in future Minecraft versions
*/
public static final TypedKey<Sound> BLOCK_IRON_STEP = create(key("block.iron.step"));
/**
* {@code minecraft:block.iron_door.close}
*
@ -2643,6 +2706,41 @@ public final class SoundEventKeys {
*/
public static final TypedKey<Sound> BLOCK_LAVA_POP = create(key("block.lava.pop"));
/**
* {@code minecraft:block.leaf_litter.break}
*
* @apiNote This field is version-dependant and may be removed in future Minecraft versions
*/
public static final TypedKey<Sound> BLOCK_LEAF_LITTER_BREAK = create(key("block.leaf_litter.break"));
/**
* {@code minecraft:block.leaf_litter.fall}
*
* @apiNote This field is version-dependant and may be removed in future Minecraft versions
*/
public static final TypedKey<Sound> BLOCK_LEAF_LITTER_FALL = create(key("block.leaf_litter.fall"));
/**
* {@code minecraft:block.leaf_litter.hit}
*
* @apiNote This field is version-dependant and may be removed in future Minecraft versions
*/
public static final TypedKey<Sound> BLOCK_LEAF_LITTER_HIT = create(key("block.leaf_litter.hit"));
/**
* {@code minecraft:block.leaf_litter.place}
*
* @apiNote This field is version-dependant and may be removed in future Minecraft versions
*/
public static final TypedKey<Sound> BLOCK_LEAF_LITTER_PLACE = create(key("block.leaf_litter.place"));
/**
* {@code minecraft:block.leaf_litter.step}
*
* @apiNote This field is version-dependant and may be removed in future Minecraft versions
*/
public static final TypedKey<Sound> BLOCK_LEAF_LITTER_STEP = create(key("block.leaf_litter.step"));
/**
* {@code minecraft:block.lever.click}
*
@ -3994,6 +4092,13 @@ public final class SoundEventKeys {
*/
public static final TypedKey<Sound> BLOCK_SAND_HIT = create(key("block.sand.hit"));
/**
* {@code minecraft:block.sand.idle}
*
* @apiNote This field is version-dependant and may be removed in future Minecraft versions
*/
public static final TypedKey<Sound> BLOCK_SAND_IDLE = create(key("block.sand.idle"));
/**
* {@code minecraft:block.sand.place}
*
@ -4008,6 +4113,13 @@ public final class SoundEventKeys {
*/
public static final TypedKey<Sound> BLOCK_SAND_STEP = create(key("block.sand.step"));
/**
* {@code minecraft:block.sand.wind}
*
* @apiNote This field is version-dependant and may be removed in future Minecraft versions
*/
public static final TypedKey<Sound> BLOCK_SAND_WIND = create(key("block.sand.wind"));
/**
* {@code minecraft:block.scaffolding.break}
*
@ -10217,13 +10329,6 @@ public final class SoundEventKeys {
*/
public static final TypedKey<Sound> ENTITY_WOLF_GROWL = create(key("entity.wolf.growl"));
/**
* {@code minecraft:entity.wolf.howl}
*
* @apiNote This field is version-dependant and may be removed in future Minecraft versions
*/
public static final TypedKey<Sound> ENTITY_WOLF_HOWL = create(key("entity.wolf.howl"));
/**
* {@code minecraft:entity.wolf.hurt}
*
@ -10259,6 +10364,258 @@ public final class SoundEventKeys {
*/
public static final TypedKey<Sound> ENTITY_WOLF_WHINE = create(key("entity.wolf.whine"));
/**
* {@code minecraft:entity.wolf_angry.ambient}
*
* @apiNote This field is version-dependant and may be removed in future Minecraft versions
*/
public static final TypedKey<Sound> ENTITY_WOLF_ANGRY_AMBIENT = create(key("entity.wolf_angry.ambient"));
/**
* {@code minecraft:entity.wolf_angry.death}
*
* @apiNote This field is version-dependant and may be removed in future Minecraft versions
*/
public static final TypedKey<Sound> ENTITY_WOLF_ANGRY_DEATH = create(key("entity.wolf_angry.death"));
/**
* {@code minecraft:entity.wolf_angry.growl}
*
* @apiNote This field is version-dependant and may be removed in future Minecraft versions
*/
public static final TypedKey<Sound> ENTITY_WOLF_ANGRY_GROWL = create(key("entity.wolf_angry.growl"));
/**
* {@code minecraft:entity.wolf_angry.hurt}
*
* @apiNote This field is version-dependant and may be removed in future Minecraft versions
*/
public static final TypedKey<Sound> ENTITY_WOLF_ANGRY_HURT = create(key("entity.wolf_angry.hurt"));
/**
* {@code minecraft:entity.wolf_angry.pant}
*
* @apiNote This field is version-dependant and may be removed in future Minecraft versions
*/
public static final TypedKey<Sound> ENTITY_WOLF_ANGRY_PANT = create(key("entity.wolf_angry.pant"));
/**
* {@code minecraft:entity.wolf_angry.whine}
*
* @apiNote This field is version-dependant and may be removed in future Minecraft versions
*/
public static final TypedKey<Sound> ENTITY_WOLF_ANGRY_WHINE = create(key("entity.wolf_angry.whine"));
/**
* {@code minecraft:entity.wolf_big.ambient}
*
* @apiNote This field is version-dependant and may be removed in future Minecraft versions
*/
public static final TypedKey<Sound> ENTITY_WOLF_BIG_AMBIENT = create(key("entity.wolf_big.ambient"));
/**
* {@code minecraft:entity.wolf_big.death}
*
* @apiNote This field is version-dependant and may be removed in future Minecraft versions
*/
public static final TypedKey<Sound> ENTITY_WOLF_BIG_DEATH = create(key("entity.wolf_big.death"));
/**
* {@code minecraft:entity.wolf_big.growl}
*
* @apiNote This field is version-dependant and may be removed in future Minecraft versions
*/
public static final TypedKey<Sound> ENTITY_WOLF_BIG_GROWL = create(key("entity.wolf_big.growl"));
/**
* {@code minecraft:entity.wolf_big.hurt}
*
* @apiNote This field is version-dependant and may be removed in future Minecraft versions
*/
public static final TypedKey<Sound> ENTITY_WOLF_BIG_HURT = create(key("entity.wolf_big.hurt"));
/**
* {@code minecraft:entity.wolf_big.pant}
*
* @apiNote This field is version-dependant and may be removed in future Minecraft versions
*/
public static final TypedKey<Sound> ENTITY_WOLF_BIG_PANT = create(key("entity.wolf_big.pant"));
/**
* {@code minecraft:entity.wolf_big.whine}
*
* @apiNote This field is version-dependant and may be removed in future Minecraft versions
*/
public static final TypedKey<Sound> ENTITY_WOLF_BIG_WHINE = create(key("entity.wolf_big.whine"));
/**
* {@code minecraft:entity.wolf_cute.ambient}
*
* @apiNote This field is version-dependant and may be removed in future Minecraft versions
*/
public static final TypedKey<Sound> ENTITY_WOLF_CUTE_AMBIENT = create(key("entity.wolf_cute.ambient"));
/**
* {@code minecraft:entity.wolf_cute.death}
*
* @apiNote This field is version-dependant and may be removed in future Minecraft versions
*/
public static final TypedKey<Sound> ENTITY_WOLF_CUTE_DEATH = create(key("entity.wolf_cute.death"));
/**
* {@code minecraft:entity.wolf_cute.growl}
*
* @apiNote This field is version-dependant and may be removed in future Minecraft versions
*/
public static final TypedKey<Sound> ENTITY_WOLF_CUTE_GROWL = create(key("entity.wolf_cute.growl"));
/**
* {@code minecraft:entity.wolf_cute.hurt}
*
* @apiNote This field is version-dependant and may be removed in future Minecraft versions
*/
public static final TypedKey<Sound> ENTITY_WOLF_CUTE_HURT = create(key("entity.wolf_cute.hurt"));
/**
* {@code minecraft:entity.wolf_cute.pant}
*
* @apiNote This field is version-dependant and may be removed in future Minecraft versions
*/
public static final TypedKey<Sound> ENTITY_WOLF_CUTE_PANT = create(key("entity.wolf_cute.pant"));
/**
* {@code minecraft:entity.wolf_cute.whine}
*
* @apiNote This field is version-dependant and may be removed in future Minecraft versions
*/
public static final TypedKey<Sound> ENTITY_WOLF_CUTE_WHINE = create(key("entity.wolf_cute.whine"));
/**
* {@code minecraft:entity.wolf_grumpy.ambient}
*
* @apiNote This field is version-dependant and may be removed in future Minecraft versions
*/
public static final TypedKey<Sound> ENTITY_WOLF_GRUMPY_AMBIENT = create(key("entity.wolf_grumpy.ambient"));
/**
* {@code minecraft:entity.wolf_grumpy.death}
*
* @apiNote This field is version-dependant and may be removed in future Minecraft versions
*/
public static final TypedKey<Sound> ENTITY_WOLF_GRUMPY_DEATH = create(key("entity.wolf_grumpy.death"));
/**
* {@code minecraft:entity.wolf_grumpy.growl}
*
* @apiNote This field is version-dependant and may be removed in future Minecraft versions
*/
public static final TypedKey<Sound> ENTITY_WOLF_GRUMPY_GROWL = create(key("entity.wolf_grumpy.growl"));
/**
* {@code minecraft:entity.wolf_grumpy.hurt}
*
* @apiNote This field is version-dependant and may be removed in future Minecraft versions
*/
public static final TypedKey<Sound> ENTITY_WOLF_GRUMPY_HURT = create(key("entity.wolf_grumpy.hurt"));
/**
* {@code minecraft:entity.wolf_grumpy.pant}
*
* @apiNote This field is version-dependant and may be removed in future Minecraft versions
*/
public static final TypedKey<Sound> ENTITY_WOLF_GRUMPY_PANT = create(key("entity.wolf_grumpy.pant"));
/**
* {@code minecraft:entity.wolf_grumpy.whine}
*
* @apiNote This field is version-dependant and may be removed in future Minecraft versions
*/
public static final TypedKey<Sound> ENTITY_WOLF_GRUMPY_WHINE = create(key("entity.wolf_grumpy.whine"));
/**
* {@code minecraft:entity.wolf_puglin.ambient}
*
* @apiNote This field is version-dependant and may be removed in future Minecraft versions
*/
public static final TypedKey<Sound> ENTITY_WOLF_PUGLIN_AMBIENT = create(key("entity.wolf_puglin.ambient"));
/**
* {@code minecraft:entity.wolf_puglin.death}
*
* @apiNote This field is version-dependant and may be removed in future Minecraft versions
*/
public static final TypedKey<Sound> ENTITY_WOLF_PUGLIN_DEATH = create(key("entity.wolf_puglin.death"));
/**
* {@code minecraft:entity.wolf_puglin.growl}
*
* @apiNote This field is version-dependant and may be removed in future Minecraft versions
*/
public static final TypedKey<Sound> ENTITY_WOLF_PUGLIN_GROWL = create(key("entity.wolf_puglin.growl"));
/**
* {@code minecraft:entity.wolf_puglin.hurt}
*
* @apiNote This field is version-dependant and may be removed in future Minecraft versions
*/
public static final TypedKey<Sound> ENTITY_WOLF_PUGLIN_HURT = create(key("entity.wolf_puglin.hurt"));
/**
* {@code minecraft:entity.wolf_puglin.pant}
*
* @apiNote This field is version-dependant and may be removed in future Minecraft versions
*/
public static final TypedKey<Sound> ENTITY_WOLF_PUGLIN_PANT = create(key("entity.wolf_puglin.pant"));
/**
* {@code minecraft:entity.wolf_puglin.whine}
*
* @apiNote This field is version-dependant and may be removed in future Minecraft versions
*/
public static final TypedKey<Sound> ENTITY_WOLF_PUGLIN_WHINE = create(key("entity.wolf_puglin.whine"));
/**
* {@code minecraft:entity.wolf_sad.ambient}
*
* @apiNote This field is version-dependant and may be removed in future Minecraft versions
*/
public static final TypedKey<Sound> ENTITY_WOLF_SAD_AMBIENT = create(key("entity.wolf_sad.ambient"));
/**
* {@code minecraft:entity.wolf_sad.death}
*
* @apiNote This field is version-dependant and may be removed in future Minecraft versions
*/
public static final TypedKey<Sound> ENTITY_WOLF_SAD_DEATH = create(key("entity.wolf_sad.death"));
/**
* {@code minecraft:entity.wolf_sad.growl}
*
* @apiNote This field is version-dependant and may be removed in future Minecraft versions
*/
public static final TypedKey<Sound> ENTITY_WOLF_SAD_GROWL = create(key("entity.wolf_sad.growl"));
/**
* {@code minecraft:entity.wolf_sad.hurt}
*
* @apiNote This field is version-dependant and may be removed in future Minecraft versions
*/
public static final TypedKey<Sound> ENTITY_WOLF_SAD_HURT = create(key("entity.wolf_sad.hurt"));
/**
* {@code minecraft:entity.wolf_sad.pant}
*
* @apiNote This field is version-dependant and may be removed in future Minecraft versions
*/
public static final TypedKey<Sound> ENTITY_WOLF_SAD_PANT = create(key("entity.wolf_sad.pant"));
/**
* {@code minecraft:entity.wolf_sad.whine}
*
* @apiNote This field is version-dependant and may be removed in future Minecraft versions
*/
public static final TypedKey<Sound> ENTITY_WOLF_SAD_WHINE = create(key("entity.wolf_sad.whine"));
/**
* {@code minecraft:entity.zoglin.ambient}
*

View File

@ -22,8 +22,8 @@ import org.jspecify.annotations.NullMarked;
"unused",
"SpellCheckingInspection"
})
@GeneratedFrom("1.21.4")
@NullMarked
@GeneratedFrom("1.21.5")
public final class StructureKeys {
/**
* {@code minecraft:ancient_city}
@ -267,7 +267,7 @@ public final class StructureKeys {
}
/**
* Creates a key for {@link Structure} in the registry {@code minecraft:worldgen/structure}.
* Creates a typed key for {@link Structure} in the registry {@code minecraft:worldgen/structure}.
*
* @param key the value's key in the registry
* @return a new typed key

View File

@ -22,8 +22,8 @@ import org.jspecify.annotations.NullMarked;
"unused",
"SpellCheckingInspection"
})
@GeneratedFrom("1.21.4")
@NullMarked
@GeneratedFrom("1.21.5")
public final class StructureTypeKeys {
/**
* {@code minecraft:buried_treasure}

View File

@ -22,8 +22,8 @@ import org.jspecify.annotations.NullMarked;
"unused",
"SpellCheckingInspection"
})
@GeneratedFrom("1.21.4")
@NullMarked
@GeneratedFrom("1.21.5")
public final class TrimMaterialKeys {
/**
* {@code minecraft:amethyst}
@ -106,7 +106,7 @@ public final class TrimMaterialKeys {
}
/**
* Creates a key for {@link TrimMaterial} in the registry {@code minecraft:trim_material}.
* Creates a typed key for {@link TrimMaterial} in the registry {@code minecraft:trim_material}.
*
* @param key the value's key in the registry
* @return a new typed key

View File

@ -22,8 +22,8 @@ import org.jspecify.annotations.NullMarked;
"unused",
"SpellCheckingInspection"
})
@GeneratedFrom("1.21.4")
@NullMarked
@GeneratedFrom("1.21.5")
public final class TrimPatternKeys {
/**
* {@code minecraft:bolt}
@ -155,7 +155,7 @@ public final class TrimPatternKeys {
}
/**
* Creates a key for {@link TrimPattern} in the registry {@code minecraft:trim_pattern}.
* Creates a typed key for {@link TrimPattern} in the registry {@code minecraft:trim_pattern}.
*
* @param key the value's key in the registry
* @return a new typed key

View File

@ -22,8 +22,8 @@ import org.jspecify.annotations.NullMarked;
"unused",
"SpellCheckingInspection"
})
@GeneratedFrom("1.21.4")
@NullMarked
@GeneratedFrom("1.21.5")
public final class VillagerProfessionKeys {
/**
* {@code minecraft:armorer}

View File

@ -22,8 +22,8 @@ import org.jspecify.annotations.NullMarked;
"unused",
"SpellCheckingInspection"
})
@GeneratedFrom("1.21.4")
@NullMarked
@GeneratedFrom("1.21.5")
public final class VillagerTypeKeys {
/**
* {@code minecraft:desert}

View File

@ -0,0 +1,89 @@
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.Wolf;
import org.jspecify.annotations.NullMarked;
/**
* Vanilla keys for {@link RegistryKey#WOLF_SOUND_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"
})
@NullMarked
@GeneratedFrom("1.21.5")
public final class WolfSoundVariantKeys {
/**
* {@code minecraft:angry}
*
* @apiNote This field is version-dependant and may be removed in future Minecraft versions
*/
public static final TypedKey<Wolf.SoundVariant> ANGRY = create(key("angry"));
/**
* {@code minecraft:big}
*
* @apiNote This field is version-dependant and may be removed in future Minecraft versions
*/
public static final TypedKey<Wolf.SoundVariant> BIG = create(key("big"));
/**
* {@code minecraft:classic}
*
* @apiNote This field is version-dependant and may be removed in future Minecraft versions
*/
public static final TypedKey<Wolf.SoundVariant> CLASSIC = create(key("classic"));
/**
* {@code minecraft:cute}
*
* @apiNote This field is version-dependant and may be removed in future Minecraft versions
*/
public static final TypedKey<Wolf.SoundVariant> CUTE = create(key("cute"));
/**
* {@code minecraft:grumpy}
*
* @apiNote This field is version-dependant and may be removed in future Minecraft versions
*/
public static final TypedKey<Wolf.SoundVariant> GRUMPY = create(key("grumpy"));
/**
* {@code minecraft:puglin}
*
* @apiNote This field is version-dependant and may be removed in future Minecraft versions
*/
public static final TypedKey<Wolf.SoundVariant> PUGLIN = create(key("puglin"));
/**
* {@code minecraft:sad}
*
* @apiNote This field is version-dependant and may be removed in future Minecraft versions
*/
public static final TypedKey<Wolf.SoundVariant> SAD = create(key("sad"));
private WolfSoundVariantKeys() {
}
/**
* Creates a typed key for {@link Wolf.SoundVariant} in the registry {@code minecraft:wolf_sound_variant}.
*
* @param key the value's key in the registry
* @return a new typed key
*/
public static TypedKey<Wolf.SoundVariant> create(final Key key) {
return TypedKey.create(RegistryKey.WOLF_SOUND_VARIANT, key);
}
}

View File

@ -22,8 +22,8 @@ import org.jspecify.annotations.NullMarked;
"unused",
"SpellCheckingInspection"
})
@GeneratedFrom("1.21.4")
@NullMarked
@GeneratedFrom("1.21.5")
public final class WolfVariantKeys {
/**
* {@code minecraft:ashen}
@ -92,7 +92,7 @@ public final class WolfVariantKeys {
}
/**
* Creates a key for {@link Wolf.Variant} in the registry {@code minecraft:wolf_variant}.
* Creates a typed key for {@link Wolf.Variant} in the registry {@code minecraft:wolf_variant}.
*
* @param key the value's key in the registry
* @return a new typed key

View File

@ -11,7 +11,7 @@ import org.jetbrains.annotations.ApiStatus;
import org.jspecify.annotations.NullMarked;
/**
* Vanilla keys for {@link RegistryKey#BANNER_PATTERN}.
* Vanilla tag 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
@ -23,8 +23,8 @@ import org.jspecify.annotations.NullMarked;
"unused",
"SpellCheckingInspection"
})
@GeneratedFrom("1.21.4")
@NullMarked
@GeneratedFrom("1.21.5")
@ApiStatus.Experimental
public final class BannerPatternTagKeys {
/**

View File

@ -11,7 +11,7 @@ import org.jetbrains.annotations.ApiStatus;
import org.jspecify.annotations.NullMarked;
/**
* Vanilla keys for {@link RegistryKey#BIOME}.
* Vanilla tag keys for {@link RegistryKey#BIOME}.
*
* @apiNote The fields provided here are a direct representation of
* what is available from the vanilla game source. They may be
@ -23,8 +23,8 @@ import org.jspecify.annotations.NullMarked;
"unused",
"SpellCheckingInspection"
})
@GeneratedFrom("1.21.4")
@NullMarked
@GeneratedFrom("1.21.5")
@ApiStatus.Experimental
public final class BiomeTagKeys {
/**
@ -447,6 +447,13 @@ public final class BiomeTagKeys {
*/
public static final TagKey<Biome> SNOW_GOLEM_MELTS = create(key("snow_golem_melts"));
/**
* {@code #minecraft:spawns_cold_variant_farm_animals}
*
* @apiNote This field is version-dependant and may be removed in future Minecraft versions
*/
public static final TagKey<Biome> SPAWNS_COLD_VARIANT_FARM_ANIMALS = create(key("spawns_cold_variant_farm_animals"));
/**
* {@code #minecraft:spawns_cold_variant_frogs}
*
@ -468,6 +475,13 @@ public final class BiomeTagKeys {
*/
public static final TagKey<Biome> SPAWNS_SNOW_FOXES = create(key("spawns_snow_foxes"));
/**
* {@code #minecraft:spawns_warm_variant_farm_animals}
*
* @apiNote This field is version-dependant and may be removed in future Minecraft versions
*/
public static final TagKey<Biome> SPAWNS_WARM_VARIANT_FARM_ANIMALS = create(key("spawns_warm_variant_farm_animals"));
/**
* {@code #minecraft:spawns_warm_variant_frogs}
*

View File

@ -11,7 +11,7 @@ import org.jetbrains.annotations.ApiStatus;
import org.jspecify.annotations.NullMarked;
/**
* Vanilla keys for {@link RegistryKey#BLOCK}.
* Vanilla tag keys for {@link RegistryKey#BLOCK}.
*
* @apiNote The fields provided here are a direct representation of
* what is available from the vanilla game source. They may be
@ -23,8 +23,8 @@ import org.jspecify.annotations.NullMarked;
"unused",
"SpellCheckingInspection"
})
@GeneratedFrom("1.21.4")
@NullMarked
@GeneratedFrom("1.21.5")
@ApiStatus.Experimental
public final class BlockTypeTagKeys {
/**
@ -223,6 +223,13 @@ public final class BlockTypeTagKeys {
*/
public static final TagKey<BlockType> CAMEL_SAND_STEP_SOUND_BLOCKS = create(key("camel_sand_step_sound_blocks"));
/**
* {@code #minecraft:camels_spawnable_on}
*
* @apiNote This field is version-dependant and may be removed in future Minecraft versions
*/
public static final TagKey<BlockType> CAMELS_SPAWNABLE_ON = create(key("camels_spawnable_on"));
/**
* {@code #minecraft:campfires}
*
@ -377,13 +384,6 @@ public final class BlockTypeTagKeys {
*/
public static final TagKey<BlockType> DARK_OAK_LOGS = create(key("dark_oak_logs"));
/**
* {@code #minecraft:dead_bush_may_place_on}
*
* @apiNote This field is version-dependant and may be removed in future Minecraft versions
*/
public static final TagKey<BlockType> DEAD_BUSH_MAY_PLACE_ON = create(key("dead_bush_may_place_on"));
/**
* {@code #minecraft:deepslate_ore_replaceables}
*
@ -440,6 +440,20 @@ public final class BlockTypeTagKeys {
*/
public static final TagKey<BlockType> DRIPSTONE_REPLACEABLE_BLOCKS = create(key("dripstone_replaceable_blocks"));
/**
* {@code #minecraft:dry_vegetation_may_place_on}
*
* @apiNote This field is version-dependant and may be removed in future Minecraft versions
*/
public static final TagKey<BlockType> DRY_VEGETATION_MAY_PLACE_ON = create(key("dry_vegetation_may_place_on"));
/**
* {@code #minecraft:edible_for_sheep}
*
* @apiNote This field is version-dependant and may be removed in future Minecraft versions
*/
public static final TagKey<BlockType> EDIBLE_FOR_SHEEP = create(key("edible_for_sheep"));
/**
* {@code #minecraft:emerald_ores}
*
@ -895,6 +909,13 @@ public final class BlockTypeTagKeys {
*/
public static final TagKey<BlockType> PLANKS = create(key("planks"));
/**
* {@code #minecraft:plays_ambient_desert_block_sounds}
*
* @apiNote This field is version-dependant and may be removed in future Minecraft versions
*/
public static final TagKey<BlockType> PLAYS_AMBIENT_DESERT_BLOCK_SOUNDS = create(key("plays_ambient_desert_block_sounds"));
/**
* {@code #minecraft:polar_bears_spawnable_on_alternate}
*
@ -951,6 +972,13 @@ public final class BlockTypeTagKeys {
*/
public static final TagKey<BlockType> REPLACEABLE = create(key("replaceable"));
/**
* {@code #minecraft:replaceable_by_mushrooms}
*
* @apiNote This field is version-dependant and may be removed in future Minecraft versions
*/
public static final TagKey<BlockType> REPLACEABLE_BY_MUSHROOMS = create(key("replaceable_by_mushrooms"));
/**
* {@code #minecraft:replaceable_by_trees}
*
@ -1147,6 +1175,13 @@ public final class BlockTypeTagKeys {
*/
public static final TagKey<BlockType> SWORD_EFFICIENT = create(key("sword_efficient"));
/**
* {@code #minecraft:sword_instantly_mines}
*
* @apiNote This field is version-dependant and may be removed in future Minecraft versions
*/
public static final TagKey<BlockType> SWORD_INSTANTLY_MINES = create(key("sword_instantly_mines"));
/**
* {@code #minecraft:terracotta}
*

View File

@ -1,57 +0,0 @@
package io.papermc.paper.registry.keys.tags;
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.tag.TagKey;
import net.kyori.adventure.key.Key;
import org.bukkit.entity.Cat;
import org.jetbrains.annotations.ApiStatus;
import org.jspecify.annotations.NullMarked;
/**
* 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.4")
@NullMarked
@ApiStatus.Experimental
public final class CatVariantTagKeys {
/**
* {@code #minecraft:default_spawns}
*
* @apiNote This field is version-dependant and may be removed in future Minecraft versions
*/
public static final TagKey<Cat.Type> DEFAULT_SPAWNS = create(key("default_spawns"));
/**
* {@code #minecraft:full_moon_spawns}
*
* @apiNote This field is version-dependant and may be removed in future Minecraft versions
*/
public static final TagKey<Cat.Type> FULL_MOON_SPAWNS = create(key("full_moon_spawns"));
private CatVariantTagKeys() {
}
/**
* Creates a tag key for {@link Cat.Type} in the registry {@code minecraft:cat_variant}.
*
* @param key the tag key's key
* @return a new tag key
*/
@ApiStatus.Experimental
public static TagKey<Cat.Type> create(final Key key) {
return TagKey.create(RegistryKey.CAT_VARIANT, key);
}
}

View File

@ -11,7 +11,7 @@ import org.jetbrains.annotations.ApiStatus;
import org.jspecify.annotations.NullMarked;
/**
* Vanilla keys for {@link RegistryKey#DAMAGE_TYPE}.
* Vanilla tag keys for {@link RegistryKey#DAMAGE_TYPE}.
*
* @apiNote The fields provided here are a direct representation of
* what is available from the vanilla game source. They may be
@ -23,8 +23,8 @@ import org.jspecify.annotations.NullMarked;
"unused",
"SpellCheckingInspection"
})
@GeneratedFrom("1.21.4")
@NullMarked
@GeneratedFrom("1.21.5")
@ApiStatus.Experimental
public final class DamageTypeTagKeys {
/**

View File

@ -12,7 +12,7 @@ import org.jetbrains.annotations.ApiStatus;
import org.jspecify.annotations.NullMarked;
/**
* Vanilla keys for {@link RegistryKey#ENCHANTMENT}.
* Vanilla tag keys for {@link RegistryKey#ENCHANTMENT}.
*
* @apiNote The fields provided here are a direct representation of
* what is available from the vanilla game source. They may be
@ -24,8 +24,8 @@ import org.jspecify.annotations.NullMarked;
"unused",
"SpellCheckingInspection"
})
@GeneratedFrom("1.21.4")
@NullMarked
@GeneratedFrom("1.21.5")
@ApiStatus.Experimental
public final class EnchantmentTagKeys {
/**

View File

@ -11,7 +11,7 @@ import org.jetbrains.annotations.ApiStatus;
import org.jspecify.annotations.NullMarked;
/**
* Vanilla keys for {@link RegistryKey#ENTITY_TYPE}.
* Vanilla tag keys for {@link RegistryKey#ENTITY_TYPE}.
*
* @apiNote The fields provided here are a direct representation of
* what is available from the vanilla game source. They may be
@ -23,8 +23,8 @@ import org.jspecify.annotations.NullMarked;
"unused",
"SpellCheckingInspection"
})
@GeneratedFrom("1.21.4")
@NullMarked
@GeneratedFrom("1.21.5")
@ApiStatus.Experimental
public final class EntityTypeTagKeys {
/**
@ -83,6 +83,13 @@ public final class EntityTypeTagKeys {
*/
public static final TagKey<EntityType> CAN_BREATHE_UNDER_WATER = create(key("can_breathe_under_water"));
/**
* {@code #minecraft:can_equip_saddle}
*
* @apiNote This field is version-dependant and may be removed in future Minecraft versions
*/
public static final TagKey<EntityType> CAN_EQUIP_SADDLE = create(key("can_equip_saddle"));
/**
* {@code #minecraft:can_turn_in_boats}
*
@ -90,6 +97,13 @@ public final class EntityTypeTagKeys {
*/
public static final TagKey<EntityType> CAN_TURN_IN_BOATS = create(key("can_turn_in_boats"));
/**
* {@code #minecraft:can_wear_horse_armor}
*
* @apiNote This field is version-dependant and may be removed in future Minecraft versions
*/
public static final TagKey<EntityType> CAN_WEAR_HORSE_ARMOR = create(key("can_wear_horse_armor"));
/**
* {@code #minecraft:deflects_projectiles}
*

View File

@ -11,7 +11,7 @@ import org.jetbrains.annotations.ApiStatus;
import org.jspecify.annotations.NullMarked;
/**
* Vanilla keys for {@link RegistryKey#FLUID}.
* Vanilla tag keys for {@link RegistryKey#FLUID}.
*
* @apiNote The fields provided here are a direct representation of
* what is available from the vanilla game source. They may be
@ -23,8 +23,8 @@ import org.jspecify.annotations.NullMarked;
"unused",
"SpellCheckingInspection"
})
@GeneratedFrom("1.21.4")
@NullMarked
@GeneratedFrom("1.21.5")
@ApiStatus.Experimental
public final class FluidTagKeys {
/**

View File

@ -11,7 +11,7 @@ import org.jetbrains.annotations.ApiStatus;
import org.jspecify.annotations.NullMarked;
/**
* Vanilla keys for {@link RegistryKey#GAME_EVENT}.
* Vanilla tag keys for {@link RegistryKey#GAME_EVENT}.
*
* @apiNote The fields provided here are a direct representation of
* what is available from the vanilla game source. They may be
@ -23,8 +23,8 @@ import org.jspecify.annotations.NullMarked;
"unused",
"SpellCheckingInspection"
})
@GeneratedFrom("1.21.4")
@NullMarked
@GeneratedFrom("1.21.5")
@ApiStatus.Experimental
public final class GameEventTagKeys {
/**

View File

@ -11,7 +11,7 @@ import org.jetbrains.annotations.ApiStatus;
import org.jspecify.annotations.NullMarked;
/**
* Vanilla keys for {@link RegistryKey#INSTRUMENT}.
* Vanilla tag keys for {@link RegistryKey#INSTRUMENT}.
*
* @apiNote The fields provided here are a direct representation of
* what is available from the vanilla game source. They may be
@ -23,8 +23,8 @@ import org.jspecify.annotations.NullMarked;
"unused",
"SpellCheckingInspection"
})
@GeneratedFrom("1.21.4")
@NullMarked
@GeneratedFrom("1.21.5")
@ApiStatus.Experimental
public final class InstrumentTagKeys {
/**

View File

@ -11,7 +11,7 @@ import org.jetbrains.annotations.ApiStatus;
import org.jspecify.annotations.NullMarked;
/**
* Vanilla keys for {@link RegistryKey#ITEM}.
* Vanilla tag keys for {@link RegistryKey#ITEM}.
*
* @apiNote The fields provided here are a direct representation of
* what is available from the vanilla game source. They may be
@ -23,8 +23,8 @@ import org.jspecify.annotations.NullMarked;
"unused",
"SpellCheckingInspection"
})
@GeneratedFrom("1.21.4")
@NullMarked
@GeneratedFrom("1.21.5")
@ApiStatus.Experimental
public final class ItemTypeTagKeys {
/**
@ -118,6 +118,13 @@ public final class ItemTypeTagKeys {
*/
public static final TagKey<ItemType> BOATS = create(key("boats"));
/**
* {@code #minecraft:book_cloning_target}
*
* @apiNote This field is version-dependant and may be removed in future Minecraft versions
*/
public static final TagKey<ItemType> BOOK_CLONING_TARGET = create(key("book_cloning_target"));
/**
* {@code #minecraft:bookshelf_books}
*
@ -349,6 +356,13 @@ public final class ItemTypeTagKeys {
*/
public static final TagKey<ItemType> DYEABLE = create(key("dyeable"));
/**
* {@code #minecraft:eggs}
*
* @apiNote This field is version-dependant and may be removed in future Minecraft versions
*/
public static final TagKey<ItemType> EGGS = create(key("eggs"));
/**
* {@code #minecraft:emerald_ores}
*
@ -510,6 +524,13 @@ public final class ItemTypeTagKeys {
*/
public static final TagKey<ItemType> FISHES = create(key("fishes"));
/**
* {@code #minecraft:flowers}
*
* @apiNote This field is version-dependant and may be removed in future Minecraft versions
*/
public static final TagKey<ItemType> FLOWERS = create(key("flowers"));
/**
* {@code #minecraft:foot_armor}
*

View File

@ -11,7 +11,7 @@ import org.jetbrains.annotations.ApiStatus;
import org.jspecify.annotations.NullMarked;
/**
* Vanilla keys for {@link RegistryKey#PAINTING_VARIANT}.
* Vanilla tag keys for {@link RegistryKey#PAINTING_VARIANT}.
*
* @apiNote The fields provided here are a direct representation of
* what is available from the vanilla game source. They may be
@ -23,8 +23,8 @@ import org.jspecify.annotations.NullMarked;
"unused",
"SpellCheckingInspection"
})
@GeneratedFrom("1.21.4")
@NullMarked
@GeneratedFrom("1.21.5")
@ApiStatus.Experimental
public final class PaintingVariantTagKeys {
/**

View File

@ -6,13 +6,12 @@ import io.papermc.paper.generated.GeneratedFrom;
import io.papermc.paper.registry.RegistryKey;
import io.papermc.paper.registry.tag.TagKey;
import net.kyori.adventure.key.Key;
import org.bukkit.MinecraftExperimental;
import org.bukkit.generator.structure.Structure;
import org.jetbrains.annotations.ApiStatus;
import org.jspecify.annotations.NullMarked;
/**
* Vanilla keys for {@link RegistryKey#STRUCTURE}.
* Vanilla tag keys for {@link RegistryKey#STRUCTURE}.
*
* @apiNote The fields provided here are a direct representation of
* what is available from the vanilla game source. They may be
@ -24,8 +23,8 @@ import org.jspecify.annotations.NullMarked;
"unused",
"SpellCheckingInspection"
})
@GeneratedFrom("1.21.4")
@NullMarked
@GeneratedFrom("1.21.5")
@ApiStatus.Experimental
public final class StructureTagKeys {
/**
@ -75,8 +74,6 @@ public final class StructureTagKeys {
*
* @apiNote This field is version-dependant and may be removed in future Minecraft versions
*/
@ApiStatus.Experimental
@MinecraftExperimental(MinecraftExperimental.Requires.TRADE_REBALANCE)
public static final TagKey<Structure> ON_DESERT_VILLAGE_MAPS = create(key("on_desert_village_maps"));
/**
@ -84,8 +81,6 @@ public final class StructureTagKeys {
*
* @apiNote This field is version-dependant and may be removed in future Minecraft versions
*/
@ApiStatus.Experimental
@MinecraftExperimental(MinecraftExperimental.Requires.TRADE_REBALANCE)
public static final TagKey<Structure> ON_JUNGLE_EXPLORER_MAPS = create(key("on_jungle_explorer_maps"));
/**
@ -100,8 +95,6 @@ public final class StructureTagKeys {
*
* @apiNote This field is version-dependant and may be removed in future Minecraft versions
*/
@ApiStatus.Experimental
@MinecraftExperimental(MinecraftExperimental.Requires.TRADE_REBALANCE)
public static final TagKey<Structure> ON_PLAINS_VILLAGE_MAPS = create(key("on_plains_village_maps"));
/**
@ -109,8 +102,6 @@ public final class StructureTagKeys {
*
* @apiNote This field is version-dependant and may be removed in future Minecraft versions
*/
@ApiStatus.Experimental
@MinecraftExperimental(MinecraftExperimental.Requires.TRADE_REBALANCE)
public static final TagKey<Structure> ON_SAVANNA_VILLAGE_MAPS = create(key("on_savanna_village_maps"));
/**
@ -118,8 +109,6 @@ public final class StructureTagKeys {
*
* @apiNote This field is version-dependant and may be removed in future Minecraft versions
*/
@ApiStatus.Experimental
@MinecraftExperimental(MinecraftExperimental.Requires.TRADE_REBALANCE)
public static final TagKey<Structure> ON_SNOWY_VILLAGE_MAPS = create(key("on_snowy_village_maps"));
/**
@ -127,8 +116,6 @@ public final class StructureTagKeys {
*
* @apiNote This field is version-dependant and may be removed in future Minecraft versions
*/
@ApiStatus.Experimental
@MinecraftExperimental(MinecraftExperimental.Requires.TRADE_REBALANCE)
public static final TagKey<Structure> ON_SWAMP_EXPLORER_MAPS = create(key("on_swamp_explorer_maps"));
/**
@ -136,8 +123,6 @@ public final class StructureTagKeys {
*
* @apiNote This field is version-dependant and may be removed in future Minecraft versions
*/
@ApiStatus.Experimental
@MinecraftExperimental(MinecraftExperimental.Requires.TRADE_REBALANCE)
public static final TagKey<Structure> ON_TAIGA_VILLAGE_MAPS = create(key("on_taiga_village_maps"));
/**

View File

@ -289,7 +289,7 @@ public class TimingHistory {
final TicksRecord ticksRecord = new TicksRecord();
final PingRecord pingRecord = new PingRecord();
final TimingData fst = TimingsManager.FULL_SERVER_TICK.minuteData.clone();
final double tps = 1E9 / ( System.nanoTime() - lastMinuteTime ) * ticksRecord.timed;
final double tps = 1E9 / (System.nanoTime() - lastMinuteTime) * ticksRecord.timed;
final double usedMemory = TimingsManager.FULL_SERVER_TICK.avgUsedMemory;
final double freeMemory = TimingsManager.FULL_SERVER_TICK.avgFreeMemory;
final double loadAvg = ManagementFactory.getOperatingSystemMXBean().getSystemLoadAverage();

View File

@ -153,9 +153,9 @@ public final class TimingsManager {
public static Timing getCommandTiming(@Nullable String pluginName, @NotNull Command command) {
Plugin plugin = null;
final Server server = Bukkit.getServer();
if (!( server == null || pluginName == null ||
"minecraft".equals(pluginName) || "bukkit".equals(pluginName) ||
"spigot".equalsIgnoreCase(pluginName) || "paper".equals(pluginName)
if (!(server == null || pluginName == null ||
"minecraft".equals(pluginName) || "bukkit".equals(pluginName) ||
"spigot".equalsIgnoreCase(pluginName) || "paper".equals(pluginName)
)) {
plugin = server.getPluginManager().getPlugin(pluginName);
}

View File

@ -32,10 +32,10 @@ public final class NamespacedTag implements com.destroystokyo.paper.Namespaced {
* compatibility measures.
*/
public static final String BUKKIT = "bukkit";
//
private static final Pattern VALID_NAMESPACE = Pattern.compile("[a-z0-9._-]+");
private static final Pattern VALID_KEY = Pattern.compile("[a-z0-9/._-]+");
//
private final String namespace;
private final String key;

View File

@ -1,6 +1,6 @@
package com.destroystokyo.paper.entity.ai;
import com.google.common.base.Objects;
import java.util.Objects;
import java.util.StringJoiner;
import org.bukkit.NamespacedKey;
import org.bukkit.entity.Mob;
@ -36,13 +36,13 @@ public final class GoalKey<T extends Mob> {
if (this == o) return true;
if (o == null || this.getClass() != o.getClass()) return false;
GoalKey<?> goalKey = (GoalKey<?>) o;
return Objects.equal(this.entityClass, goalKey.entityClass) &&
Objects.equal(this.namespacedKey, goalKey.namespacedKey);
return Objects.equals(this.entityClass, goalKey.entityClass) &&
Objects.equals(this.namespacedKey, goalKey.namespacedKey);
}
@Override
public int hashCode() {
return Objects.hashCode(this.entityClass, this.namespacedKey);
return Objects.hash(this.entityClass, this.namespacedKey);
}
@Override

View File

@ -24,8 +24,8 @@ public class BeaconEffectEvent extends BlockEvent implements Cancellable {
private boolean cancelled;
@ApiStatus.Internal
public BeaconEffectEvent(final Block block, final PotionEffect effect, final Player player, final boolean primary) {
super(block);
public BeaconEffectEvent(final Block beacon, final PotionEffect effect, final Player player, final boolean primary) {
super(beacon);
this.effect = effect;
this.player = player;
this.primary = primary;

View File

@ -11,7 +11,7 @@ import org.jspecify.annotations.NullMarked;
/**
* Fired anytime the server intends to 'destroy' a block through some triggering reason.
* This does not fire anytime a block is set to air, but only with more direct triggers such
* as physics updates, pistons, Entities changing blocks, commands set to "Destroy".
* as physics updates, pistons, entities changing blocks, commands set to "Destroy".
* <p>
* This event is associated with the game playing a sound effect at the block in question, when
* something can be described as "intend to destroy what is there",
@ -39,7 +39,7 @@ public class BlockDestroyEvent extends BlockExpEvent implements Cancellable {
}
/**
* Get the effect that will be played when the block is broken.
* Gets the effect that will be played when the block is broken.
*
* @return block break effect
*/

View File

@ -33,8 +33,8 @@ public class TNTPrimeEvent extends BlockEvent implements Cancellable {
private boolean cancelled;
@ApiStatus.Internal
public TNTPrimeEvent(@NotNull Block theBlock, @NotNull PrimeReason reason, @Nullable Entity primerEntity) {
super(theBlock);
public TNTPrimeEvent(@NotNull Block block, @NotNull PrimeReason reason, @Nullable Entity primerEntity) {
super(block);
this.reason = reason;
this.primerEntity = primerEntity;
}

View File

@ -50,32 +50,6 @@ public class PlayerHandshakeEvent extends Event implements Cancellable {
this.cancelled = cancelled;
}
/**
* Determines if this event is cancelled.
* <p>
* When this event is cancelled, custom handshake logic will not
* be processed.
*
* @return {@code true} if this event is cancelled, {@code false} otherwise
*/
@Override
public boolean isCancelled() {
return this.cancelled;
}
/**
* Sets if this event is cancelled.
* <p>
* When this event is cancelled, custom handshake logic will not
* be processed.
*
* @param cancel {@code true} if this event is cancelled, {@code false} otherwise
*/
@Override
public void setCancelled(final boolean cancel) {
this.cancelled = cancel;
}
/**
* Gets the original handshake string.
*
@ -246,6 +220,32 @@ public class PlayerHandshakeEvent extends Event implements Cancellable {
this.failMessage(LegacyComponentSerializer.legacySection().deserialize(failMessage));
}
/**
* Determines if this event is cancelled.
* <p>
* When this event is cancelled, custom handshake logic will not
* be processed.
*
* @return {@code true} if this event is cancelled, {@code false} otherwise
*/
@Override
public boolean isCancelled() {
return this.cancelled;
}
/**
* Sets if this event is cancelled.
* <p>
* When this event is cancelled, custom handshake logic will not
* be processed.
*
* @param cancel {@code true} if this event is cancelled, {@code false} otherwise
*/
@Override
public void setCancelled(final boolean cancel) {
this.cancelled = cancel;
}
@Override
public HandlerList getHandlers() {
return HANDLER_LIST;

View File

@ -37,7 +37,7 @@ public class PlayerJumpEvent extends PlayerEvent implements Cancellable {
/**
* {@inheritDoc}
* <p>
* If a jump event is cancelled, the player will be moved or
* If this event is cancelled, the player will be moved or
* teleported back to the Location as defined by {@link #getFrom()}. This will not
* fire an event
*
@ -51,7 +51,7 @@ public class PlayerJumpEvent extends PlayerEvent implements Cancellable {
/**
* {@inheritDoc}
* <p>
* If a jump event is cancelled, the player will be moved or
* If this event is cancelled, the player will be moved or
* teleported back to the Location as defined by {@link #getFrom()}. This will not
* fire an event
*

View File

@ -109,7 +109,7 @@ public class PlayerSetSpawnEvent extends PlayerEvent implements Cancellable {
/**
* Gets the notification message that will be sent to the player
* if {@link #willNotifyPlayer()} returns true.
* if {@link #willNotifyPlayer()} returns {@code true}.
*
* @return {@code null} if no notification
*/

View File

@ -21,7 +21,7 @@ public interface NetworkClient {
* Returns the protocol version of the client.
*
* @return The client's protocol version, or {@code -1} if unknown
* @see <a href="http://wiki.vg/Protocol_version_numbers">List of protocol
* @see <a href="https://minecraft.wiki/w/Minecraft_Wiki:Projects/wiki.vg_merge/Protocol_version_numbers">List of protocol
* version numbers</a>
*/
int getProtocolVersion();

View File

@ -1,6 +1,7 @@
package io.papermc.paper;
import net.kyori.adventure.util.Services;
import org.bukkit.block.Biome;
import org.bukkit.damage.DamageEffect;
import org.jetbrains.annotations.ApiStatus;
import org.jspecify.annotations.NullMarked;
@ -35,5 +36,14 @@ public interface InternalAPIBridge {
* @return the damage effect.
*/
DamageEffect getDamageEffect(String key);
/**
* Constructs the legacy custom biome instance for the biome enum.
*
* @return the created biome.
*/
@Deprecated(forRemoval = true, since = "1.21.5")
@ApiStatus.ScheduledForRemoval(inVersion = "1.22")
Biome constructLegacyCustomBiome();
}

View File

@ -5,7 +5,7 @@ import org.bukkit.block.Lockable;
import org.bukkit.block.TileState;
/**
* Interface for tile entities that are lockable.
* Interface for block entities that are lockable.
*/
public interface LockableTileState extends TileState, Lockable, Nameable {
}

View File

@ -9,6 +9,7 @@ import org.checkerframework.checker.nullness.qual.NonNull;
/**
* Helper methods to bridge the gaps between Brigadier and Paper-MojangAPI.
*
* @deprecated for removal. See {@link MessageComponentSerializer} for a direct replacement of functionality found in
* this class.
* As a general entrypoint to brigadier on paper, see {@link io.papermc.paper.command.brigadier.Commands}.

View File

@ -0,0 +1,48 @@
package io.papermc.paper.datacomponent;
import org.bukkit.Utility;
import org.bukkit.persistence.PersistentDataContainer;
import org.jetbrains.annotations.ApiStatus;
import org.jetbrains.annotations.NotNull;
import org.jspecify.annotations.NullMarked;
/**
* This represents an object capable of holding and mutating data components.
*
* @see PersistentDataContainer
*/
@NullMarked
@ApiStatus.NonExtendable
public interface DataComponentHolder extends DataComponentView {
/**
* Sets the value of the data component type for this holder.
*
* @param type the data component type
* @param valueBuilder value builder
* @param <T> value type
*/
@Utility
@org.jetbrains.annotations.ApiStatus.Experimental
public <T> void setData(final io.papermc.paper.datacomponent.DataComponentType.@NotNull Valued<T> type, final @NotNull io.papermc.paper.datacomponent.DataComponentBuilder<T> valueBuilder);
/**
* Sets the value of the data component type for this holder.
*
* @param type the data component type
* @param value value to set
* @param <T> value type
*/
@org.jetbrains.annotations.ApiStatus.Experimental
public <T> void setData(final io.papermc.paper.datacomponent.DataComponentType.@NotNull Valued<T> type, final @NotNull T value);
/**
* Marks this non-valued data component type as present in this itemstack.
*
* @param type the data component type
*/
@org.jetbrains.annotations.ApiStatus.Experimental
public void setData(final io.papermc.paper.datacomponent.DataComponentType.@NotNull NonValued type);
// TODO: Do we even want to have the concept of overriding here? Not sure what is going on with entity components
}

View File

@ -2,6 +2,7 @@ package io.papermc.paper.datacomponent;
import io.papermc.paper.datacomponent.item.BannerPatternLayers;
import io.papermc.paper.datacomponent.item.BlockItemDataProperties;
import io.papermc.paper.datacomponent.item.BlocksAttacks;
import io.papermc.paper.datacomponent.item.BundleContents;
import io.papermc.paper.datacomponent.item.ChargedProjectiles;
import io.papermc.paper.datacomponent.item.Consumable;
@ -32,21 +33,42 @@ import io.papermc.paper.datacomponent.item.ResolvableProfile;
import io.papermc.paper.datacomponent.item.SeededContainerLoot;
import io.papermc.paper.datacomponent.item.SuspiciousStewEffects;
import io.papermc.paper.datacomponent.item.Tool;
import io.papermc.paper.datacomponent.item.Unbreakable;
import io.papermc.paper.datacomponent.item.TooltipDisplay;
import io.papermc.paper.datacomponent.item.UseCooldown;
import io.papermc.paper.datacomponent.item.UseRemainder;
import io.papermc.paper.datacomponent.item.Weapon;
import io.papermc.paper.datacomponent.item.WritableBookContent;
import io.papermc.paper.datacomponent.item.WrittenBookContent;
import io.papermc.paper.item.MapPostProcessing;
import java.util.List;
import io.papermc.paper.registry.tag.TagKey;
import net.kyori.adventure.key.Key;
import net.kyori.adventure.text.Component;
import org.bukkit.Art;
import org.bukkit.DyeColor;
import org.bukkit.FireworkEffect;
import org.bukkit.MusicInstrument;
import org.bukkit.NamespacedKey;
import org.bukkit.Registry;
import org.bukkit.block.banner.PatternType;
import org.bukkit.entity.Axolotl;
import org.bukkit.entity.Cat;
import org.bukkit.entity.Chicken;
import org.bukkit.entity.Cow;
import org.bukkit.entity.Fox;
import org.bukkit.entity.Frog;
import org.bukkit.entity.Horse;
import org.bukkit.entity.Llama;
import org.bukkit.entity.MushroomCow;
import org.bukkit.entity.Parrot;
import org.bukkit.entity.Pig;
import org.bukkit.entity.Rabbit;
import org.bukkit.entity.Salmon;
import org.bukkit.entity.TropicalFish;
import org.bukkit.entity.Villager;
import org.bukkit.entity.Wolf;
import org.bukkit.inventory.ItemRarity;
import org.bukkit.inventory.meta.trim.TrimMaterial;
import org.checkerframework.checker.index.qual.NonNegative;
import org.checkerframework.checker.index.qual.Positive;
import org.checkerframework.common.value.qual.IntRange;
@ -88,7 +110,7 @@ public final class DataComponentTypes {
/**
* If set, the item will not lose any durability when used.
*/
public static final DataComponentType.Valued<Unbreakable> UNBREAKABLE = valued("unbreakable");
public static final DataComponentType.NonValued UNBREAKABLE = unvalued("unbreakable");
/**
* Custom name override for an item (as set by renaming with an Anvil).
*
@ -144,15 +166,7 @@ public final class DataComponentTypes {
* Controls the minecraft:custom_model_data property in the item model.
*/
public static final DataComponentType.Valued<CustomModelData> CUSTOM_MODEL_DATA = valued("custom_model_data");
/**
* If set, disables 'additional' tooltip part which comes from the item type
* (e.g. content of a shulker).
*/
public static final DataComponentType.NonValued HIDE_ADDITIONAL_TOOLTIP = unvalued("hide_additional_tooltip");
/**
* If set, it will completely hide whole item tooltip (that includes item name).
*/
public static final DataComponentType.NonValued HIDE_TOOLTIP = unvalued("hide_tooltip");
public static final DataComponentType.Valued<TooltipDisplay> TOOLTIP_DISPLAY = valued("tooltip_display");
/**
* The additional experience cost required to modify an item in an Anvil.
* If not present, has an implicit default value of: {@code 0}.
@ -188,12 +202,14 @@ public final class DataComponentTypes {
* Controls the behavior of the item as a tool.
*/
public static final DataComponentType.Valued<Tool> TOOL = valued("tool");
public static final DataComponentType.Valued<Weapon> WEAPON = valued("weapon");
public static final DataComponentType.Valued<Enchantable> ENCHANTABLE = valued("enchantable");
public static final DataComponentType.Valued<Equippable> EQUIPPABLE = valued("equippable");
public static final DataComponentType.Valued<Repairable> REPAIRABLE = valued("repairable");
public static final DataComponentType.NonValued GLIDER = unvalued("glider");
public static final DataComponentType.Valued<Key> TOOLTIP_STYLE = valued("tooltip_style");
public static final DataComponentType.Valued<DeathProtection> DEATH_PROTECTION = valued("death_protection");
public static final DataComponentType.Valued<BlocksAttacks> BLOCKS_ATTACKS = valued("blocks_attacks");
/**
* Stores list of enchantments and their levels for an Enchanted Book.
* Unlike {@link #ENCHANTMENTS}, the effects provided by enchantments
@ -243,6 +259,7 @@ public final class DataComponentTypes {
* or potion applied to a Tipped Arrow.
*/
public static final DataComponentType.Valued<PotionContents> POTION_CONTENTS = valued("potion_contents");
public static final DataComponentType.Valued<Float> POTION_DURATION_SCALE = valued("potion_duration_scale");
/**
* Holds the effects that will be applied when consuming Suspicious Stew.
*/
@ -267,11 +284,14 @@ public final class DataComponentTypes {
* Holds the instrument type used by a Goat Horn.
*/
public static final DataComponentType.Valued<MusicInstrument> INSTRUMENT = valued("instrument");
// this is a either holder, but due to legacy item loading
public static final DataComponentType.Valued<TrimMaterial> PROVIDES_TRIM_MATERIAL = valued("provides_trim_material");
/**
* Controls the amplifier amount for an Ominous Bottle's Bad Omen effect.
*/
public static final DataComponentType.Valued<OminousBottleAmplifier> OMINOUS_BOTTLE_AMPLIFIER = valued("ominous_bottle_amplifier");
public static final DataComponentType.Valued<JukeboxPlayable> JUKEBOX_PLAYABLE = valued("jukebox_playable");
public static final DataComponentType.Valued<TagKey<PatternType>> PROVIDES_BANNER_PATTERNS = valued("provides_banner_patterns");
/**
* List of recipes that should be unlocked when using the Knowledge Book item.
*/
@ -329,14 +349,50 @@ public final class DataComponentTypes {
* Holds the unresolved loot table and seed of a container-like block.
*/
public static final DataComponentType.Valued<SeededContainerLoot> CONTAINER_LOOT = valued("container_loot");
public static final DataComponentType.Valued<Key> BREAK_SOUND = valued("break_sound");
public static final DataComponentType.Valued<Villager.Type> VILLAGER_VARIANT = valued("villager/variant");
public static final DataComponentType.Valued<Wolf.Variant> WOLF_VARIANT = valued("wolf/variant");
public static final DataComponentType.Valued<Wolf.SoundVariant> WOLF_SOUND_VARIANT = valued("wolf/sound_variant");
public static final DataComponentType.Valued<DyeColor> WOLF_COLLAR = valued("wolf/collar");
public static final DataComponentType.Valued<Fox.Type> FOX_VARIANT = valued("fox/variant");
public static final DataComponentType.Valued<Salmon.Variant> SALMON_SIZE = valued("salmon/size");
public static final DataComponentType.Valued<Parrot.Variant> PARROT_VARIANT = valued("parrot/variant");
public static final DataComponentType.Valued<TropicalFish.Pattern> TROPICAL_FISH_PATTERN = valued("tropical_fish/pattern");
public static final DataComponentType.Valued<DyeColor> TROPICAL_FISH_BASE_COLOR = valued("tropical_fish/base_color");
public static final DataComponentType.Valued<DyeColor> TROPICAL_FISH_PATTERN_COLOR = valued("tropical_fish/pattern_color");
public static final DataComponentType.Valued<MushroomCow.Variant> MOOSHROOM_VARIANT = valued("mooshroom/variant");
public static final DataComponentType.Valued<Rabbit.Type> RABBIT_VARIANT = valued("rabbit/variant");
public static final DataComponentType.Valued<Pig.Variant> PIG_VARIANT = valued("pig/variant");
public static final DataComponentType.Valued<Cow.Variant> COW_VARIANT = valued("cow/variant");
// TODO: This is a eitherholder? Why specifically the chicken?? Oh wait this is prolly for chicken egg cause legacy item loading
public static final DataComponentType.Valued<Chicken.Variant> CHICKEN_VARIANT = valued("chicken/variant");
public static final DataComponentType.Valued<Frog.Variant> FROG_VARIANT = valued("frog/variant");
public static final DataComponentType.Valued<Horse.Style> HORSE_VARIANT = valued("horse/variant");
public static final DataComponentType.Valued<Art> PAINTING_VARIANT = valued("painting/variant");
public static final DataComponentType.Valued<Llama.Color> LLAMA_VARIANT = valued("llama/variant");
public static final DataComponentType.Valued<Axolotl.Variant> AXOLOTL_VARIANT = valued("axolotl/variant");
public static final DataComponentType.Valued<Cat.Type> CAT_VARIANT = valued("cat/variant");
public static final DataComponentType.Valued<DyeColor> CAT_COLLAR = valued("cat/collar");
public static final DataComponentType.Valued<DyeColor> SHEEP_COLOR = valued("sheep/color");
public static final DataComponentType.Valued<DyeColor> SHULKER_COLOR = valued("shulker/color");
private static DataComponentType.NonValued unvalued(final String name) {
return (DataComponentType.NonValued) requireNonNull(Registry.DATA_COMPONENT_TYPE.get(NamespacedKey.minecraft(name)), name + " unvalued data component type couldn't be found, this is a bug.");
final DataComponentType dataComponentType = requireNonNull(Registry.DATA_COMPONENT_TYPE.get(NamespacedKey.minecraft(name)), name + " unvalued data component type couldn't be found, this is a bug.");
if (dataComponentType instanceof DataComponentType.NonValued) {
return (DataComponentType.NonValued) dataComponentType;
}
throw new IllegalStateException(name + " is not a valid unvalued type, it is a " + dataComponentType.getClass().getTypeName());
}
@SuppressWarnings("unchecked")
private static <T> DataComponentType.Valued<T> valued(final String name) {
return (DataComponentType.Valued<T>) requireNonNull(Registry.DATA_COMPONENT_TYPE.get(NamespacedKey.minecraft(name)), name + " valued data component type couldn't be found, this is a bug.");
DataComponentType dataComponentType = requireNonNull(Registry.DATA_COMPONENT_TYPE.get(NamespacedKey.minecraft(name)), name + " valued data component type couldn't be found, this is a bug.");
if (dataComponentType instanceof DataComponentType.Valued) {
return (DataComponentType.Valued<T>) dataComponentType;
}
throw new IllegalStateException(name + " is not a valid valued type, it is a " + dataComponentType.getClass().getTypeName());
}
private DataComponentTypes() {

View File

@ -0,0 +1,65 @@
package io.papermc.paper.datacomponent;
import org.bukkit.Utility;
import org.jetbrains.annotations.ApiStatus;
import org.jetbrains.annotations.Contract;
import org.jetbrains.annotations.NotNull;
import org.jetbrains.annotations.Nullable;
import org.jspecify.annotations.NullMarked;
/**
* This represents a view of a data component holder. No
* methods on this interface mutate the holder.
*
* @see DataComponentHolder
*/
@NullMarked
@ApiStatus.NonExtendable
public interface DataComponentView {
// Paper start - data component API
/**
* Gets the value for the data component type on this stack.
*
* @param type the data component type
* @param <T> the value type
* @return the value for the data component type, or {@code null} if not set or marked as removed
* @see #hasData(io.papermc.paper.datacomponent.DataComponentType) for DataComponentType.NonValued
*/
@Contract(pure = true)
@ApiStatus.Experimental
public <T> @Nullable T getData(final DataComponentType.@NotNull Valued<T> type);
/**
* Gets the value for the data component type on this holder with
* a fallback value.
*
* @param type the data component type
* @param fallback the fallback value if the value isn't present
* @param <T> the value type
* @return the value for the data component type or the fallback value
*/
@Utility
@Contract(value = "_, !null -> !null", pure = true)
@ApiStatus.Experimental
public <T> @Nullable T getDataOrDefault(final DataComponentType.@NotNull Valued<? extends T> type, final @Nullable T fallback);
/**
* Checks if the data component type is set on this holder.
*
* @param type the data component type
* @return {@code true} if set, {@code false} otherwise
*/
@Contract(pure = true)
@ApiStatus.Experimental
boolean hasData(final io.papermc.paper.datacomponent.@NotNull DataComponentType type);
// Not applicable to entities
// /**
// * Gets all the data component types set on this holder.
// *
// * @return an immutable set of data component types
// */
// @Contract("-> new")
// @ApiStatus.Experimental
// java.util.@Unmodifiable Set<io.papermc.paper.datacomponent.@NotNull DataComponentType> getDataTypes();
}

View File

@ -0,0 +1,68 @@
package io.papermc.paper.datacomponent.item;
import io.papermc.paper.datacomponent.DataComponentBuilder;
import io.papermc.paper.registry.tag.TagKey;
import net.kyori.adventure.key.Key;
import org.bukkit.damage.DamageType;
import org.jetbrains.annotations.ApiStatus;
import org.jetbrains.annotations.Contract;
import org.jspecify.annotations.NullMarked;
import org.jspecify.annotations.Nullable;
// TODO
@NullMarked
@ApiStatus.Experimental
@ApiStatus.NonExtendable
public interface BlocksAttacks {
@Contract(value = "-> new", pure = true)
static Builder blocksAttacks() {
return ItemComponentTypesBridge.bridge().blocksAttacks();
}
float blockDelaySeconds();
float disableCooldownScale();
//List<DamageReduction> damageReductions();
//ItemDamageFunction itemDamage();
@Nullable TagKey<DamageType> bypassedBy();
@Nullable Key blockSound();
@Nullable Key disableSound();
/**
* Builder for {@link BlocksAttacks}.
*/
@ApiStatus.Experimental
@ApiStatus.NonExtendable
interface Builder extends DataComponentBuilder<BlocksAttacks> {
@Contract(value = "_ -> this", mutates = "this")
Builder blockDelaySeconds(float delay);
@Contract(value = "_ -> this", mutates = "this")
Builder disableCooldownScale(float scale);
//@Contract(value = "_ -> this", mutates = "this")
//Builder addDamageReduction(DamageReduction reduction);
//@Contract(value = "_ -> this", mutates = "this")
//Builder damageReductions(List<DamageReduction> reductions);
//@Contract(value = "_ -> this", mutates = "this")
//Builder itemDamage(ItemDamageFunction function);
@Contract(value = "_ -> this", mutates = "this")
Builder bypassedBy(@Nullable TagKey<DamageType> bypassedBy);
@Contract(value = "_ -> this", mutates = "this")
Builder blockSound(@Nullable Key sound);
@Contract(value = "_ -> this", mutates = "this")
Builder disableSound(@Nullable Key sound);
}
}

View File

@ -13,11 +13,11 @@ import org.jspecify.annotations.NullMarked;
@NullMarked
@ApiStatus.Experimental
@ApiStatus.NonExtendable
public interface DyedItemColor extends ShownInTooltip<DyedItemColor> {
public interface DyedItemColor {
@Contract(value = "_, _ -> new", pure = true)
static DyedItemColor dyedItemColor(final Color color, final boolean showInTooltip) {
return dyedItemColor().color(color).showInTooltip(showInTooltip).build();
static DyedItemColor dyedItemColor(final Color color) {
return dyedItemColor().color(color).build();
}
@Contract(value = "-> new", pure = true)
@ -38,7 +38,7 @@ public interface DyedItemColor extends ShownInTooltip<DyedItemColor> {
*/
@ApiStatus.Experimental
@ApiStatus.NonExtendable
interface Builder extends ShownInTooltip.Builder<Builder>, DataComponentBuilder<DyedItemColor> {
interface Builder extends DataComponentBuilder<DyedItemColor> {
/**
* Sets the color of this builder.

View File

@ -96,6 +96,14 @@ public interface Equippable extends BuildableDataComponent<Equippable, Equippabl
@Contract(pure = true)
boolean damageOnHurt();
/**
* Checks if the item should be equipped when interacting with an entity.
*
* @return true if it equips on interact, false otherwise
*/
@Contract(pure = true)
boolean equipOnInteract();
/**
* Builder for {@link Equippable}.
*/
@ -165,5 +173,14 @@ public interface Equippable extends BuildableDataComponent<Equippable, Equippabl
*/
@Contract(value = "_ -> this", mutates = "this")
Builder damageOnHurt(boolean damageOnHurt);
/**
* Sets whether the item should be equipped when interacting with an entity.
*
* @param equipOnInteract true if it equips on interact
* @return the builder for chaining
*/
@Contract(value = "_ -> this", mutates = "this")
Builder equipOnInteract(boolean equipOnInteract);
}
}

View File

@ -1,6 +1,7 @@
package io.papermc.paper.datacomponent.item;
import io.papermc.paper.block.BlockPredicate;
import io.papermc.paper.datacomponent.BuildableDataComponent;
import io.papermc.paper.datacomponent.DataComponentBuilder;
import java.util.List;
import org.jetbrains.annotations.ApiStatus;
@ -16,7 +17,7 @@ import org.jspecify.annotations.NullMarked;
@NullMarked
@ApiStatus.Experimental
@ApiStatus.NonExtendable
public interface ItemAdventurePredicate extends ShownInTooltip<ItemAdventurePredicate> {
public interface ItemAdventurePredicate {
@Contract(value = "_ -> new", pure = true)
static ItemAdventurePredicate itemAdventurePredicate(final List<BlockPredicate> predicates) {
@ -41,7 +42,7 @@ public interface ItemAdventurePredicate extends ShownInTooltip<ItemAdventurePred
*/
@ApiStatus.Experimental
@ApiStatus.NonExtendable
interface Builder extends ShownInTooltip.Builder<Builder>, DataComponentBuilder<ItemAdventurePredicate> {
interface Builder extends DataComponentBuilder<ItemAdventurePredicate> {
/**
* Adds a block predicate to this builder.
*

View File

@ -13,12 +13,7 @@ import org.jspecify.annotations.NullMarked;
@NullMarked
@ApiStatus.Experimental
@ApiStatus.NonExtendable
public interface ItemArmorTrim extends ShownInTooltip<ItemArmorTrim> {
@Contract(value = "_, _ -> new", pure = true)
static ItemArmorTrim itemArmorTrim(final ArmorTrim armorTrim, final boolean showInTooltip) {
return itemArmorTrim(armorTrim).showInTooltip(showInTooltip).build();
}
public interface ItemArmorTrim {
@Contract(value = "_ -> new", pure = true)
static ItemArmorTrim.Builder itemArmorTrim(final ArmorTrim armorTrim) {
@ -38,7 +33,7 @@ public interface ItemArmorTrim extends ShownInTooltip<ItemArmorTrim> {
*/
@ApiStatus.Experimental
@ApiStatus.NonExtendable
interface Builder extends ShownInTooltip.Builder<Builder>, DataComponentBuilder<ItemArmorTrim> {
interface Builder extends DataComponentBuilder<ItemArmorTrim> {
/**
* Sets the armor trim for this builder.

View File

@ -17,7 +17,7 @@ import org.jspecify.annotations.NullMarked;
@NullMarked
@ApiStatus.Experimental
@ApiStatus.NonExtendable
public interface ItemAttributeModifiers extends ShownInTooltip<ItemAttributeModifiers> {
public interface ItemAttributeModifiers {
@Contract(value = "-> new", pure = true)
static ItemAttributeModifiers.Builder itemAttributes() {
@ -69,7 +69,7 @@ public interface ItemAttributeModifiers extends ShownInTooltip<ItemAttributeModi
*/
@ApiStatus.Experimental
@ApiStatus.NonExtendable
interface Builder extends ShownInTooltip.Builder<Builder>, DataComponentBuilder<ItemAttributeModifiers> {
interface Builder extends DataComponentBuilder<ItemAttributeModifiers> {
/**
* Adds a modifier to this builder.

View File

@ -34,8 +34,6 @@ interface ItemComponentTypesBridge {
PotDecorations.Builder potDecorations();
Unbreakable.Builder unbreakable();
ItemLore.Builder lore();
ItemEnchantments.Builder enchantments();
@ -109,4 +107,10 @@ interface ItemComponentTypesBridge {
DeathProtection.Builder deathProtection();
OminousBottleAmplifier ominousBottleAmplifier(int amplifier);
BlocksAttacks.Builder blocksAttacks();
TooltipDisplay.Builder tooltipDisplay();
Weapon.Builder weapon();
}

View File

@ -17,11 +17,11 @@ import org.jspecify.annotations.NullMarked;
@NullMarked
@ApiStatus.Experimental
@ApiStatus.NonExtendable
public interface ItemEnchantments extends ShownInTooltip<ItemEnchantments> {
public interface ItemEnchantments {
@Contract(value = "_, _ -> new", pure = true)
static ItemEnchantments itemEnchantments(final Map<Enchantment, @IntRange(from = 1, to = 255) Integer> enchantments, final boolean showInTooltip) {
return itemEnchantments().addAll(enchantments).showInTooltip(showInTooltip).build();
static ItemEnchantments itemEnchantments(final Map<Enchantment, @IntRange(from = 1, to = 255) Integer> enchantments) {
return itemEnchantments().addAll(enchantments).build();
}
@Contract(value = "-> new", pure = true)
@ -42,7 +42,7 @@ public interface ItemEnchantments extends ShownInTooltip<ItemEnchantments> {
*/
@ApiStatus.Experimental
@ApiStatus.NonExtendable
interface Builder extends ShownInTooltip.Builder<Builder>, DataComponentBuilder<ItemEnchantments> {
interface Builder extends DataComponentBuilder<ItemEnchantments> {
/**
* Adds an enchantment with the given level to this component.

View File

@ -13,7 +13,7 @@ import org.jspecify.annotations.NullMarked;
@NullMarked
@ApiStatus.Experimental
@ApiStatus.NonExtendable
public interface JukeboxPlayable extends ShownInTooltip<JukeboxPlayable> {
public interface JukeboxPlayable {
@Contract(value = "_ -> new", pure = true)
static JukeboxPlayable.Builder jukeboxPlayable(final JukeboxSong song) {
@ -28,7 +28,7 @@ public interface JukeboxPlayable extends ShownInTooltip<JukeboxPlayable> {
*/
@ApiStatus.Experimental
@ApiStatus.NonExtendable
interface Builder extends ShownInTooltip.Builder<JukeboxPlayable.Builder>, DataComponentBuilder<JukeboxPlayable> {
interface Builder extends DataComponentBuilder<JukeboxPlayable> {
/**
* Sets the jukebox song.

View File

@ -1,55 +0,0 @@
package io.papermc.paper.datacomponent.item;
import org.jetbrains.annotations.ApiStatus;
import org.jetbrains.annotations.Contract;
import org.jspecify.annotations.NullMarked;
/**
* Holds the state of whether a data component should be shown
* in an item's tooltip.
*
* @param <T> the data component type
*/
@NullMarked
@ApiStatus.Experimental
@ApiStatus.NonExtendable
public interface ShownInTooltip<T> {
/**
* Gets if the data component should be shown in the item's tooltip.
*
* @return {@code true} to show in the tooltip
*/
@Contract(pure = true)
boolean showInTooltip();
/**
* Returns a copy of this data component with the specified
* show-in-tooltip state.
*
* @param showInTooltip {@code true} to show in the tooltip
* @return the new data component
*/
@Contract(value = "_ -> new", pure = true)
T showInTooltip(boolean showInTooltip);
/**
* A builder for creating a {@link ShownInTooltip} data component.
*
* @param <B> builder type
*/
@ApiStatus.Experimental
@ApiStatus.NonExtendable
interface Builder<B> {
/**
* Sets if the data component should be shown in the item's tooltip.
*
* @param showInTooltip {@code true} to show in the tooltip
* @return the builder for chaining
* @see #showInTooltip()
*/
@Contract(value = "_ -> this", mutates = "this")
B showInTooltip(boolean showInTooltip);
}
}

View File

@ -71,6 +71,14 @@ public interface Tool {
@Contract(pure = true)
@Unmodifiable List<Tool.Rule> rules();
/**
* Whether this tool can destroy blocks in creative mode.
*
* @return whether this tool can destroy blocks in creative mode
*/
@Contract(pure = true)
boolean canDestroyBlocksInCreative();
@ApiStatus.Experimental
@ApiStatus.NonExtendable
interface Rule {
@ -136,6 +144,16 @@ public interface Tool {
@Contract(value = "_ -> this", mutates = "this")
Builder addRule(Rule rule);
/**
* Controls whether this tool can destroy blocks in creative mode.
*
* @param canDestroyBlocksInCreative whether this tool can destroy blocks in creative mode
* @return the builder for chaining
* @see #canDestroyBlocksInCreative()
*/
@Contract(value = "_ -> this", mutates = "this")
Builder canDestroyBlocksInCreative(boolean canDestroyBlocksInCreative);
/**
* Adds rules to the tool that control the breaking speed / damage per block if matched.
*

View File

@ -0,0 +1,46 @@
package io.papermc.paper.datacomponent.item;
import io.papermc.paper.datacomponent.DataComponentBuilder;
import io.papermc.paper.datacomponent.DataComponentType;
import org.jetbrains.annotations.ApiStatus;
import org.jetbrains.annotations.Contract;
import org.jspecify.annotations.NullMarked;
import java.util.Set;
@NullMarked
@ApiStatus.Experimental
@ApiStatus.NonExtendable
public interface TooltipDisplay {
/**
* Returns a new builder for creating a TooltipDisplay.
*
* @return a builder
*/
@Contract(value = "-> new", pure = true)
static Builder tooltipDisplay() {
return ItemComponentTypesBridge.bridge().tooltipDisplay();
}
boolean hideTooltip();
Set<DataComponentType> hiddenComponents();
/**
* Builder for {@link TooltipDisplay}.
*/
@ApiStatus.Experimental
@ApiStatus.NonExtendable
interface Builder extends DataComponentBuilder<TooltipDisplay> {
@Contract(value = "_ -> this", mutates = "this")
Builder hideTooltip(boolean hide);
@Contract(value = "_ -> this", mutates = "this")
Builder addHiddenComponents(DataComponentType... components);
@Contract(value = "_ -> this", mutates = "this")
Builder hiddenComponents(Set<DataComponentType> components);
}
}

View File

@ -1,34 +0,0 @@
package io.papermc.paper.datacomponent.item;
import io.papermc.paper.datacomponent.DataComponentBuilder;
import org.jetbrains.annotations.ApiStatus;
import org.jetbrains.annotations.Contract;
import org.jspecify.annotations.NullMarked;
/**
* If set, the item will not lose any durability when used.
* @see io.papermc.paper.datacomponent.DataComponentTypes#UNBREAKABLE
*/
@NullMarked
@ApiStatus.Experimental
@ApiStatus.NonExtendable
public interface Unbreakable extends ShownInTooltip<Unbreakable> {
@Contract(value = "_ -> new", pure = true)
static Unbreakable unbreakable(final boolean showInTooltip) {
return unbreakable().showInTooltip(showInTooltip).build();
}
@Contract(value = "-> new", pure = true)
static Unbreakable.Builder unbreakable() {
return ItemComponentTypesBridge.bridge().unbreakable();
}
/**
* Builder for {@link Unbreakable}.
*/
@ApiStatus.Experimental
@ApiStatus.NonExtendable
interface Builder extends ShownInTooltip.Builder<Builder>, DataComponentBuilder<Unbreakable> {
}
}

View File

@ -0,0 +1,54 @@
package io.papermc.paper.datacomponent.item;
import io.papermc.paper.datacomponent.DataComponentBuilder;
import org.jetbrains.annotations.ApiStatus;
import org.jspecify.annotations.NullMarked;
@NullMarked
@ApiStatus.Experimental
@ApiStatus.NonExtendable
public interface Weapon {
/**
* Returns a new builder for creating a Weapon.
*
* @return a builder instance.
*/
static Builder weapon() {
return ItemComponentTypesBridge.bridge().weapon();
}
/**
* The damage that the weapon deals per attack.
*/
int itemDamagePerAttack();
/**
* The number of seconds that blocking is disabled.
*/
float disableBlockingForSeconds();
/**
* Builder for {@link Weapon}.
*/
@ApiStatus.Experimental
@ApiStatus.NonExtendable
interface Builder extends DataComponentBuilder<Weapon> {
/**
* Sets the damage per attack.
*
* @param damage the damage value.
* @return the builder for chaining.
*/
Builder itemDamagePerAttack(int damage);
/**
* Sets the disable blocking duration (in seconds).
*
* @param seconds the duration in seconds.
* @return the builder for chaining.
*/
Builder disableBlockingForSeconds(float seconds);
}
}

View File

@ -4,6 +4,8 @@ package io.papermc.paper.datacomponent.item.consumable;
* Represents the hand animation that is used when a player is consuming this item.
*/
public enum ItemUseAnimation {
// Start generate - ItemUseAnimation
// @GeneratedFrom 1.21.5
NONE,
EAT,
DRINK,
@ -14,5 +16,6 @@ public enum ItemUseAnimation {
SPYGLASS,
TOOT_HORN,
BRUSH,
BUNDLE
BUNDLE;
// End generate - ItemUseAnimation
}

View File

@ -17,8 +17,8 @@ public class BeaconActivatedEvent extends BlockEvent {
private static final HandlerList HANDLER_LIST = new HandlerList();
@ApiStatus.Internal
public BeaconActivatedEvent(final Block block) {
super(block);
public BeaconActivatedEvent(final Block beacon) {
super(beacon);
}
/**

View File

@ -18,8 +18,8 @@ public class BeaconDeactivatedEvent extends BlockEvent {
private static final HandlerList HANDLER_LIST = new HandlerList();
@ApiStatus.Internal
public BeaconDeactivatedEvent(final Block block) {
super(block);
public BeaconDeactivatedEvent(final Block beacon) {
super(beacon);
}
/**

View File

@ -22,8 +22,8 @@ public class BellRevealRaiderEvent extends BlockEvent implements Cancellable {
private boolean cancelled;
@ApiStatus.Internal
public BellRevealRaiderEvent(@NotNull Block theBlock, @NotNull Raider raider) {
super(theBlock);
public BellRevealRaiderEvent(@NotNull Block bell, @NotNull Raider raider) {
super(bell);
this.raider = raider;
}

View File

@ -17,8 +17,8 @@ public class BlockFailedDispenseEvent extends BlockEvent {
private boolean shouldPlayEffect = true;
@ApiStatus.Internal
public BlockFailedDispenseEvent(final Block theBlock) {
super(theBlock);
public BlockFailedDispenseEvent(final Block block) {
super(block);
}
/**

View File

@ -31,7 +31,6 @@ public class EntityFertilizeEggEvent extends EntityEvent implements Cancellable
private static final HandlerList HANDLER_LIST = new HandlerList();
private final LivingEntity mother;
private final LivingEntity father;
private final @Nullable Player breeder;
private final @Nullable ItemStack bredWith;
@ -42,7 +41,6 @@ public class EntityFertilizeEggEvent extends EntityEvent implements Cancellable
@ApiStatus.Internal
public EntityFertilizeEggEvent(final LivingEntity mother, final LivingEntity father, final @Nullable Player breeder, final @Nullable ItemStack bredWith, final int experience) {
super(mother);
this.mother = mother;
this.father = father;
this.breeder = breeder;
this.bredWith = bredWith;
@ -61,7 +59,7 @@ public class EntityFertilizeEggEvent extends EntityEvent implements Cancellable
* @return The "mother" entity.
*/
public LivingEntity getMother() {
return this.mother;
return this.getEntity();
}
/**

View File

@ -39,9 +39,9 @@ public abstract class AbstractChatEvent extends PlayerEvent implements Cancellab
/**
* Gets a set of {@link Audience audiences} that this chat message will be displayed to.
*
* <p>The set returned may auto-populate on access. Any listener accessing the returned set should be aware that
* it may reduce performance for a lazy set implementation.</p>
* <p>
* The set returned may auto-populate on access. Any listener accessing the returned set should be aware that
* it may reduce performance for a lazy set implementation.
*
* @return a mutable set of {@link Audience audiences} who will receive the chat message
*/

View File

@ -42,7 +42,7 @@ public class AsyncChatDecorateEvent extends ServerEvent implements Cancellable {
* Gets the player (if available) associated with this event.
* <p>
* Certain commands request decorations without a player context
* which is why this is possibly null.
* which is why this is possibly {@code null}.
*
* @return the player or {@code null}
*/

View File

@ -20,8 +20,8 @@ public class PlayerClientLoadedWorldEvent extends PlayerEvent {
private final boolean timeout;
@ApiStatus.Internal
public PlayerClientLoadedWorldEvent(final Player who, final boolean timeout) {
super(who);
public PlayerClientLoadedWorldEvent(final Player player, final boolean timeout) {
super(player);
this.timeout = timeout;
}

View File

@ -19,8 +19,11 @@ import org.bukkit.block.banner.PatternType;
import org.bukkit.damage.DamageType;
import org.bukkit.enchantments.Enchantment;
import org.bukkit.entity.Cat;
import org.bukkit.entity.Chicken;
import org.bukkit.entity.Cow;
import org.bukkit.entity.EntityType;
import org.bukkit.entity.Frog;
import org.bukkit.entity.Pig;
import org.bukkit.entity.Villager;
import org.bukkit.entity.Wolf;
import org.bukkit.entity.memory.MemoryKey;
@ -79,20 +82,11 @@ public sealed interface RegistryKey<T> extends Keyed permits RegistryKeyImpl {
RegistryKey<BlockType> BLOCK = create("block");
/**
* @apiNote use preferably only in the context of registry entries.
* @see io.papermc.paper.registry.data
* @see io.papermc.paper.registry.keys.ItemTypeKeys
*/
@ApiStatus.Experimental // Paper - already required for registry builders
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
@ -130,7 +124,7 @@ public sealed interface RegistryKey<T> extends Keyed permits RegistryKeyImpl {
RegistryKey<Sound> SOUND_EVENT = create("sound_event");
/**
* Built-in registry for data component types.
* <!-- @see io.papermc.paper.registry.keys.DataComponentTypeKeys -->
* @see io.papermc.paper.registry.keys.DataComponentTypeKeys
*/
RegistryKey<DataComponentType> DATA_COMPONENT_TYPE = create("data_component_type");
@ -169,6 +163,11 @@ public sealed interface RegistryKey<T> extends Keyed permits RegistryKeyImpl {
* @see io.papermc.paper.registry.keys.WolfVariantKeys
*/
RegistryKey<Wolf.Variant> WOLF_VARIANT = create("wolf_variant");
/**
* Data-driven registry for wolf sound variants.
* @see io.papermc.paper.registry.keys.WolfSoundVariantKeys
*/
RegistryKey<Wolf.SoundVariant> WOLF_SOUND_VARIANT = create("wolf_sound_variant");
/**
* Data-driven registry for enchantments.
* @see io.papermc.paper.registry.keys.EnchantmentKeys
@ -194,6 +193,32 @@ public sealed interface RegistryKey<T> extends Keyed permits RegistryKeyImpl {
* @see io.papermc.paper.registry.keys.InstrumentKeys
*/
RegistryKey<MusicInstrument> INSTRUMENT = create("instrument");
/**
* Data-driven registry for cat variants.
* @see io.papermc.paper.registry.keys.CatVariantKeys
*/
RegistryKey<Cat.Type> CAT_VARIANT = create("cat_variant");
/**
* Data-driven registry for frog variants.
* @see io.papermc.paper.registry.keys.FrogVariantKeys
*/
RegistryKey<Frog.Variant> FROG_VARIANT = create("frog_variant");
/**
* Data-driven registry for chicken variants.
* @see io.papermc.paper.registry.keys.ChickenVariantKeys
*/
RegistryKey<Chicken.Variant> CHICKEN_VARIANT = create("chicken_variant");
/**
* Data-driven registry for cow variants.
* @see io.papermc.paper.registry.keys.CowVariantKeys
*/
RegistryKey<Cow.Variant> COW_VARIANT = create("cow_variant");
/**
* Data-driven registry for pig variants.
* @see io.papermc.paper.registry.keys.PigVariantKeys
*/
RegistryKey<Pig.Variant> PIG_VARIANT = create("pig_variant");
/* ******************* *

View File

@ -24,11 +24,14 @@ import static io.papermc.paper.registry.event.RegistryEventProviderImpl.create;
@NullMarked
public final class RegistryEvents {
// Start generate - RegistryEvents
// @GeneratedFrom 1.21.5
public static final RegistryEventProvider<GameEvent, GameEventRegistryEntry.Builder> GAME_EVENT = create(RegistryKey.GAME_EVENT);
public static final RegistryEventProvider<Enchantment, EnchantmentRegistryEntry.Builder> ENCHANTMENT = create(RegistryKey.ENCHANTMENT);
public static final RegistryEventProvider<Art, PaintingVariantRegistryEntry.Builder> PAINTING_VARIANT = create(RegistryKey.PAINTING_VARIANT);
public static final RegistryEventProvider<PatternType, BannerPatternRegistryEntry.Builder> BANNER_PATTERN = create(RegistryKey.BANNER_PATTERN);
public static final RegistryEventProvider<DamageType, DamageTypeRegistryEntry.Builder> DAMAGE_TYPE = create(RegistryKey.DAMAGE_TYPE);
public static final RegistryEventProvider<Enchantment, EnchantmentRegistryEntry.Builder> ENCHANTMENT = create(RegistryKey.ENCHANTMENT);
public static final RegistryEventProvider<PatternType, BannerPatternRegistryEntry.Builder> BANNER_PATTERN = create(RegistryKey.BANNER_PATTERN);
public static final RegistryEventProvider<Art, PaintingVariantRegistryEntry.Builder> PAINTING_VARIANT = create(RegistryKey.PAINTING_VARIANT);
// End generate - RegistryEvents
private RegistryEvents() {
}

View File

@ -35,57 +35,109 @@ public interface Art extends OldEnum<Art>, Keyed {
return InlinedRegistryBuilderProvider.instance().createPaintingVariant(value);
}
Art KEBAB = getArt("kebab");
Art AZTEC = getArt("aztec");
// Start generate - Art
// @GeneratedFrom 1.21.5
Art ALBAN = getArt("alban");
Art AZTEC = getArt("aztec");
Art AZTEC2 = getArt("aztec2");
Art BOMB = getArt("bomb");
Art PLANT = getArt("plant");
Art WASTELAND = getArt("wasteland");
Art POOL = getArt("pool");
Art COURBET = getArt("courbet");
Art SEA = getArt("sea");
Art SUNSET = getArt("sunset");
Art CREEBET = getArt("creebet");
Art WANDERER = getArt("wanderer");
Art GRAHAM = getArt("graham");
Art MATCH = getArt("match");
Art BUST = getArt("bust");
Art STAGE = getArt("stage");
Art VOID = getArt("void");
Art SKULL_AND_ROSES = getArt("skull_and_roses");
Art WITHER = getArt("wither");
Art FIGHTERS = getArt("fighters");
Art POINTER = getArt("pointer");
Art PIGSCENE = getArt("pigscene");
Art BURNING_SKULL = getArt("burning_skull");
Art SKELETON = getArt("skeleton");
Art DONKEY_KONG = getArt("donkey_kong");
Art EARTH = getArt("earth");
Art WIND = getArt("wind");
Art WATER = getArt("water");
Art FIRE = getArt("fire");
Art BAROQUE = getArt("baroque");
Art HUMBLE = getArt("humble");
Art MEDITATIVE = getArt("meditative");
Art PRAIRIE_RIDE = getArt("prairie_ride");
Art UNPACKED = getArt("unpacked");
Art BACKYARD = getArt("backyard");
Art BAROQUE = getArt("baroque");
Art BOMB = getArt("bomb");
Art BOUQUET = getArt("bouquet");
Art BURNING_SKULL = getArt("burning_skull");
Art BUST = getArt("bust");
Art CAVEBIRD = getArt("cavebird");
Art CHANGING = getArt("changing");
Art COTAN = getArt("cotan");
Art COURBET = getArt("courbet");
Art CREEBET = getArt("creebet");
Art DONKEY_KONG = getArt("donkey_kong");
Art EARTH = getArt("earth");
Art ENDBOSS = getArt("endboss");
Art FERN = getArt("fern");
Art FIGHTERS = getArt("fighters");
Art FINDING = getArt("finding");
Art FIRE = getArt("fire");
Art GRAHAM = getArt("graham");
Art HUMBLE = getArt("humble");
Art KEBAB = getArt("kebab");
Art LOWMIST = getArt("lowmist");
Art MATCH = getArt("match");
Art MEDITATIVE = getArt("meditative");
Art ORB = getArt("orb");
Art OWLEMONS = getArt("owlemons");
Art PASSAGE = getArt("passage");
Art PIGSCENE = getArt("pigscene");
Art PLANT = getArt("plant");
Art POINTER = getArt("pointer");
Art POND = getArt("pond");
Art POOL = getArt("pool");
Art PRAIRIE_RIDE = getArt("prairie_ride");
Art SEA = getArt("sea");
Art SKELETON = getArt("skeleton");
Art SKULL_AND_ROSES = getArt("skull_and_roses");
Art STAGE = getArt("stage");
Art SUNFLOWERS = getArt("sunflowers");
Art SUNSET = getArt("sunset");
Art TIDES = getArt("tides");
Art UNPACKED = getArt("unpacked");
Art VOID = getArt("void");
Art WANDERER = getArt("wanderer");
Art WASTELAND = getArt("wasteland");
Art WATER = getArt("water");
Art WIND = getArt("wind");
Art WITHER = getArt("wither");
// End generate - Art
@NotNull
private static Art getArt(@NotNull String key) {
return RegistryAccess.registryAccess().getRegistry(RegistryKey.PAINTING_VARIANT).getOrThrow(NamespacedKey.minecraft(key));

View File

@ -14,6 +14,7 @@ import java.util.Set;
import java.util.UUID;
import java.util.function.Consumer;
import java.util.logging.Logger;
import net.kyori.adventure.text.Component;
import org.bukkit.Warning.WarningState;
import org.bukkit.advancement.Advancement;
import org.bukkit.block.data.BlockData;
@ -189,8 +190,8 @@ public final class Bukkit {
* uses. Normal and immediate iterator use without consequences that
* affect the collection are fully supported. The effects following
* (non-exhaustive) {@link Entity#teleport(Location) teleportation},
* {@link Player#setHealth(double) death}, and {@link Player#kickPlayer(
* String) kicking} are undefined. Any use of this collection from
* {@link Player#setHealth(double) death}, and {@link Player#kick(
* Component) kicking} are undefined. Any use of this collection from
* asynchronous threads is unsafe.
* <p>
* For safe consequential iteration or mimicking the old array behavior,
@ -468,7 +469,7 @@ public final class Bukkit {
*
* @param message the message
* @return the number of players
* @deprecated in favour of {@link Server#broadcast(net.kyori.adventure.text.Component)}
* @deprecated in favour of {@link Server#broadcast(Component)}
*/
@Deprecated // Paper
public static int broadcastMessage(@NotNull String message) {
@ -480,7 +481,7 @@ public final class Bukkit {
* Sends the component to all online players.
*
* @param component the component to send
* @deprecated use {@code sendMessage} methods on {@link #getServer()} that accept {@link net.kyori.adventure.text.Component}
* @deprecated use {@code sendMessage} methods on {@link #getServer()} that accept {@link Component}
*/
@Deprecated
public static void broadcast(@NotNull net.md_5.bungee.api.chat.BaseComponent component) {
@ -491,7 +492,7 @@ public final class Bukkit {
* Sends an array of components as a single message to all online players.
*
* @param components the components to send
* @deprecated use {@code sendMessage} methods on {@link #getServer()} that accept {@link net.kyori.adventure.text.Component}
* @deprecated use {@code sendMessage} methods on {@link #getServer()} that accept {@link Component}
*/
@Deprecated
public static void broadcast(@NotNull net.md_5.bungee.api.chat.BaseComponent... components) {
@ -1463,7 +1464,7 @@ public final class Bukkit {
/**
* Broadcast a message to all players.
* <p>
* This is the same as calling {@link #broadcast(net.kyori.adventure.text.Component,
* This is the same as calling {@link #broadcast(Component,
* java.lang.String)} with the {@link Server#BROADCAST_CHANNEL_USERS} permission.
*
* @param message the message
@ -1493,7 +1494,7 @@ public final class Bukkit {
* @param permission the required permission {@link Permissible
* permissibles} must have to receive the broadcast
* @return number of message recipients
* @deprecated in favour of {@link #broadcast(net.kyori.adventure.text.Component, String)}
* @deprecated in favour of {@link #broadcast(Component, String)}
*/
@Deprecated // Paper
public static int broadcast(@NotNull String message, @NotNull String permission) {
@ -1740,7 +1741,7 @@ public final class Bukkit {
* @return a command sender
*/
@NotNull
public static CommandSender createCommandSender(final @NotNull java.util.function.Consumer<? super net.kyori.adventure.text.Component> feedback) {
public static CommandSender createCommandSender(final @NotNull java.util.function.Consumer<? super Component> feedback) {
return server.createCommandSender(feedback);
}
// Paper end
@ -1864,7 +1865,7 @@ public final class Bukkit {
* @return The new inventory.
* @throws IllegalArgumentException if the {@link InventoryType} cannot be
* viewed.
* @deprecated in favour of {@link #createInventory(InventoryHolder, InventoryType, net.kyori.adventure.text.Component)}
* @deprecated in favour of {@link #createInventory(InventoryHolder, InventoryType, Component)}
*
* @see InventoryType#isCreatable()
*/
@ -1916,7 +1917,7 @@ public final class Bukkit {
* viewed
* @return a new inventory
* @throws IllegalArgumentException if the size is not a multiple of 9
* @deprecated in favour of {@link #createInventory(InventoryHolder, InventoryType, net.kyori.adventure.text.Component)}
* @deprecated in favour of {@link #createInventory(InventoryHolder, InventoryType, Component)}
*/
@Deprecated // Paper
@NotNull
@ -1945,7 +1946,7 @@ public final class Bukkit {
* @param title the title of the corresponding merchant inventory, displayed
* when the merchant inventory is viewed
* @return a new merchant
* @deprecated in favour of {@link #createMerchant(net.kyori.adventure.text.Component)}. The title parameter is
* @deprecated in favour of {@link #createMerchant(Component)}. The title parameter is
* no-longer needed when used with {@link MenuType#MERCHANT} and {@link MenuType.Typed#builder()}
*/
@NotNull
@ -2082,7 +2083,7 @@ public final class Bukkit {
*
* @return the server's MOTD
*/
@NotNull public static net.kyori.adventure.text.Component motd() {
@NotNull public static Component motd() {
return server.motd();
}
@ -2121,7 +2122,7 @@ public final class Bukkit {
* Set the message that is displayed on the server list.
*
* @param motd The message to be displayed
* @deprecated in favour of {@link #motd(net.kyori.adventure.text.Component)}
* @deprecated in favour of {@link #motd(Component)}
*/
@Deprecated // Paper
public static void setMotd(@NotNull String motd) {
@ -2695,7 +2696,7 @@ public final class Bukkit {
* @return the default message
*/
@NotNull
public static net.kyori.adventure.text.Component permissionMessage() {
public static Component permissionMessage() {
return server.permissionMessage();
}

View File

@ -136,9 +136,9 @@ public interface Chunk extends PersistentDataHolder {
@NotNull Entity @NotNull [] getEntities();
/**
* Get a list of all tile entities in the chunk.
* Get a list of all block entities in the chunk.
*
* @return The tile entities.
* @return The block entities.
*/
@NotNull
// Paper start
@ -147,20 +147,20 @@ public interface Chunk extends PersistentDataHolder {
}
/**
* Get a list of all tile entities in the chunk.
* Get a list of all block entities in the chunk.
*
* @param useSnapshot Take snapshots or direct references
* @return The tile entities.
* @return The block entities.
*/
@NotNull
BlockState @NotNull [] getTileEntities(boolean useSnapshot);
/**
* Get a list of all tile entities that match a given predicate in the chunk.
* Get a list of all block entities that match a given predicate in the chunk.
*
* @param blockPredicate The predicate of blocks to return tile entities for
* @param blockPredicate The predicate of blocks to return block entities for
* @param useSnapshot Take snapshots or direct references
* @return The tile entities.
* @return The block entities.
*/
@NotNull
Collection<BlockState> getTileEntities(java.util.function.@NotNull Predicate<? super Block> blockPredicate, boolean useSnapshot);

View File

@ -146,7 +146,7 @@ public final class Color implements ConfigurationSerializable {
* @param blue integer from 0-255
* @param green integer from 0-255
* @param red integer from 0-255
* @return a new Color object for the red, green, blue
* @return a new Color object for the blue, green, red
* @throws IllegalArgumentException if any value is strictly {@literal >255 or <0}
*/
@NotNull
@ -225,7 +225,7 @@ public final class Color implements ConfigurationSerializable {
* Creates a new Color object with specified component
*
* @param alpha the alpha component, from 0 to 255
* @return a new color object with the red component
* @return a new color object with the alpha component
*/
@NotNull
public Color setAlpha(int alpha) {
@ -264,8 +264,8 @@ public final class Color implements ConfigurationSerializable {
/**
* Creates a new Color object with specified component
*
* @param green the red component, from 0 to 255
* @return a new color object with the red component
* @param green the green component, from 0 to 255
* @return a new color object with the green component
*/
@NotNull
public Color setGreen(int green) {
@ -284,8 +284,8 @@ public final class Color implements ConfigurationSerializable {
/**
* Creates a new Color object with specified component
*
* @param blue the red component, from 0 to 255
* @return a new color object with the red component
* @param blue the blue component, from 0 to 255
* @return a new color object with the blue component
*/
@NotNull
public Color setBlue(int blue) {

View File

@ -247,11 +247,17 @@ public enum EntityEffect {
// 22-28 player internal flags
/**
* Shield blocks attack.
*
* @deprecated replaced by the {@code blocks_attacks} item data component
*/
@Deprecated(since = "1.21.5", forRemoval = true)
SHIELD_BLOCK(29, LivingEntity.class),
/**
* Shield breaks.
*
* @deprecated replaced by the {@code blocks_attacks} item data component
*/
@Deprecated(since = "1.21.5", forRemoval = true)
SHIELD_BREAK(30, LivingEntity.class),
// 31 - unused
/**
@ -359,7 +365,7 @@ public enum EntityEffect {
*/
BREAK_EQUIPMENT_MAIN_HAND(47, LivingEntity.class),
/**
* Entity breaks item in off hand.
* Entity breaks item in off-hand.
*
* @see org.bukkit.inventory.EquipmentSlot#OFF_HAND
*/
@ -458,11 +464,19 @@ public enum EntityEffect {
*/
BREAK_EQUIPMENT_BODY(65, LivingEntity.class),
/**
* A creaking transient shaking when being hit.
* Does not apply to plain creaking entities as they are not invulnerable like the transient ones spawned by the
* creaking heart.
* A creaking shaking when being hit.
*/
SHAKE(66, Creaking.class);
SHAKE(66, Creaking.class),
/**
* Drown particles for entities.
*/
DROWN_PARTICLES(67, LivingEntity.class),
/**
* Entity breaks item in saddle slot.
*
* @see org.bukkit.inventory.EquipmentSlot#SADDLE
*/
BREAK_EQUIPMENT_SADDLE(68, LivingEntity.class);
private final byte data;
private final Set<Class<? extends Entity>> applicableClasses;

View File

@ -14,19 +14,19 @@ import org.jetbrains.annotations.ApiStatus;
*/
public interface FeatureFlag extends Keyed {
// Paper start - overhaul FeatureFlag API
/**
* The {@code vanilla} feature flag.
*/
FeatureFlag VANILLA = create("vanilla");
// Start generate - FeatureFlag
// @GeneratedFrom 1.21.5
@ApiStatus.Experimental
FeatureFlag MINECART_IMPROVEMENTS = create("minecart_improvements");
/**
* <strong>AVAILABLE BETWEEN VERSIONS:</strong> 1.19.3 - 1.21.1
*
* @deprecated not available since 1.21.2
*/
@Deprecated(since = "1.21.2")
FeatureFlag BUNDLE = deprecated("bundle");
@ApiStatus.Experimental
FeatureFlag REDSTONE_EXPERIMENTS = create("redstone_experiments");
@ApiStatus.Experimental
FeatureFlag TRADE_REBALANCE = create("trade_rebalance");
FeatureFlag VANILLA = create("vanilla");
// End generate - FeatureFlag
/**
* <strong>AVAILABLE BETWEEN VERSIONS:</strong> 1.19 - 1.19.4
@ -37,9 +37,6 @@ public interface FeatureFlag extends Keyed {
@Deprecated(since = "1.20")
FeatureFlag UPDATE_1_20 = deprecated("update_1_20");
@ApiStatus.Experimental // Paper - add missing annotation
FeatureFlag TRADE_REBALANCE = create("trade_rebalance");
/**
* <strong>AVAILABLE BETWEEN VERSIONS:</strong> 1.20.5 - 1.20.6
*
@ -48,6 +45,14 @@ public interface FeatureFlag extends Keyed {
@Deprecated(since = "1.21")
FeatureFlag UPDATE_121 = deprecated("update_1_21");
/**
* <strong>AVAILABLE BETWEEN VERSIONS:</strong> 1.19.3 - 1.21.1
*
* @deprecated not available since 1.21.2
*/
@Deprecated(since = "1.21.2")
FeatureFlag BUNDLE = deprecated("bundle");
/**
* <strong>AVAILABLE BETWEEN VERSIONS:</strong> 1.21.2 - 1.21.3
*
@ -56,12 +61,6 @@ public interface FeatureFlag extends Keyed {
@Deprecated(since = "1.21.4")
FeatureFlag WINTER_DROP = deprecated("winter_drop");
@ApiStatus.Experimental // Paper - add missing annotation
FeatureFlag REDSTONE_EXPERIMENTS = create("redstone_experiments");
@ApiStatus.Experimental // Paper - add missing annotation
FeatureFlag MINECART_IMPROVEMENTS = create("minecart_improvements");
/**
* An index of all feature flags.
*/

View File

@ -12,27 +12,19 @@ import org.jetbrains.annotations.NotNull;
*/
public interface Fluid extends OldEnum<Fluid>, Keyed {
/**
* No fluid.
*/
// Start generate - Fluid
// @GeneratedFrom 1.21.5
Fluid EMPTY = getFluid("empty");
/**
* Stationary water.
*/
Fluid WATER = getFluid("water");
/**
* Flowing water.
*/
Fluid FLOWING_WATER = getFluid("flowing_water");
/**
* Stationary lava.
*/
Fluid LAVA = getFluid("lava");
/**
* Flowing lava.
*/
Fluid FLOWING_LAVA = getFluid("flowing_lava");
Fluid FLOWING_WATER = getFluid("flowing_water");
Fluid LAVA = getFluid("lava");
Fluid WATER = getFluid("water");
// End generate - Fluid
@NotNull
private static Fluid getFluid(@NotNull String key) {
return Registry.FLUID.getOrThrow(NamespacedKey.minecraft(key));

View File

@ -11,107 +11,229 @@ import org.jetbrains.annotations.Nullable;
*/
public abstract class GameEvent implements Keyed {
// Start generate - GameEvent
// @GeneratedFrom 1.21.5
public static final GameEvent BLOCK_ACTIVATE = getEvent("block_activate");
public static final GameEvent BLOCK_ATTACH = getEvent("block_attach");
public static final GameEvent BLOCK_CHANGE = getEvent("block_change");
public static final GameEvent BLOCK_CLOSE = getEvent("block_close");
public static final GameEvent BLOCK_DEACTIVATE = getEvent("block_deactivate");
public static final GameEvent BLOCK_DESTROY = getEvent("block_destroy");
public static final GameEvent BLOCK_DETACH = getEvent("block_detach");
public static final GameEvent BLOCK_OPEN = getEvent("block_open");
public static final GameEvent BLOCK_PLACE = getEvent("block_place");
@Deprecated(since = "1.19")
public static final GameEvent BLOCK_PRESS = getEvent("block_activate");
@Deprecated(since = "1.19")
public static final GameEvent BLOCK_SWITCH = getEvent("block_activate");
@Deprecated(since = "1.19")
public static final GameEvent BLOCK_UNPRESS = getEvent("block_deactivate");
@Deprecated(since = "1.19")
public static final GameEvent BLOCK_UNSWITCH = getEvent("block_deactivate");
public static final GameEvent CONTAINER_CLOSE = getEvent("container_close");
public static final GameEvent CONTAINER_OPEN = getEvent("container_open");
@Deprecated(since = "1.20")
public static final GameEvent DISPENSE_FAIL = getEvent("block_activate");
public static final GameEvent DRINK = getEvent("drink");
@Deprecated(since = "1.19")
public static final GameEvent DRINKING_FINISH = getEvent("drink");
public static final GameEvent EAT = getEvent("eat");
@Deprecated(since = "1.19")
public static final GameEvent ELYTRA_FREE_FALL = getEvent("elytra_glide");
public static final GameEvent ELYTRA_GLIDE = getEvent("elytra_glide");
public static final GameEvent ENTITY_DAMAGE = getEvent("entity_damage");
@Deprecated(since = "1.19")
public static final GameEvent ENTITY_DAMAGED = getEvent("entity_damage");
public static final GameEvent ENTITY_DIE = getEvent("entity_die");
public static final GameEvent ENTITY_DISMOUNT = getEvent("entity_dismount");
@Deprecated(since = "1.19")
public static final GameEvent ENTITY_DYING = getEvent("entity_die");
public static final GameEvent ENTITY_INTERACT = getEvent("entity_interact");
public static final GameEvent ENTITY_MOUNT = getEvent("entity_mount");
@Deprecated(since = "1.19")
public static final GameEvent ENTITY_KILLED = getEvent("entity_die");
public static final GameEvent ENTITY_PLACE = getEvent("entity_place");
public static final GameEvent ENTITY_ACTION = getEvent("entity_action");
@Deprecated(since = "1.20.2")
public static final GameEvent ENTITY_ROAR = getEvent("entity_action");
@Deprecated(since = "1.20.2")
public static final GameEvent ENTITY_SHAKE = getEvent("entity_action");
public static final GameEvent ENTITY_DAMAGE = getEvent("entity_damage");
public static final GameEvent ENTITY_DIE = getEvent("entity_die");
public static final GameEvent ENTITY_DISMOUNT = getEvent("entity_dismount");
public static final GameEvent ENTITY_INTERACT = getEvent("entity_interact");
public static final GameEvent ENTITY_MOUNT = getEvent("entity_mount");
public static final GameEvent ENTITY_PLACE = getEvent("entity_place");
public static final GameEvent EQUIP = getEvent("equip");
public static final GameEvent EXPLODE = getEvent("explode");
public static final GameEvent FLAP = getEvent("flap");
public static final GameEvent FLUID_PICKUP = getEvent("fluid_pickup");
public static final GameEvent FLUID_PLACE = getEvent("fluid_place");
public static final GameEvent HIT_GROUND = getEvent("hit_ground");
public static final GameEvent INSTRUMENT_PLAY = getEvent("instrument_play");
public static final GameEvent ITEM_INTERACT_FINISH = getEvent("item_interact_finish");
public static final GameEvent ITEM_INTERACT_START = getEvent("item_interact_start");
public static final GameEvent JUKEBOX_PLAY = getEvent("jukebox_play");
public static final GameEvent JUKEBOX_STOP_PLAY = getEvent("jukebox_stop_play");
public static final GameEvent LIGHTNING_STRIKE = getEvent("lightning_strike");
@Deprecated(since = "1.19")
public static final GameEvent MOB_INTERACT = getEvent("entity_interact");
public static final GameEvent NOTE_BLOCK_PLAY = getEvent("note_block_play");
@Deprecated(since = "1.20")
public static final GameEvent PISTON_CONTRACT = getEvent("block_deactivate");
@Deprecated(since = "1.20")
public static final GameEvent PISTON_EXTEND = getEvent("block_activate");
public static final GameEvent PRIME_FUSE = getEvent("prime_fuse");
public static final GameEvent PROJECTILE_LAND = getEvent("projectile_land");
public static final GameEvent PROJECTILE_SHOOT = getEvent("projectile_shoot");
@Deprecated(since = "1.19")
public static final GameEvent RAVAGER_ROAR = getEvent("entity_action");
@Deprecated(since = "1.19")
public static final GameEvent RING_BELL = getEvent("block_change");
public static final GameEvent SCULK_SENSOR_TENDRILS_CLICKING = getEvent("sculk_sensor_tendrils_clicking");
public static final GameEvent SHEAR = getEvent("shear");
public static final GameEvent SHRIEK = getEvent("shriek");
@Deprecated(since = "1.19")
public static final GameEvent SHULKER_CLOSE = getEvent("container_close");
@Deprecated(since = "1.19")
public static final GameEvent SHULKER_OPEN = getEvent("container_open");
public static final GameEvent SPLASH = getEvent("splash");
public static final GameEvent STEP = getEvent("step");
public static final GameEvent SWIM = getEvent("swim");
public static final GameEvent TELEPORT = getEvent("teleport");
public static final GameEvent UNEQUIP = getEvent("unequip");
@Deprecated(since = "1.19")
public static final GameEvent WOLF_SHAKING = getEvent("entity_action");
public static final GameEvent RESONATE_1 = getEvent("resonate_1");
public static final GameEvent RESONATE_2 = getEvent("resonate_2");
public static final GameEvent RESONATE_3 = getEvent("resonate_3");
public static final GameEvent RESONATE_4 = getEvent("resonate_4");
public static final GameEvent RESONATE_5 = getEvent("resonate_5");
public static final GameEvent RESONATE_6 = getEvent("resonate_6");
public static final GameEvent RESONATE_7 = getEvent("resonate_7");
public static final GameEvent RESONATE_8 = getEvent("resonate_8");
public static final GameEvent RESONATE_9 = getEvent("resonate_9");
public static final GameEvent RESONATE_10 = getEvent("resonate_10");
public static final GameEvent RESONATE_11 = getEvent("resonate_11");
public static final GameEvent RESONATE_12 = getEvent("resonate_12");
public static final GameEvent RESONATE_13 = getEvent("resonate_13");
public static final GameEvent RESONATE_14 = getEvent("resonate_14");
public static final GameEvent RESONATE_15 = getEvent("resonate_15");
public static final GameEvent SCULK_SENSOR_TENDRILS_CLICKING = getEvent("sculk_sensor_tendrils_clicking");
public static final GameEvent SHEAR = getEvent("shear");
public static final GameEvent SHRIEK = getEvent("shriek");
public static final GameEvent SPLASH = getEvent("splash");
public static final GameEvent STEP = getEvent("step");
public static final GameEvent SWIM = getEvent("swim");
public static final GameEvent TELEPORT = getEvent("teleport");
public static final GameEvent UNEQUIP = getEvent("unequip");
// End generate - GameEvent
/**
* @deprecated in favor of {@link #BLOCK_ACTIVATE}
*/
@Deprecated(since = "1.19")
public static final GameEvent BLOCK_PRESS = BLOCK_ACTIVATE;
/**
* @deprecated in favor of {@link #BLOCK_ACTIVATE}
*/
@Deprecated(since = "1.19")
public static final GameEvent BLOCK_SWITCH = BLOCK_ACTIVATE;
/**
* @deprecated in favor of {@link #BLOCK_DEACTIVATE}
*/
@Deprecated(since = "1.19")
public static final GameEvent BLOCK_UNPRESS = BLOCK_DEACTIVATE;
/**
* @deprecated in favor of {@link #BLOCK_DEACTIVATE}
*/
@Deprecated(since = "1.19")
public static final GameEvent BLOCK_UNSWITCH = BLOCK_DEACTIVATE;
/**
* @deprecated in favor of {@link #BLOCK_ACTIVATE}
*/
@Deprecated(since = "1.20")
public static final GameEvent DISPENSE_FAIL = BLOCK_ACTIVATE;
/**
* @deprecated in favor of {@link #DRINK}
*/
@Deprecated(since = "1.19")
public static final GameEvent DRINKING_FINISH = DRINK;
/**
* @deprecated in favor of {@link #ELYTRA_GLIDE}
*/
@Deprecated(since = "1.19")
public static final GameEvent ELYTRA_FREE_FALL = ELYTRA_GLIDE;
/**
* @deprecated in favor of {@link #ENTITY_DAMAGE}
*/
@Deprecated(since = "1.19")
public static final GameEvent ENTITY_DAMAGED = ENTITY_DAMAGE;
/**
* @deprecated in favor of {@link #ENTITY_DIE}
*/
@Deprecated(since = "1.19")
public static final GameEvent ENTITY_DYING = ENTITY_DIE;
/**
* @deprecated in favor of {@link #ENTITY_DIE}
*/
@Deprecated(since = "1.19")
public static final GameEvent ENTITY_KILLED = ENTITY_DIE;
/**
* @deprecated in favor of {@link #ENTITY_ACTION}
*/
@Deprecated(since = "1.20.2")
public static final GameEvent ENTITY_ROAR = ENTITY_ACTION;
/**
* @deprecated in favor of {@link #ENTITY_ACTION}
*/
@Deprecated(since = "1.20.2")
public static final GameEvent ENTITY_SHAKE = ENTITY_ACTION;
/**
* @deprecated in favor of {@link #ENTITY_INTERACT}
*/
@Deprecated(since = "1.19")
public static final GameEvent MOB_INTERACT = ENTITY_INTERACT;
/**
* @deprecated in favor of {@link #BLOCK_DEACTIVATE}
*/
@Deprecated(since = "1.20")
public static final GameEvent PISTON_CONTRACT = BLOCK_DEACTIVATE;
/**
* @deprecated in favor of {@link #BLOCK_ACTIVATE}
*/
@Deprecated(since = "1.20")
public static final GameEvent PISTON_EXTEND = BLOCK_ACTIVATE;
/**
* @deprecated in favor of {@link #ENTITY_ACTION}
*/
@Deprecated(since = "1.19")
public static final GameEvent RAVAGER_ROAR = ENTITY_ACTION;
/**
* @deprecated in favor of {@link #BLOCK_CHANGE}
*/
@Deprecated(since = "1.19")
public static final GameEvent RING_BELL = BLOCK_CHANGE;
/**
* @deprecated in favor of {@link #CONTAINER_CLOSE}
*/
@Deprecated(since = "1.19")
public static final GameEvent SHULKER_CLOSE = CONTAINER_CLOSE;
/**
* @deprecated in favor of {@link #CONTAINER_OPEN}
*/
@Deprecated(since = "1.19")
public static final GameEvent SHULKER_OPEN = CONTAINER_OPEN;
/**
* @deprecated in favor of {@link #ENTITY_ACTION}
*/
@Deprecated(since = "1.19")
public static final GameEvent WOLF_SHAKING = ENTITY_ACTION;
/**
* Returns a {@link GameEvent} by a {@link NamespacedKey}.
*

View File

@ -220,6 +220,14 @@ public final class GameRule<T> implements net.kyori.adventure.translation.Transl
* Whether ender pearls will vanish on player death.
*/
public static final GameRule<Boolean> ENDER_PEARLS_VANISH_ON_DEATH = new GameRule<>("enderPearlsVanishOnDeath", Boolean.class);
/**
* Whether fire will still propagate far away from players (8 chunks).
*/
public static final GameRule<Boolean> ALLOW_FIRE_TICKS_AWAY_FROM_PLAYER = new GameRule<>("allowFireTicksAwayFromPlayer", Boolean.class);
/**
* Whether primed tnt explodes.
*/
public static final GameRule<Boolean> TNT_EXPLODES = new GameRule<>("tntExplodes", Boolean.class);
// Numerical rules
/**

View File

@ -11,25 +11,46 @@ import org.jetbrains.annotations.NotNull;
@ApiStatus.Experimental
public interface JukeboxSong extends Keyed, Translatable {
public static final JukeboxSong THIRTEEN = get("13");
public static final JukeboxSong CAT = get("cat");
public static final JukeboxSong BLOCKS = get("blocks");
public static final JukeboxSong CHIRP = get("chirp");
public static final JukeboxSong FAR = get("far");
public static final JukeboxSong MALL = get("mall");
public static final JukeboxSong MELLOHI = get("mellohi");
public static final JukeboxSong STAL = get("stal");
public static final JukeboxSong STRAD = get("strad");
public static final JukeboxSong WARD = get("ward");
public static final JukeboxSong ELEVEN = get("11");
public static final JukeboxSong WAIT = get("wait");
public static final JukeboxSong PIGSTEP = get("pigstep");
public static final JukeboxSong OTHERSIDE = get("otherside");
public static final JukeboxSong FIVE = get("5");
public static final JukeboxSong RELIC = get("relic");
public static final JukeboxSong PRECIPICE = get("precipice");
public static final JukeboxSong CREATOR = get("creator");
public static final JukeboxSong CREATOR_MUSIC_BOX = get("creator_music_box");
// Start generate - JukeboxSong
// @GeneratedFrom 1.21.5
JukeboxSong ELEVEN = get("11");
JukeboxSong THIRTEEN = get("13");
JukeboxSong FIVE = get("5");
JukeboxSong BLOCKS = get("blocks");
JukeboxSong CAT = get("cat");
JukeboxSong CHIRP = get("chirp");
JukeboxSong CREATOR = get("creator");
JukeboxSong CREATOR_MUSIC_BOX = get("creator_music_box");
JukeboxSong FAR = get("far");
JukeboxSong MALL = get("mall");
JukeboxSong MELLOHI = get("mellohi");
JukeboxSong OTHERSIDE = get("otherside");
JukeboxSong PIGSTEP = get("pigstep");
JukeboxSong PRECIPICE = get("precipice");
JukeboxSong RELIC = get("relic");
JukeboxSong STAL = get("stal");
JukeboxSong STRAD = get("strad");
JukeboxSong WAIT = get("wait");
JukeboxSong WARD = get("ward");
// End generate - JukeboxSong
@NotNull
private static JukeboxSong get(@NotNull String key) {

File diff suppressed because it is too large Load Diff

View File

@ -10,15 +10,25 @@ import org.jetbrains.annotations.Nullable;
public abstract class MusicInstrument implements Keyed, net.kyori.adventure.translation.Translatable { // Paper - translation keys
public static final MusicInstrument PONDER_GOAT_HORN = getInstrument("ponder_goat_horn");
public static final MusicInstrument SING_GOAT_HORN = getInstrument("sing_goat_horn");
public static final MusicInstrument SEEK_GOAT_HORN = getInstrument("seek_goat_horn");
public static final MusicInstrument FEEL_GOAT_HORN = getInstrument("feel_goat_horn");
// Start generate - MusicInstrument
// @GeneratedFrom 1.21.5
public static final MusicInstrument ADMIRE_GOAT_HORN = getInstrument("admire_goat_horn");
public static final MusicInstrument CALL_GOAT_HORN = getInstrument("call_goat_horn");
public static final MusicInstrument YEARN_GOAT_HORN = getInstrument("yearn_goat_horn");
public static final MusicInstrument DREAM_GOAT_HORN = getInstrument("dream_goat_horn");
public static final MusicInstrument FEEL_GOAT_HORN = getInstrument("feel_goat_horn");
public static final MusicInstrument PONDER_GOAT_HORN = getInstrument("ponder_goat_horn");
public static final MusicInstrument SEEK_GOAT_HORN = getInstrument("seek_goat_horn");
public static final MusicInstrument SING_GOAT_HORN = getInstrument("sing_goat_horn");
public static final MusicInstrument YEARN_GOAT_HORN = getInstrument("yearn_goat_horn");
// End generate - MusicInstrument
/**
* Returns a {@link MusicInstrument} by a {@link NamespacedKey}.
*

View File

@ -7,7 +7,6 @@ import org.jetbrains.annotations.Nullable;
*/
public interface Nameable {
// Paper start
/**
* Gets the custom name.
*
@ -29,7 +28,6 @@ public interface Nameable {
* @param customName the custom name to set
*/
void customName(final net.kyori.adventure.text.@Nullable Component customName);
// Paper end
/**
* Gets the custom name on a mob or block. If there is no name this method

Some files were not shown because too many files have changed in this diff Show More