geforkt von Mirrors/Paper
update generator
Dieser Commit ist enthalten in:
Ursprung
49e63e0b01
Commit
7ce0d944b6
@ -15,7 +15,7 @@ dependencies {
|
||||
implementation("com.squareup:javapoet:1.13.0")
|
||||
implementation(project(":paper-api"))
|
||||
implementation("io.github.classgraph:classgraph:4.8.47")
|
||||
implementation("org.jetbrains:annotations:24.0.1")
|
||||
implementation("org.jetbrains:annotations:24.1.0")
|
||||
testImplementation("org.junit.jupiter:junit-jupiter:5.10.2")
|
||||
testRuntimeOnly("org.junit.platform:junit-platform-launcher")
|
||||
}
|
||||
|
@ -66,7 +66,7 @@ import org.checkerframework.checker.nullness.qual.NonNull;
|
||||
"unused",
|
||||
"SpellCheckingInspection"
|
||||
})
|
||||
@GeneratedFrom("1.21.1")
|
||||
@GeneratedFrom("1.21.3")
|
||||
public interface VanillaGoal<T extends Mob> extends Goal<T> {
|
||||
GoalKey<AbstractHorse> RANDOM_STAND = create("random_stand", AbstractHorse.class);
|
||||
|
||||
@ -102,6 +102,10 @@ public interface VanillaGoal<T extends Mob> extends Goal<T> {
|
||||
|
||||
GoalKey<Bee> BEE_WANDER = create("bee_wander", Bee.class);
|
||||
|
||||
GoalKey<Bee> VALIDATE_FLOWER = create("validate_flower", Bee.class);
|
||||
|
||||
GoalKey<Bee> VALIDATE_HIVE = create("validate_hive", Bee.class);
|
||||
|
||||
GoalKey<Blaze> BLAZE_ATTACK = create("blaze_attack", Blaze.class);
|
||||
|
||||
GoalKey<Cat> CAT_AVOID_ENTITY = create("cat_avoid_entity", Cat.class);
|
||||
|
@ -23,7 +23,7 @@ import org.jetbrains.annotations.ApiStatus;
|
||||
"unused",
|
||||
"SpellCheckingInspection"
|
||||
})
|
||||
@GeneratedFrom("1.21.1")
|
||||
@GeneratedFrom("1.21.3")
|
||||
@ApiStatus.Experimental
|
||||
public final class BannerPatternKeys {
|
||||
/**
|
||||
|
@ -6,6 +6,7 @@ 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.MinecraftExperimental;
|
||||
import org.bukkit.block.Biome;
|
||||
import org.checkerframework.checker.nullness.qual.NonNull;
|
||||
import org.jetbrains.annotations.ApiStatus;
|
||||
@ -23,7 +24,7 @@ import org.jetbrains.annotations.ApiStatus;
|
||||
"unused",
|
||||
"SpellCheckingInspection"
|
||||
})
|
||||
@GeneratedFrom("1.21.1")
|
||||
@GeneratedFrom("1.21.3")
|
||||
@ApiStatus.Experimental
|
||||
public final class BiomeKeys {
|
||||
/**
|
||||
@ -299,6 +300,15 @@ public final class BiomeKeys {
|
||||
*/
|
||||
public static final TypedKey<Biome> OLD_GROWTH_SPRUCE_TAIGA = create(key("old_growth_spruce_taiga"));
|
||||
|
||||
/**
|
||||
* {@code minecraft:pale_garden}
|
||||
*
|
||||
* @apiNote This field is version-dependant and may be removed in future Minecraft versions
|
||||
*/
|
||||
@ApiStatus.Experimental
|
||||
@MinecraftExperimental(MinecraftExperimental.Requires.WINTER_DROP)
|
||||
public static final TypedKey<Biome> PALE_GARDEN = create(key("pale_garden"));
|
||||
|
||||
/**
|
||||
* {@code minecraft:plains}
|
||||
*
|
||||
|
@ -6,6 +6,7 @@ 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.MinecraftExperimental;
|
||||
import org.bukkit.block.BlockType;
|
||||
import org.checkerframework.checker.nullness.qual.NonNull;
|
||||
import org.jetbrains.annotations.ApiStatus;
|
||||
@ -23,7 +24,7 @@ import org.jetbrains.annotations.ApiStatus;
|
||||
"unused",
|
||||
"SpellCheckingInspection"
|
||||
})
|
||||
@GeneratedFrom("1.21.1")
|
||||
@GeneratedFrom("1.21.3")
|
||||
@ApiStatus.Experimental
|
||||
public final class BlockTypeKeys {
|
||||
/**
|
||||
@ -1622,6 +1623,15 @@ public final class BlockTypeKeys {
|
||||
*/
|
||||
public static final TypedKey<BlockType> CRAFTING_TABLE = create(key("crafting_table"));
|
||||
|
||||
/**
|
||||
* {@code minecraft:creaking_heart}
|
||||
*
|
||||
* @apiNote This field is version-dependant and may be removed in future Minecraft versions
|
||||
*/
|
||||
@ApiStatus.Experimental
|
||||
@MinecraftExperimental(MinecraftExperimental.Requires.WINTER_DROP)
|
||||
public static final TypedKey<BlockType> CREAKING_HEART = create(key("creaking_heart"));
|
||||
|
||||
/**
|
||||
* {@code minecraft:creeper_head}
|
||||
*
|
||||
@ -4562,6 +4572,186 @@ public final class BlockTypeKeys {
|
||||
*/
|
||||
public static final TypedKey<BlockType> PACKED_MUD = create(key("packed_mud"));
|
||||
|
||||
/**
|
||||
* {@code minecraft:pale_hanging_moss}
|
||||
*
|
||||
* @apiNote This field is version-dependant and may be removed in future Minecraft versions
|
||||
*/
|
||||
@ApiStatus.Experimental
|
||||
@MinecraftExperimental(MinecraftExperimental.Requires.WINTER_DROP)
|
||||
public static final TypedKey<BlockType> PALE_HANGING_MOSS = create(key("pale_hanging_moss"));
|
||||
|
||||
/**
|
||||
* {@code minecraft:pale_moss_block}
|
||||
*
|
||||
* @apiNote This field is version-dependant and may be removed in future Minecraft versions
|
||||
*/
|
||||
@ApiStatus.Experimental
|
||||
@MinecraftExperimental(MinecraftExperimental.Requires.WINTER_DROP)
|
||||
public static final TypedKey<BlockType> PALE_MOSS_BLOCK = create(key("pale_moss_block"));
|
||||
|
||||
/**
|
||||
* {@code minecraft:pale_moss_carpet}
|
||||
*
|
||||
* @apiNote This field is version-dependant and may be removed in future Minecraft versions
|
||||
*/
|
||||
@ApiStatus.Experimental
|
||||
@MinecraftExperimental(MinecraftExperimental.Requires.WINTER_DROP)
|
||||
public static final TypedKey<BlockType> PALE_MOSS_CARPET = create(key("pale_moss_carpet"));
|
||||
|
||||
/**
|
||||
* {@code minecraft:pale_oak_button}
|
||||
*
|
||||
* @apiNote This field is version-dependant and may be removed in future Minecraft versions
|
||||
*/
|
||||
@ApiStatus.Experimental
|
||||
@MinecraftExperimental(MinecraftExperimental.Requires.WINTER_DROP)
|
||||
public static final TypedKey<BlockType> PALE_OAK_BUTTON = create(key("pale_oak_button"));
|
||||
|
||||
/**
|
||||
* {@code minecraft:pale_oak_door}
|
||||
*
|
||||
* @apiNote This field is version-dependant and may be removed in future Minecraft versions
|
||||
*/
|
||||
@ApiStatus.Experimental
|
||||
@MinecraftExperimental(MinecraftExperimental.Requires.WINTER_DROP)
|
||||
public static final TypedKey<BlockType> PALE_OAK_DOOR = create(key("pale_oak_door"));
|
||||
|
||||
/**
|
||||
* {@code minecraft:pale_oak_fence}
|
||||
*
|
||||
* @apiNote This field is version-dependant and may be removed in future Minecraft versions
|
||||
*/
|
||||
@ApiStatus.Experimental
|
||||
@MinecraftExperimental(MinecraftExperimental.Requires.WINTER_DROP)
|
||||
public static final TypedKey<BlockType> PALE_OAK_FENCE = create(key("pale_oak_fence"));
|
||||
|
||||
/**
|
||||
* {@code minecraft:pale_oak_fence_gate}
|
||||
*
|
||||
* @apiNote This field is version-dependant and may be removed in future Minecraft versions
|
||||
*/
|
||||
@ApiStatus.Experimental
|
||||
@MinecraftExperimental(MinecraftExperimental.Requires.WINTER_DROP)
|
||||
public static final TypedKey<BlockType> PALE_OAK_FENCE_GATE = create(key("pale_oak_fence_gate"));
|
||||
|
||||
/**
|
||||
* {@code minecraft:pale_oak_hanging_sign}
|
||||
*
|
||||
* @apiNote This field is version-dependant and may be removed in future Minecraft versions
|
||||
*/
|
||||
@ApiStatus.Experimental
|
||||
@MinecraftExperimental(MinecraftExperimental.Requires.WINTER_DROP)
|
||||
public static final TypedKey<BlockType> PALE_OAK_HANGING_SIGN = create(key("pale_oak_hanging_sign"));
|
||||
|
||||
/**
|
||||
* {@code minecraft:pale_oak_leaves}
|
||||
*
|
||||
* @apiNote This field is version-dependant and may be removed in future Minecraft versions
|
||||
*/
|
||||
@ApiStatus.Experimental
|
||||
@MinecraftExperimental(MinecraftExperimental.Requires.WINTER_DROP)
|
||||
public static final TypedKey<BlockType> PALE_OAK_LEAVES = create(key("pale_oak_leaves"));
|
||||
|
||||
/**
|
||||
* {@code minecraft:pale_oak_log}
|
||||
*
|
||||
* @apiNote This field is version-dependant and may be removed in future Minecraft versions
|
||||
*/
|
||||
@ApiStatus.Experimental
|
||||
@MinecraftExperimental(MinecraftExperimental.Requires.WINTER_DROP)
|
||||
public static final TypedKey<BlockType> PALE_OAK_LOG = create(key("pale_oak_log"));
|
||||
|
||||
/**
|
||||
* {@code minecraft:pale_oak_planks}
|
||||
*
|
||||
* @apiNote This field is version-dependant and may be removed in future Minecraft versions
|
||||
*/
|
||||
@ApiStatus.Experimental
|
||||
@MinecraftExperimental(MinecraftExperimental.Requires.WINTER_DROP)
|
||||
public static final TypedKey<BlockType> PALE_OAK_PLANKS = create(key("pale_oak_planks"));
|
||||
|
||||
/**
|
||||
* {@code minecraft:pale_oak_pressure_plate}
|
||||
*
|
||||
* @apiNote This field is version-dependant and may be removed in future Minecraft versions
|
||||
*/
|
||||
@ApiStatus.Experimental
|
||||
@MinecraftExperimental(MinecraftExperimental.Requires.WINTER_DROP)
|
||||
public static final TypedKey<BlockType> PALE_OAK_PRESSURE_PLATE = create(key("pale_oak_pressure_plate"));
|
||||
|
||||
/**
|
||||
* {@code minecraft:pale_oak_sapling}
|
||||
*
|
||||
* @apiNote This field is version-dependant and may be removed in future Minecraft versions
|
||||
*/
|
||||
@ApiStatus.Experimental
|
||||
@MinecraftExperimental(MinecraftExperimental.Requires.WINTER_DROP)
|
||||
public static final TypedKey<BlockType> PALE_OAK_SAPLING = create(key("pale_oak_sapling"));
|
||||
|
||||
/**
|
||||
* {@code minecraft:pale_oak_sign}
|
||||
*
|
||||
* @apiNote This field is version-dependant and may be removed in future Minecraft versions
|
||||
*/
|
||||
@ApiStatus.Experimental
|
||||
@MinecraftExperimental(MinecraftExperimental.Requires.WINTER_DROP)
|
||||
public static final TypedKey<BlockType> PALE_OAK_SIGN = create(key("pale_oak_sign"));
|
||||
|
||||
/**
|
||||
* {@code minecraft:pale_oak_slab}
|
||||
*
|
||||
* @apiNote This field is version-dependant and may be removed in future Minecraft versions
|
||||
*/
|
||||
@ApiStatus.Experimental
|
||||
@MinecraftExperimental(MinecraftExperimental.Requires.WINTER_DROP)
|
||||
public static final TypedKey<BlockType> PALE_OAK_SLAB = create(key("pale_oak_slab"));
|
||||
|
||||
/**
|
||||
* {@code minecraft:pale_oak_stairs}
|
||||
*
|
||||
* @apiNote This field is version-dependant and may be removed in future Minecraft versions
|
||||
*/
|
||||
@ApiStatus.Experimental
|
||||
@MinecraftExperimental(MinecraftExperimental.Requires.WINTER_DROP)
|
||||
public static final TypedKey<BlockType> PALE_OAK_STAIRS = create(key("pale_oak_stairs"));
|
||||
|
||||
/**
|
||||
* {@code minecraft:pale_oak_trapdoor}
|
||||
*
|
||||
* @apiNote This field is version-dependant and may be removed in future Minecraft versions
|
||||
*/
|
||||
@ApiStatus.Experimental
|
||||
@MinecraftExperimental(MinecraftExperimental.Requires.WINTER_DROP)
|
||||
public static final TypedKey<BlockType> PALE_OAK_TRAPDOOR = create(key("pale_oak_trapdoor"));
|
||||
|
||||
/**
|
||||
* {@code minecraft:pale_oak_wall_hanging_sign}
|
||||
*
|
||||
* @apiNote This field is version-dependant and may be removed in future Minecraft versions
|
||||
*/
|
||||
@ApiStatus.Experimental
|
||||
@MinecraftExperimental(MinecraftExperimental.Requires.WINTER_DROP)
|
||||
public static final TypedKey<BlockType> PALE_OAK_WALL_HANGING_SIGN = create(key("pale_oak_wall_hanging_sign"));
|
||||
|
||||
/**
|
||||
* {@code minecraft:pale_oak_wall_sign}
|
||||
*
|
||||
* @apiNote This field is version-dependant and may be removed in future Minecraft versions
|
||||
*/
|
||||
@ApiStatus.Experimental
|
||||
@MinecraftExperimental(MinecraftExperimental.Requires.WINTER_DROP)
|
||||
public static final TypedKey<BlockType> PALE_OAK_WALL_SIGN = create(key("pale_oak_wall_sign"));
|
||||
|
||||
/**
|
||||
* {@code minecraft:pale_oak_wood}
|
||||
*
|
||||
* @apiNote This field is version-dependant and may be removed in future Minecraft versions
|
||||
*/
|
||||
@ApiStatus.Experimental
|
||||
@MinecraftExperimental(MinecraftExperimental.Requires.WINTER_DROP)
|
||||
public static final TypedKey<BlockType> PALE_OAK_WOOD = create(key("pale_oak_wood"));
|
||||
|
||||
/**
|
||||
* {@code minecraft:pearlescent_froglight}
|
||||
*
|
||||
@ -5143,6 +5333,15 @@ public final class BlockTypeKeys {
|
||||
*/
|
||||
public static final TypedKey<BlockType> POTTED_OXEYE_DAISY = create(key("potted_oxeye_daisy"));
|
||||
|
||||
/**
|
||||
* {@code minecraft:potted_pale_oak_sapling}
|
||||
*
|
||||
* @apiNote This field is version-dependant and may be removed in future Minecraft versions
|
||||
*/
|
||||
@ApiStatus.Experimental
|
||||
@MinecraftExperimental(MinecraftExperimental.Requires.WINTER_DROP)
|
||||
public static final TypedKey<BlockType> POTTED_PALE_OAK_SAPLING = create(key("potted_pale_oak_sapling"));
|
||||
|
||||
/**
|
||||
* {@code minecraft:potted_pink_tulip}
|
||||
*
|
||||
@ -6410,6 +6609,24 @@ public final class BlockTypeKeys {
|
||||
*/
|
||||
public static final TypedKey<BlockType> STRIPPED_OAK_WOOD = create(key("stripped_oak_wood"));
|
||||
|
||||
/**
|
||||
* {@code minecraft:stripped_pale_oak_log}
|
||||
*
|
||||
* @apiNote This field is version-dependant and may be removed in future Minecraft versions
|
||||
*/
|
||||
@ApiStatus.Experimental
|
||||
@MinecraftExperimental(MinecraftExperimental.Requires.WINTER_DROP)
|
||||
public static final TypedKey<BlockType> STRIPPED_PALE_OAK_LOG = create(key("stripped_pale_oak_log"));
|
||||
|
||||
/**
|
||||
* {@code minecraft:stripped_pale_oak_wood}
|
||||
*
|
||||
* @apiNote This field is version-dependant and may be removed in future Minecraft versions
|
||||
*/
|
||||
@ApiStatus.Experimental
|
||||
@MinecraftExperimental(MinecraftExperimental.Requires.WINTER_DROP)
|
||||
public static final TypedKey<BlockType> STRIPPED_PALE_OAK_WOOD = create(key("stripped_pale_oak_wood"));
|
||||
|
||||
/**
|
||||
* {@code minecraft:stripped_spruce_log}
|
||||
*
|
||||
|
@ -23,7 +23,7 @@ import org.jetbrains.annotations.ApiStatus;
|
||||
"unused",
|
||||
"SpellCheckingInspection"
|
||||
})
|
||||
@GeneratedFrom("1.21.1")
|
||||
@GeneratedFrom("1.21.3")
|
||||
@ApiStatus.Experimental
|
||||
public final class CatVariantKeys {
|
||||
/**
|
||||
|
@ -23,7 +23,7 @@ import org.jetbrains.annotations.ApiStatus;
|
||||
"unused",
|
||||
"SpellCheckingInspection"
|
||||
})
|
||||
@GeneratedFrom("1.21.1")
|
||||
@GeneratedFrom("1.21.3")
|
||||
@ApiStatus.Experimental
|
||||
public final class DamageTypeKeys {
|
||||
/**
|
||||
@ -82,6 +82,13 @@ public final class DamageTypeKeys {
|
||||
*/
|
||||
public static final TypedKey<DamageType> DRY_OUT = create(key("dry_out"));
|
||||
|
||||
/**
|
||||
* {@code minecraft:ender_pearl}
|
||||
*
|
||||
* @apiNote This field is version-dependant and may be removed in future Minecraft versions
|
||||
*/
|
||||
public static final TypedKey<DamageType> ENDER_PEARL = create(key("ender_pearl"));
|
||||
|
||||
/**
|
||||
* {@code minecraft:explosion}
|
||||
*
|
||||
@ -201,6 +208,13 @@ public final class DamageTypeKeys {
|
||||
*/
|
||||
public static final TypedKey<DamageType> LIGHTNING_BOLT = create(key("lightning_bolt"));
|
||||
|
||||
/**
|
||||
* {@code minecraft:mace_smash}
|
||||
*
|
||||
* @apiNote This field is version-dependant and may be removed in future Minecraft versions
|
||||
*/
|
||||
public static final TypedKey<DamageType> MACE_SMASH = create(key("mace_smash"));
|
||||
|
||||
/**
|
||||
* {@code minecraft:magic}
|
||||
*
|
||||
|
@ -23,7 +23,7 @@ import org.jetbrains.annotations.ApiStatus;
|
||||
"unused",
|
||||
"SpellCheckingInspection"
|
||||
})
|
||||
@GeneratedFrom("1.21.1")
|
||||
@GeneratedFrom("1.21.3")
|
||||
@ApiStatus.Experimental
|
||||
public final class EnchantmentKeys {
|
||||
/**
|
||||
|
@ -23,7 +23,7 @@ import org.jetbrains.annotations.ApiStatus;
|
||||
"unused",
|
||||
"SpellCheckingInspection"
|
||||
})
|
||||
@GeneratedFrom("1.21.1")
|
||||
@GeneratedFrom("1.21.3")
|
||||
@ApiStatus.Experimental
|
||||
public final class FrogVariantKeys {
|
||||
/**
|
||||
|
@ -23,7 +23,7 @@ import org.jetbrains.annotations.ApiStatus;
|
||||
"unused",
|
||||
"SpellCheckingInspection"
|
||||
})
|
||||
@GeneratedFrom("1.21.1")
|
||||
@GeneratedFrom("1.21.3")
|
||||
@ApiStatus.Experimental
|
||||
public final class GameEventKeys {
|
||||
/**
|
||||
|
@ -23,7 +23,7 @@ import org.jetbrains.annotations.ApiStatus;
|
||||
"unused",
|
||||
"SpellCheckingInspection"
|
||||
})
|
||||
@GeneratedFrom("1.21.1")
|
||||
@GeneratedFrom("1.21.3")
|
||||
@ApiStatus.Experimental
|
||||
public final class InstrumentKeys {
|
||||
/**
|
||||
|
Datei-Diff unterdrückt, da er zu groß ist
Diff laden
@ -23,7 +23,7 @@ import org.jetbrains.annotations.ApiStatus;
|
||||
"unused",
|
||||
"SpellCheckingInspection"
|
||||
})
|
||||
@GeneratedFrom("1.21.1")
|
||||
@GeneratedFrom("1.21.3")
|
||||
@ApiStatus.Experimental
|
||||
public final class JukeboxSongKeys {
|
||||
/**
|
||||
|
@ -23,7 +23,7 @@ import org.jetbrains.annotations.ApiStatus;
|
||||
"unused",
|
||||
"SpellCheckingInspection"
|
||||
})
|
||||
@GeneratedFrom("1.21.1")
|
||||
@GeneratedFrom("1.21.3")
|
||||
@ApiStatus.Experimental
|
||||
public final class MapDecorationTypeKeys {
|
||||
/**
|
||||
|
@ -23,7 +23,7 @@ import org.jetbrains.annotations.ApiStatus;
|
||||
"unused",
|
||||
"SpellCheckingInspection"
|
||||
})
|
||||
@GeneratedFrom("1.21.1")
|
||||
@GeneratedFrom("1.21.3")
|
||||
@ApiStatus.Experimental
|
||||
public final class MenuTypeKeys {
|
||||
/**
|
||||
|
@ -23,7 +23,7 @@ import org.jetbrains.annotations.ApiStatus;
|
||||
"unused",
|
||||
"SpellCheckingInspection"
|
||||
})
|
||||
@GeneratedFrom("1.21.1")
|
||||
@GeneratedFrom("1.21.3")
|
||||
@ApiStatus.Experimental
|
||||
public final class MobEffectKeys {
|
||||
/**
|
||||
|
@ -23,7 +23,7 @@ import org.jetbrains.annotations.ApiStatus;
|
||||
"unused",
|
||||
"SpellCheckingInspection"
|
||||
})
|
||||
@GeneratedFrom("1.21.1")
|
||||
@GeneratedFrom("1.21.3")
|
||||
@ApiStatus.Experimental
|
||||
public final class StructureKeys {
|
||||
/**
|
||||
|
@ -23,7 +23,7 @@ import org.jetbrains.annotations.ApiStatus;
|
||||
"unused",
|
||||
"SpellCheckingInspection"
|
||||
})
|
||||
@GeneratedFrom("1.21.1")
|
||||
@GeneratedFrom("1.21.3")
|
||||
@ApiStatus.Experimental
|
||||
public final class StructureTypeKeys {
|
||||
/**
|
||||
|
@ -23,7 +23,7 @@ import org.jetbrains.annotations.ApiStatus;
|
||||
"unused",
|
||||
"SpellCheckingInspection"
|
||||
})
|
||||
@GeneratedFrom("1.21.1")
|
||||
@GeneratedFrom("1.21.3")
|
||||
@ApiStatus.Experimental
|
||||
public final class TrimMaterialKeys {
|
||||
/**
|
||||
|
@ -23,7 +23,7 @@ import org.jetbrains.annotations.ApiStatus;
|
||||
"unused",
|
||||
"SpellCheckingInspection"
|
||||
})
|
||||
@GeneratedFrom("1.21.1")
|
||||
@GeneratedFrom("1.21.3")
|
||||
@ApiStatus.Experimental
|
||||
public final class TrimPatternKeys {
|
||||
/**
|
||||
|
@ -23,7 +23,7 @@ import org.jetbrains.annotations.ApiStatus;
|
||||
"unused",
|
||||
"SpellCheckingInspection"
|
||||
})
|
||||
@GeneratedFrom("1.21.1")
|
||||
@GeneratedFrom("1.21.3")
|
||||
@ApiStatus.Experimental
|
||||
public final class VillagerProfessionKeys {
|
||||
/**
|
||||
|
@ -23,7 +23,7 @@ import org.jetbrains.annotations.ApiStatus;
|
||||
"unused",
|
||||
"SpellCheckingInspection"
|
||||
})
|
||||
@GeneratedFrom("1.21.1")
|
||||
@GeneratedFrom("1.21.3")
|
||||
@ApiStatus.Experimental
|
||||
public final class VillagerTypeKeys {
|
||||
/**
|
||||
|
@ -23,7 +23,7 @@ import org.jetbrains.annotations.ApiStatus;
|
||||
"unused",
|
||||
"SpellCheckingInspection"
|
||||
})
|
||||
@GeneratedFrom("1.21.1")
|
||||
@GeneratedFrom("1.21.3")
|
||||
@ApiStatus.Experimental
|
||||
public final class WolfVariantKeys {
|
||||
/**
|
||||
|
@ -24,7 +24,7 @@ import org.jetbrains.annotations.ApiStatus;
|
||||
"unused",
|
||||
"SpellCheckingInspection"
|
||||
})
|
||||
@GeneratedFrom("1.21.1")
|
||||
@GeneratedFrom("1.21.3")
|
||||
@ApiStatus.Experimental
|
||||
public final class EnchantmentTagKeys {
|
||||
/**
|
||||
|
@ -6,6 +6,7 @@ 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.inventory.ItemType;
|
||||
import org.checkerframework.checker.nullness.qual.NonNull;
|
||||
import org.jetbrains.annotations.ApiStatus;
|
||||
@ -23,7 +24,7 @@ import org.jetbrains.annotations.ApiStatus;
|
||||
"unused",
|
||||
"SpellCheckingInspection"
|
||||
})
|
||||
@GeneratedFrom("1.21.1")
|
||||
@GeneratedFrom("1.21.3")
|
||||
@ApiStatus.Experimental
|
||||
public final class ItemTypeTagKeys {
|
||||
/**
|
||||
@ -131,6 +132,20 @@ public final class ItemTypeTagKeys {
|
||||
*/
|
||||
public static final TagKey<ItemType> BREAKS_DECORATED_POTS = create(key("breaks_decorated_pots"));
|
||||
|
||||
/**
|
||||
* {@code #minecraft:brewing_fuel}
|
||||
*
|
||||
* @apiNote This field is version-dependant and may be removed in future Minecraft versions
|
||||
*/
|
||||
public static final TagKey<ItemType> BREWING_FUEL = create(key("brewing_fuel"));
|
||||
|
||||
/**
|
||||
* {@code #minecraft:bundles}
|
||||
*
|
||||
* @apiNote This field is version-dependant and may be removed in future Minecraft versions
|
||||
*/
|
||||
public static final TagKey<ItemType> BUNDLES = create(key("bundles"));
|
||||
|
||||
/**
|
||||
* {@code #minecraft:buttons}
|
||||
*
|
||||
@ -292,6 +307,13 @@ public final class ItemTypeTagKeys {
|
||||
*/
|
||||
public static final TagKey<ItemType> DIAMOND_ORES = create(key("diamond_ores"));
|
||||
|
||||
/**
|
||||
* {@code #minecraft:diamond_tool_materials}
|
||||
*
|
||||
* @apiNote This field is version-dependant and may be removed in future Minecraft versions
|
||||
*/
|
||||
public static final TagKey<ItemType> DIAMOND_TOOL_MATERIALS = create(key("diamond_tool_materials"));
|
||||
|
||||
/**
|
||||
* {@code #minecraft:dirt}
|
||||
*
|
||||
@ -306,6 +328,13 @@ public final class ItemTypeTagKeys {
|
||||
*/
|
||||
public static final TagKey<ItemType> DOORS = create(key("doors"));
|
||||
|
||||
/**
|
||||
* {@code #minecraft:duplicates_allays}
|
||||
*
|
||||
* @apiNote This field is version-dependant and may be removed in future Minecraft versions
|
||||
*/
|
||||
public static final TagKey<ItemType> DUPLICATES_ALLAYS = create(key("duplicates_allays"));
|
||||
|
||||
/**
|
||||
* {@code #minecraft:dyeable}
|
||||
*
|
||||
@ -509,6 +538,20 @@ public final class ItemTypeTagKeys {
|
||||
*/
|
||||
public static final TagKey<ItemType> FROG_FOOD = create(key("frog_food"));
|
||||
|
||||
/**
|
||||
* {@code #minecraft:furnace_minecart_fuel}
|
||||
*
|
||||
* @apiNote This field is version-dependant and may be removed in future Minecraft versions
|
||||
*/
|
||||
public static final TagKey<ItemType> FURNACE_MINECART_FUEL = create(key("furnace_minecart_fuel"));
|
||||
|
||||
/**
|
||||
* {@code #minecraft:gaze_disguise_equipment}
|
||||
*
|
||||
* @apiNote This field is version-dependant and may be removed in future Minecraft versions
|
||||
*/
|
||||
public static final TagKey<ItemType> GAZE_DISGUISE_EQUIPMENT = create(key("gaze_disguise_equipment"));
|
||||
|
||||
/**
|
||||
* {@code #minecraft:goat_food}
|
||||
*
|
||||
@ -523,6 +566,13 @@ public final class ItemTypeTagKeys {
|
||||
*/
|
||||
public static final TagKey<ItemType> GOLD_ORES = create(key("gold_ores"));
|
||||
|
||||
/**
|
||||
* {@code #minecraft:gold_tool_materials}
|
||||
*
|
||||
* @apiNote This field is version-dependant and may be removed in future Minecraft versions
|
||||
*/
|
||||
public static final TagKey<ItemType> GOLD_TOOL_MATERIALS = create(key("gold_tool_materials"));
|
||||
|
||||
/**
|
||||
* {@code #minecraft:hanging_signs}
|
||||
*
|
||||
@ -579,6 +629,13 @@ public final class ItemTypeTagKeys {
|
||||
*/
|
||||
public static final TagKey<ItemType> IRON_ORES = create(key("iron_ores"));
|
||||
|
||||
/**
|
||||
* {@code #minecraft:iron_tool_materials}
|
||||
*
|
||||
* @apiNote This field is version-dependant and may be removed in future Minecraft versions
|
||||
*/
|
||||
public static final TagKey<ItemType> IRON_TOOL_MATERIALS = create(key("iron_tool_materials"));
|
||||
|
||||
/**
|
||||
* {@code #minecraft:jungle_logs}
|
||||
*
|
||||
@ -649,6 +706,13 @@ public final class ItemTypeTagKeys {
|
||||
*/
|
||||
public static final TagKey<ItemType> MANGROVE_LOGS = create(key("mangrove_logs"));
|
||||
|
||||
/**
|
||||
* {@code #minecraft:map_invisibility_equipment}
|
||||
*
|
||||
* @apiNote This field is version-dependant and may be removed in future Minecraft versions
|
||||
*/
|
||||
public static final TagKey<ItemType> MAP_INVISIBILITY_EQUIPMENT = create(key("map_invisibility_equipment"));
|
||||
|
||||
/**
|
||||
* {@code #minecraft:meat}
|
||||
*
|
||||
@ -656,6 +720,13 @@ public final class ItemTypeTagKeys {
|
||||
*/
|
||||
public static final TagKey<ItemType> MEAT = create(key("meat"));
|
||||
|
||||
/**
|
||||
* {@code #minecraft:netherite_tool_materials}
|
||||
*
|
||||
* @apiNote This field is version-dependant and may be removed in future Minecraft versions
|
||||
*/
|
||||
public static final TagKey<ItemType> NETHERITE_TOOL_MATERIALS = create(key("netherite_tool_materials"));
|
||||
|
||||
/**
|
||||
* {@code #minecraft:non_flammable_wood}
|
||||
*
|
||||
@ -684,6 +755,22 @@ public final class ItemTypeTagKeys {
|
||||
*/
|
||||
public static final TagKey<ItemType> OCELOT_FOOD = create(key("ocelot_food"));
|
||||
|
||||
/**
|
||||
* {@code #minecraft:pale_oak_logs}
|
||||
*
|
||||
* @apiNote This field is version-dependant and may be removed in future Minecraft versions
|
||||
*/
|
||||
@ApiStatus.Experimental
|
||||
@MinecraftExperimental(MinecraftExperimental.Requires.WINTER_DROP)
|
||||
public static final TagKey<ItemType> PALE_OAK_LOGS = create(key("pale_oak_logs"));
|
||||
|
||||
/**
|
||||
* {@code #minecraft:panda_eats_from_ground}
|
||||
*
|
||||
* @apiNote This field is version-dependant and may be removed in future Minecraft versions
|
||||
*/
|
||||
public static final TagKey<ItemType> PANDA_EATS_FROM_GROUND = create(key("panda_eats_from_ground"));
|
||||
|
||||
/**
|
||||
* {@code #minecraft:panda_food}
|
||||
*
|
||||
@ -740,6 +827,13 @@ public final class ItemTypeTagKeys {
|
||||
*/
|
||||
public static final TagKey<ItemType> PIGLIN_REPELLENTS = create(key("piglin_repellents"));
|
||||
|
||||
/**
|
||||
* {@code #minecraft:piglin_safe_armor}
|
||||
*
|
||||
* @apiNote This field is version-dependant and may be removed in future Minecraft versions
|
||||
*/
|
||||
public static final TagKey<ItemType> PIGLIN_SAFE_ARMOR = create(key("piglin_safe_armor"));
|
||||
|
||||
/**
|
||||
* {@code #minecraft:planks}
|
||||
*
|
||||
@ -768,6 +862,62 @@ public final class ItemTypeTagKeys {
|
||||
*/
|
||||
public static final TagKey<ItemType> REDSTONE_ORES = create(key("redstone_ores"));
|
||||
|
||||
/**
|
||||
* {@code #minecraft:repairs_chain_armor}
|
||||
*
|
||||
* @apiNote This field is version-dependant and may be removed in future Minecraft versions
|
||||
*/
|
||||
public static final TagKey<ItemType> REPAIRS_CHAIN_ARMOR = create(key("repairs_chain_armor"));
|
||||
|
||||
/**
|
||||
* {@code #minecraft:repairs_diamond_armor}
|
||||
*
|
||||
* @apiNote This field is version-dependant and may be removed in future Minecraft versions
|
||||
*/
|
||||
public static final TagKey<ItemType> REPAIRS_DIAMOND_ARMOR = create(key("repairs_diamond_armor"));
|
||||
|
||||
/**
|
||||
* {@code #minecraft:repairs_gold_armor}
|
||||
*
|
||||
* @apiNote This field is version-dependant and may be removed in future Minecraft versions
|
||||
*/
|
||||
public static final TagKey<ItemType> REPAIRS_GOLD_ARMOR = create(key("repairs_gold_armor"));
|
||||
|
||||
/**
|
||||
* {@code #minecraft:repairs_iron_armor}
|
||||
*
|
||||
* @apiNote This field is version-dependant and may be removed in future Minecraft versions
|
||||
*/
|
||||
public static final TagKey<ItemType> REPAIRS_IRON_ARMOR = create(key("repairs_iron_armor"));
|
||||
|
||||
/**
|
||||
* {@code #minecraft:repairs_leather_armor}
|
||||
*
|
||||
* @apiNote This field is version-dependant and may be removed in future Minecraft versions
|
||||
*/
|
||||
public static final TagKey<ItemType> REPAIRS_LEATHER_ARMOR = create(key("repairs_leather_armor"));
|
||||
|
||||
/**
|
||||
* {@code #minecraft:repairs_netherite_armor}
|
||||
*
|
||||
* @apiNote This field is version-dependant and may be removed in future Minecraft versions
|
||||
*/
|
||||
public static final TagKey<ItemType> REPAIRS_NETHERITE_ARMOR = create(key("repairs_netherite_armor"));
|
||||
|
||||
/**
|
||||
* {@code #minecraft:repairs_turtle_helmet}
|
||||
*
|
||||
* @apiNote This field is version-dependant and may be removed in future Minecraft versions
|
||||
*/
|
||||
public static final TagKey<ItemType> REPAIRS_TURTLE_HELMET = create(key("repairs_turtle_helmet"));
|
||||
|
||||
/**
|
||||
* {@code #minecraft:repairs_wolf_armor}
|
||||
*
|
||||
* @apiNote This field is version-dependant and may be removed in future Minecraft versions
|
||||
*/
|
||||
public static final TagKey<ItemType> REPAIRS_WOLF_ARMOR = create(key("repairs_wolf_armor"));
|
||||
|
||||
/**
|
||||
* {@code #minecraft:sand}
|
||||
*
|
||||
@ -796,6 +946,13 @@ public final class ItemTypeTagKeys {
|
||||
*/
|
||||
public static final TagKey<ItemType> SHOVELS = create(key("shovels"));
|
||||
|
||||
/**
|
||||
* {@code #minecraft:shulker_boxes}
|
||||
*
|
||||
* @apiNote This field is version-dependant and may be removed in future Minecraft versions
|
||||
*/
|
||||
public static final TagKey<ItemType> SHULKER_BOXES = create(key("shulker_boxes"));
|
||||
|
||||
/**
|
||||
* {@code #minecraft:signs}
|
||||
*
|
||||
@ -957,6 +1114,13 @@ public final class ItemTypeTagKeys {
|
||||
*/
|
||||
public static final TagKey<ItemType> TURTLE_FOOD = create(key("turtle_food"));
|
||||
|
||||
/**
|
||||
* {@code #minecraft:villager_picks_up}
|
||||
*
|
||||
* @apiNote This field is version-dependant and may be removed in future Minecraft versions
|
||||
*/
|
||||
public static final TagKey<ItemType> VILLAGER_PICKS_UP = create(key("villager_picks_up"));
|
||||
|
||||
/**
|
||||
* {@code #minecraft:villager_plantable_seeds}
|
||||
*
|
||||
@ -1034,6 +1198,13 @@ public final class ItemTypeTagKeys {
|
||||
*/
|
||||
public static final TagKey<ItemType> WOODEN_STAIRS = create(key("wooden_stairs"));
|
||||
|
||||
/**
|
||||
* {@code #minecraft:wooden_tool_materials}
|
||||
*
|
||||
* @apiNote This field is version-dependant and may be removed in future Minecraft versions
|
||||
*/
|
||||
public static final TagKey<ItemType> WOODEN_TOOL_MATERIALS = create(key("wooden_tool_materials"));
|
||||
|
||||
/**
|
||||
* {@code #minecraft:wooden_trapdoors}
|
||||
*
|
||||
|
@ -7,22 +7,25 @@ import io.papermc.generator.utils.TagCollector;
|
||||
import java.nio.file.Files;
|
||||
import java.nio.file.Path;
|
||||
import java.nio.file.Paths;
|
||||
import java.util.List;
|
||||
import java.util.Map;
|
||||
import net.minecraft.SharedConstants;
|
||||
import net.minecraft.commands.Commands;
|
||||
import net.minecraft.core.HolderLookup;
|
||||
import net.minecraft.core.LayeredRegistryAccess;
|
||||
import net.minecraft.core.Registry;
|
||||
import net.minecraft.core.RegistryAccess;
|
||||
import net.minecraft.resources.RegistryDataLoader;
|
||||
import net.minecraft.server.Bootstrap;
|
||||
import net.minecraft.server.RegistryLayer;
|
||||
import net.minecraft.server.ReloadableServerResources;
|
||||
import net.minecraft.server.WorldLoader;
|
||||
import net.minecraft.server.packs.PackType;
|
||||
import net.minecraft.server.packs.repository.Pack;
|
||||
import net.minecraft.server.packs.repository.PackRepository;
|
||||
import net.minecraft.server.packs.repository.ServerPacksSource;
|
||||
import net.minecraft.server.packs.resources.MultiPackResourceManager;
|
||||
import net.minecraft.tags.TagKey;
|
||||
import net.minecraft.tags.TagLoader;
|
||||
import net.minecraft.world.flag.FeatureFlags;
|
||||
import org.apache.commons.io.file.PathUtils;
|
||||
import org.slf4j.Logger;
|
||||
@ -42,11 +45,22 @@ public final class Main {
|
||||
resourceRepository.reload();
|
||||
final MultiPackResourceManager resourceManager = new MultiPackResourceManager(PackType.SERVER_DATA, resourceRepository.getAvailablePacks().stream().map(Pack::open).toList());
|
||||
LayeredRegistryAccess<RegistryLayer> layers = RegistryLayer.createRegistryAccess();
|
||||
layers = WorldLoader.loadAndReplaceLayer(resourceManager, layers, RegistryLayer.WORLDGEN, RegistryDataLoader.WORLDGEN_REGISTRIES);
|
||||
final List<Registry.PendingTags<?>> pendingTags = TagLoader.loadTagsForExistingRegistries(resourceManager, layers.getLayer(RegistryLayer.STATIC));
|
||||
final List<HolderLookup.RegistryLookup<?>> worldGenLayer = TagLoader.buildUpdatedLookups(layers.getAccessForLoading(RegistryLayer.WORLDGEN), pendingTags);
|
||||
final RegistryAccess.Frozen frozenWorldgenRegistries = RegistryDataLoader.load(resourceManager, worldGenLayer, RegistryDataLoader.WORLDGEN_REGISTRIES);
|
||||
layers = layers.replaceFrom(RegistryLayer.WORLDGEN, frozenWorldgenRegistries);
|
||||
REGISTRY_ACCESS = layers.compositeAccess().freeze();
|
||||
final ReloadableServerResources datapack = ReloadableServerResources.loadResources(resourceManager, layers, FeatureFlags.REGISTRY.allFlags(), Commands.CommandSelection.DEDICATED, 0, MoreExecutors.directExecutor(), MoreExecutors.directExecutor()).join();
|
||||
datapack.updateRegistryTags();
|
||||
|
||||
final ReloadableServerResources reloadableServerResources = ReloadableServerResources.loadResources(
|
||||
resourceManager,
|
||||
layers,
|
||||
pendingTags,
|
||||
FeatureFlags.VANILLA_SET,
|
||||
Commands.CommandSelection.DEDICATED,
|
||||
0,
|
||||
MoreExecutors.directExecutor(),
|
||||
MoreExecutors.directExecutor()
|
||||
).join();
|
||||
reloadableServerResources.updateStaticRegistryTags();
|
||||
EXPERIMENTAL_TAGS = TagCollector.grabExperimental(resourceManager);
|
||||
}
|
||||
|
||||
|
@ -23,14 +23,19 @@ import java.util.IdentityHashMap;
|
||||
import java.util.Map;
|
||||
import java.util.Set;
|
||||
import java.util.stream.Collectors;
|
||||
import javax.lang.model.SourceVersion;
|
||||
import net.kyori.adventure.key.Key;
|
||||
import net.minecraft.core.Holder;
|
||||
import net.minecraft.core.HolderLookup;
|
||||
import net.minecraft.core.Registry;
|
||||
import net.minecraft.core.RegistrySetBuilder;
|
||||
import net.minecraft.core.registries.Registries;
|
||||
import net.minecraft.data.registries.VanillaRegistries;
|
||||
import net.minecraft.data.registries.WinterDropRegistries;
|
||||
import net.minecraft.resources.ResourceKey;
|
||||
import net.minecraft.world.flag.FeatureElement;
|
||||
import net.minecraft.world.flag.FeatureFlags;
|
||||
import org.bukkit.MinecraftExperimental;
|
||||
import org.checkerframework.checker.nullness.qual.NonNull;
|
||||
import org.checkerframework.checker.nullness.qual.Nullable;
|
||||
import org.checkerframework.framework.qual.DefaultQualifier;
|
||||
@ -51,7 +56,8 @@ public class GeneratedKeyType<T, A> extends SimpleGenerator {
|
||||
private static final Map<ResourceKey<? extends Registry<?>>, RegistrySetBuilder.RegistryBootstrap<?>> VANILLA_REGISTRY_ENTRIES = VanillaRegistries.BUILDER.entries.stream()
|
||||
.collect(Collectors.toMap(RegistrySetBuilder.RegistryStub::key, RegistrySetBuilder.RegistryStub::bootstrap));
|
||||
|
||||
private static final Map<ResourceKey<? extends Registry<?>>, RegistrySetBuilder.RegistryBootstrap<?>> EXPERIMENTAL_REGISTRY_ENTRIES = Collections.emptyMap(); // Update for Experimental API
|
||||
private static final Map<ResourceKey<? extends Registry<?>>, RegistrySetBuilder.RegistryBootstrap<?>> EXPERIMENTAL_REGISTRY_ENTRIES = WinterDropRegistries.BUILDER.entries.stream()
|
||||
.collect(Collectors.toMap(RegistrySetBuilder.RegistryStub::key, RegistrySetBuilder.RegistryStub::bootstrap)); // Update for Experimental API
|
||||
|
||||
private static final Map<RegistryKey<?>, String> REGISTRY_KEY_FIELD_NAMES;
|
||||
static {
|
||||
@ -116,6 +122,13 @@ public class GeneratedKeyType<T, A> extends SimpleGenerator {
|
||||
);
|
||||
}
|
||||
|
||||
@Deprecated
|
||||
private static final Map<String, String> JUKEBOX_SONG_NAMES = Map.of(
|
||||
"5", "FIVE",
|
||||
"11", "ELEVEN",
|
||||
"13", "THIRTEEN"
|
||||
);
|
||||
|
||||
@Override
|
||||
protected TypeSpec getTypeSpec() {
|
||||
final TypeName typedKey = ParameterizedTypeName.get(TypedKey.class, this.apiType);
|
||||
@ -123,19 +136,23 @@ public class GeneratedKeyType<T, A> extends SimpleGenerator {
|
||||
final TypeSpec.Builder typeBuilder = this.keyHolderType();
|
||||
final MethodSpec.Builder createMethod = this.createMethod(typedKey);
|
||||
|
||||
final Registry<T> registry = Main.REGISTRY_ACCESS.registryOrThrow(this.registryKey);
|
||||
final Registry<T> registry = Main.REGISTRY_ACCESS.lookupOrThrow(this.registryKey);
|
||||
final Set<ResourceKey<T>> experimental = this.collectExperimentalKeys(registry);
|
||||
|
||||
boolean allExperimental = true;
|
||||
for (final Holder.Reference<T> reference : registry.holders().sorted(Formatting.alphabeticKeyOrder(reference -> reference.key().location().getPath())).toList()) {
|
||||
for (final Holder.Reference<T> reference : registry.listElements().sorted(Formatting.alphabeticKeyOrder(reference -> reference.key().location().getPath())).toList()) {
|
||||
final ResourceKey<T> key = reference.key();
|
||||
final String keyPath = key.location().getPath();
|
||||
final String fieldName = Formatting.formatKeyAsField(keyPath);
|
||||
String fieldName = Formatting.formatKeyAsField(keyPath);
|
||||
if (!SourceVersion.isIdentifier(fieldName) && this.registryKey.equals(Registries.JUKEBOX_SONG) && JUKEBOX_SONG_NAMES.containsKey(fieldName)) {
|
||||
fieldName = JUKEBOX_SONG_NAMES.get(fieldName);
|
||||
}
|
||||
|
||||
final FieldSpec.Builder fieldBuilder = FieldSpec.builder(typedKey, fieldName, PUBLIC, STATIC, FINAL)
|
||||
.initializer("$N(key($S))", createMethod.build(), keyPath)
|
||||
.addJavadoc(Javadocs.getVersionDependentField("{@code $L}"), key.location().toString());
|
||||
if (experimental.contains(key)) {
|
||||
fieldBuilder.addAnnotations(experimentalAnnotations(null)); // Update for Experimental API
|
||||
fieldBuilder.addAnnotations(experimentalAnnotations(MinecraftExperimental.Requires.WINTER_DROP)); // Update for Experimental API
|
||||
} else {
|
||||
allExperimental = false;
|
||||
}
|
||||
@ -150,6 +167,7 @@ public class GeneratedKeyType<T, A> extends SimpleGenerator {
|
||||
return typeBuilder.addMethod(createMethod.build()).build();
|
||||
}
|
||||
|
||||
// todo at some point this should be per feature data pack not all merged
|
||||
private Set<ResourceKey<T>> collectExperimentalKeys(final Registry<T> registry) {
|
||||
if (FeatureElement.FILTERED_REGISTRIES.contains(registry.key())) {
|
||||
return this.collectExperimentalKeysBuiltIn(registry);
|
||||
@ -159,8 +177,8 @@ public class GeneratedKeyType<T, A> extends SimpleGenerator {
|
||||
}
|
||||
|
||||
private Set<ResourceKey<T>> collectExperimentalKeysBuiltIn(final Registry<T> registry) {
|
||||
final HolderLookup.RegistryLookup<T> filteredLookup = registry.asLookup().filterElements(v -> {
|
||||
return false; // Update for Experimental API
|
||||
final HolderLookup.RegistryLookup<T> filteredLookup = registry.filterElements(v -> {
|
||||
return v instanceof final FeatureElement featureElement && FeatureFlags.isExperimental(featureElement.requiredFeatures()); // Update for Experimental API
|
||||
});
|
||||
return filteredLookup.listElementIds().collect(Collectors.toUnmodifiableSet());
|
||||
}
|
||||
|
@ -16,6 +16,7 @@ import io.papermc.paper.registry.tag.TagKey;
|
||||
import java.lang.reflect.Field;
|
||||
import java.lang.reflect.Modifier;
|
||||
import java.util.HashMap;
|
||||
import java.util.Locale;
|
||||
import java.util.Map;
|
||||
import java.util.concurrent.atomic.AtomicBoolean;
|
||||
import net.kyori.adventure.key.Key;
|
||||
@ -105,16 +106,17 @@ public class GeneratedTagKeyType<T, A> extends SimpleGenerator {
|
||||
final TypeSpec.Builder typeBuilder = this.keyHolderType();
|
||||
final MethodSpec.Builder createMethod = this.createMethod(tagKey);
|
||||
|
||||
final Registry<T> registry = Main.REGISTRY_ACCESS.registryOrThrow(this.registryKey);
|
||||
final Registry<T> registry = Main.REGISTRY_ACCESS.lookupOrThrow(this.registryKey);
|
||||
|
||||
final AtomicBoolean allExperimental = new AtomicBoolean(true);
|
||||
registry.getTagNames().sorted(Formatting.alphabeticKeyOrder(nmsTagKey -> nmsTagKey.location().getPath())).forEach(nmsTagKey -> {
|
||||
registry.listTagIds().sorted(Formatting.alphabeticKeyOrder(nmsTagKey -> nmsTagKey.location().getPath())).forEach(nmsTagKey -> {
|
||||
final String fieldName = Formatting.formatKeyAsField(nmsTagKey.location().getPath());
|
||||
final FieldSpec.Builder fieldBuilder = FieldSpec.builder(tagKey, fieldName, PUBLIC, STATIC, FINAL)
|
||||
.initializer("$N(key($S))", createMethod.build(), nmsTagKey.location().getPath())
|
||||
.addJavadoc(Javadocs.getVersionDependentField("{@code $L}"), "#" + nmsTagKey.location());
|
||||
if (Main.EXPERIMENTAL_TAGS.containsKey(nmsTagKey)) {
|
||||
fieldBuilder.addAnnotations(experimentalAnnotations(MinecraftExperimental.Requires.TRADE_REBALANCE)); // Update for Experimental API
|
||||
final String featureFlagName = Main.EXPERIMENTAL_TAGS.get(nmsTagKey);
|
||||
if (featureFlagName != null) {
|
||||
fieldBuilder.addAnnotations(experimentalAnnotations(MinecraftExperimental.Requires.valueOf(featureFlagName.toUpperCase(Locale.ENGLISH)))); // Update for Experimental API
|
||||
} else {
|
||||
allExperimental.set(false);
|
||||
}
|
||||
|
@ -31,5 +31,4 @@ public abstract class SimpleGenerator implements SourceGenerator {
|
||||
|
||||
builder.build().writeTo(parent, StandardCharsets.UTF_8);
|
||||
}
|
||||
|
||||
}
|
||||
|
@ -1,6 +1,5 @@
|
||||
package io.papermc.generator.types.goal;
|
||||
|
||||
import com.destroystokyo.paper.entity.RangedEntity;
|
||||
import com.destroystokyo.paper.entity.ai.GoalKey;
|
||||
import com.squareup.javapoet.ClassName;
|
||||
import com.squareup.javapoet.FieldSpec;
|
||||
@ -19,44 +18,10 @@ import io.papermc.generator.utils.Formatting;
|
||||
import io.papermc.generator.utils.Javadocs;
|
||||
import java.util.Comparator;
|
||||
import java.util.List;
|
||||
import javax.lang.model.element.Modifier;
|
||||
import net.minecraft.world.entity.ai.goal.Goal;
|
||||
import net.minecraft.world.entity.ai.goal.WrappedGoal;
|
||||
import org.bukkit.NamespacedKey;
|
||||
import org.bukkit.entity.AbstractHorse;
|
||||
import org.bukkit.entity.Blaze;
|
||||
import org.bukkit.entity.Cat;
|
||||
import org.bukkit.entity.Creature;
|
||||
import org.bukkit.entity.Dolphin;
|
||||
import org.bukkit.entity.Drowned;
|
||||
import org.bukkit.entity.Enderman;
|
||||
import org.bukkit.entity.Evoker;
|
||||
import org.bukkit.entity.Fish;
|
||||
import org.bukkit.entity.Fox;
|
||||
import org.bukkit.entity.Ghast;
|
||||
import org.bukkit.entity.Llama;
|
||||
import org.bukkit.entity.Mob;
|
||||
import org.bukkit.entity.Monster;
|
||||
import org.bukkit.entity.Panda;
|
||||
import org.bukkit.entity.Parrot;
|
||||
import org.bukkit.entity.PigZombie;
|
||||
import org.bukkit.entity.PolarBear;
|
||||
import org.bukkit.entity.Rabbit;
|
||||
import org.bukkit.entity.Raider;
|
||||
import org.bukkit.entity.Ravager;
|
||||
import org.bukkit.entity.Shulker;
|
||||
import org.bukkit.entity.Silverfish;
|
||||
import org.bukkit.entity.SkeletonHorse;
|
||||
import org.bukkit.entity.Slime;
|
||||
import org.bukkit.entity.Spellcaster;
|
||||
import org.bukkit.entity.Spider;
|
||||
import org.bukkit.entity.Squid;
|
||||
import org.bukkit.entity.Tameable;
|
||||
import org.bukkit.entity.TraderLlama;
|
||||
import org.bukkit.entity.Turtle;
|
||||
import org.bukkit.entity.Vex;
|
||||
import org.bukkit.entity.Vindicator;
|
||||
import org.bukkit.entity.WanderingTrader;
|
||||
import org.checkerframework.checker.nullness.qual.NonNull;
|
||||
import org.checkerframework.framework.qual.DefaultQualifier;
|
||||
import org.jetbrains.annotations.Nullable;
|
||||
@ -134,10 +99,4 @@ public class MobGoalGenerator extends SimpleGenerator {
|
||||
protected JavaFile.Builder file(JavaFile.Builder builder) {
|
||||
return builder;
|
||||
}
|
||||
|
||||
record DeprecatedEntry(Class<?> entity, String entryName, @Nullable String removalVersion,
|
||||
@Nullable String removedVersion) {
|
||||
|
||||
}
|
||||
|
||||
}
|
||||
|
@ -236,6 +236,9 @@ public class MobGoalNames {
|
||||
bukkitMap.put(net.minecraft.world.entity.monster.breeze.Breeze.class, org.bukkit.entity.Breeze.class);
|
||||
bukkitMap.put(net.minecraft.world.entity.animal.armadillo.Armadillo.class, org.bukkit.entity.Armadillo.class);
|
||||
bukkitMap.put(net.minecraft.world.entity.monster.Bogged.class, org.bukkit.entity.Bogged.class);
|
||||
bukkitMap.put(net.minecraft.world.entity.monster.creaking.Creaking.class, org.bukkit.entity.Creaking.class);
|
||||
bukkitMap.put(net.minecraft.world.entity.monster.creaking.CreakingTransient.class, org.bukkit.entity.CreakingTransient.class);
|
||||
bukkitMap.put(net.minecraft.world.entity.animal.AgeableWaterCreature.class, org.bukkit.entity.Squid.class); // close enough
|
||||
//</editor-fold>
|
||||
}
|
||||
|
||||
@ -268,6 +271,7 @@ public class MobGoalNames {
|
||||
name = cut;
|
||||
}
|
||||
}
|
||||
|
||||
name = name.replace("PathfinderGoal", "");
|
||||
name = name.replace("TargetGoal", "");
|
||||
name = name.replace("Goal", "");
|
||||
|
@ -18,11 +18,11 @@ public record CollectingContext<T>(Set<ResourceKey<T>> registered,
|
||||
@Override
|
||||
public Holder.Reference<T> register(final ResourceKey<T> resourceKey, final @NonNull T t, final Lifecycle lifecycle) {
|
||||
this.registered.add(resourceKey);
|
||||
return Holder.Reference.createStandAlone(this.registry.holderOwner(), resourceKey);
|
||||
return Holder.Reference.createStandAlone(this.registry, resourceKey);
|
||||
}
|
||||
|
||||
@Override
|
||||
public <S> HolderGetter<S> lookup(final ResourceKey<? extends Registry<? extends S>> resourceKey) {
|
||||
return Main.REGISTRY_ACCESS.registryOrThrow(resourceKey).asLookup();
|
||||
return Main.REGISTRY_ACCESS.lookupOrThrow(resourceKey);
|
||||
}
|
||||
}
|
||||
|
@ -1,6 +1,5 @@
|
||||
package io.papermc.generator.utils;
|
||||
|
||||
import java.util.Map;
|
||||
import java.util.Optional;
|
||||
import org.apache.commons.lang3.math.NumberUtils;
|
||||
import java.util.Comparator;
|
||||
@ -13,13 +12,8 @@ public final class Formatting {
|
||||
|
||||
private static final Pattern ILLEGAL_FIELD_CHARACTERS = Pattern.compile("[.-/]");
|
||||
|
||||
private static final Map<String, String> MANUAL_OVERRIDES = Map.of(
|
||||
"5", "five",
|
||||
"11", "eleven",
|
||||
"13", "thirteen"
|
||||
);
|
||||
public static String formatKeyAsField(String path) {
|
||||
return ILLEGAL_FIELD_CHARACTERS.matcher(MANUAL_OVERRIDES.getOrDefault(path, path).toUpperCase(Locale.ROOT)).replaceAll("_");
|
||||
return ILLEGAL_FIELD_CHARACTERS.matcher(path.toUpperCase(Locale.ROOT)).replaceAll("_");
|
||||
}
|
||||
|
||||
public static Optional<String> formatTagKey(String tagDir, String resourcePath) {
|
||||
|
@ -47,7 +47,7 @@ public final class TagCollector {
|
||||
return;
|
||||
}
|
||||
|
||||
result.put(entry.value().getTagNames()
|
||||
result.put(entry.value().listTagIds()
|
||||
.filter(tagKey -> tagKey.location().getPath().equals(path))
|
||||
.findFirst()
|
||||
.orElseThrow(), packId);
|
||||
|
@ -3,5 +3,6 @@ public net/minecraft/server/WorldLoader loadAndReplaceLayer(Lnet/minecraft/serve
|
||||
# for auto-marking experimental stuff
|
||||
public net/minecraft/core/RegistrySetBuilder entries
|
||||
public net/minecraft/core/RegistrySetBuilder$RegistryStub
|
||||
public net/minecraft/data/registries/UpdateOneTwentyOneRegistries BUILDER
|
||||
public net/minecraft/data/registries/VanillaRegistries BUILDER
|
||||
public net/minecraft/data/registries/WinterDropRegistries BUILDER
|
||||
public net/minecraft/data/registries/TradeRebalanceRegistries BUILDER
|
||||
|
@ -373,6 +373,10 @@ index 0000000000000000000000000000000000000000..00000000000000000000000000000000
|
||||
public enum Requires {
|
||||
|
||||
WINTER_DROP,
|
||||
+ TRADE_REBALANCE // Paper
|
||||
+ // Paper start
|
||||
+ TRADE_REBALANCE,
|
||||
+ REDSTONE_EXPERIMENTS,
|
||||
+ MINECART_IMPROVEMENTS
|
||||
+ // Paper end
|
||||
}
|
||||
}
|
||||
|
@ -30,6 +30,19 @@ index 0000000000000000000000000000000000000000..00000000000000000000000000000000
|
||||
public static final FeatureFlag MINECART_IMPROVEMENTS = Bukkit.getUnsafe().getFeatureFlag(NamespacedKey.minecraft("minecart_improvements"));
|
||||
|
||||
}
|
||||
diff --git a/src/main/java/org/bukkit/GameRule.java b/src/main/java/org/bukkit/GameRule.java
|
||||
index 0000000000000000000000000000000000000000..0000000000000000000000000000000000000000 100644
|
||||
--- a/src/main/java/org/bukkit/GameRule.java
|
||||
+++ b/src/main/java/org/bukkit/GameRule.java
|
||||
@@ -0,0 +0,0 @@ public final class GameRule<T> implements net.kyori.adventure.translation.Transl
|
||||
* The maximum speed of minecarts (when the new movement algorithm is
|
||||
* enabled).
|
||||
*/
|
||||
+ @MinecraftExperimental(MinecraftExperimental.Requires.MINECART_IMPROVEMENTS) // Paper - add missing annotation
|
||||
+ @org.jetbrains.annotations.ApiStatus.Experimental // Paper - add missing annotation
|
||||
public static final GameRule<Integer> MINECART_MAX_SPEED = new GameRule<>("minecartMaxSpeed", Integer.class);
|
||||
|
||||
/**
|
||||
diff --git a/src/main/java/org/bukkit/block/Crafter.java b/src/main/java/org/bukkit/block/Crafter.java
|
||||
index 0000000000000000000000000000000000000000..0000000000000000000000000000000000000000 100644
|
||||
--- a/src/main/java/org/bukkit/block/Crafter.java
|
||||
|
@ -271,6 +271,9 @@ index 0000000000000000000000000000000000000000..00000000000000000000000000000000
|
||||
+ bukkitMap.put(Breeze.class, org.bukkit.entity.Breeze.class);
|
||||
+ bukkitMap.put(net.minecraft.world.entity.animal.armadillo.Armadillo.class, org.bukkit.entity.Armadillo.class);
|
||||
+ bukkitMap.put(net.minecraft.world.entity.monster.Bogged.class, org.bukkit.entity.Bogged.class);
|
||||
+ bukkitMap.put(net.minecraft.world.entity.monster.creaking.Creaking.class, org.bukkit.entity.Creaking.class);
|
||||
+ bukkitMap.put(net.minecraft.world.entity.monster.creaking.CreakingTransient.class, org.bukkit.entity.CreakingTransient.class);
|
||||
+ bukkitMap.put(net.minecraft.world.entity.animal.AgeableWaterCreature.class, org.bukkit.entity.Squid.class); // close enough
|
||||
+ }
|
||||
+
|
||||
+ public static String getUsableName(Class<?> clazz) {
|
||||
|
Laden…
In neuem Issue referenzieren
Einen Benutzer sperren