diff --git a/build.gradle.kts b/build.gradle.kts index 4f552a4cf2..5497e7cc48 100644 --- a/build.gradle.kts +++ b/build.gradle.kts @@ -28,10 +28,6 @@ allprojects { val paperMavenPublicUrl = "https://repo.papermc.io/repository/maven-public/" -tasks.remapSpigotSources { - sourceCompatibility = 21 // TODO change default in paperweight -} - subprojects { tasks.withType { options.encoding = Charsets.UTF_8.name() diff --git a/paper-api-generator/build.gradle.kts b/paper-api-generator/build.gradle.kts index 3b86451bdc..0147a21349 100644 --- a/paper-api-generator/build.gradle.kts +++ b/paper-api-generator/build.gradle.kts @@ -1,29 +1,28 @@ -import org.spongepowered.gradle.vanilla.repository.MinecraftPlatform +import io.papermc.paperweight.PaperweightSourceGeneratorHelper +import io.papermc.paperweight.extension.PaperweightSourceGeneratorExt plugins { java - id("org.spongepowered.gradle.vanilla") version "0.2.1-SNAPSHOT" } -minecraft { - version(property("mcVersion").toString()) - platform(MinecraftPlatform.SERVER) +plugins.apply(PaperweightSourceGeneratorHelper::class) - runs { - server("generate") { - mainClass("io.papermc.generator.Main") - accessWideners(projectDir.toPath().resolve("wideners.at")) - args(projectDir.toPath().resolve("generated").toString()) - } - } +extensions.configure(PaperweightSourceGeneratorExt::class) { + atFile.set(projectDir.toPath().resolve("wideners.at").toFile()) } 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") +} + +tasks.register("generate") { + mainClass.set("io.papermc.generator.Main") + classpath(sourceSets.main.map { it.runtimeClasspath }) + args(projectDir.toPath().resolve("generated").toString()) } group = "io.papermc.paper" version = "1.0-SNAPSHOT" - diff --git a/paper-api-generator/generated/com/destroystokyo/paper/entity/ai/VanillaGoal.java b/paper-api-generator/generated/com/destroystokyo/paper/entity/ai/VanillaGoal.java index 069f2668f5..c7f171b77d 100644 --- a/paper-api-generator/generated/com/destroystokyo/paper/entity/ai/VanillaGoal.java +++ b/paper-api-generator/generated/com/destroystokyo/paper/entity/ai/VanillaGoal.java @@ -70,7 +70,7 @@ import org.jetbrains.annotations.NotNull; "unused", "SpellCheckingInspection" }) -@GeneratedFrom("1.20.4") +@GeneratedFrom("1.20.5") public interface VanillaGoal extends Goal { GoalKey RANDOM_STAND = create("random_stand", AbstractHorse.class); diff --git a/paper-api-generator/generated/io/papermc/paper/registry/keys/BiomeKeys.java b/paper-api-generator/generated/io/papermc/paper/registry/keys/BiomeKeys.java index 1c54650e44..2d2d06e2a8 100644 --- a/paper-api-generator/generated/io/papermc/paper/registry/keys/BiomeKeys.java +++ b/paper-api-generator/generated/io/papermc/paper/registry/keys/BiomeKeys.java @@ -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.jetbrains.annotations.ApiStatus; import org.jetbrains.annotations.NotNull; @@ -23,7 +24,7 @@ import org.jetbrains.annotations.NotNull; "unused", "SpellCheckingInspection" }) -@GeneratedFrom("1.20.4") +@GeneratedFrom("1.20.5") @ApiStatus.Experimental public final class BiomeKeys { /** @@ -248,6 +249,8 @@ public final class BiomeKeys { * * @apiNote This field is version-dependant and may be removed in future Minecraft versions */ + @ApiStatus.Experimental + @MinecraftExperimental("update 1.21") public static final TypedKey MANGROVE_SWAMP = create(key("mangrove_swamp")); /** @@ -402,6 +405,8 @@ public final class BiomeKeys { * * @apiNote This field is version-dependant and may be removed in future Minecraft versions */ + @ApiStatus.Experimental + @MinecraftExperimental("update 1.21") public static final TypedKey SWAMP = create(key("swamp")); /** diff --git a/paper-api-generator/generated/io/papermc/paper/registry/keys/GameEventKeys.java b/paper-api-generator/generated/io/papermc/paper/registry/keys/GameEventKeys.java index ebb0180aa0..97ee8b7e15 100644 --- a/paper-api-generator/generated/io/papermc/paper/registry/keys/GameEventKeys.java +++ b/paper-api-generator/generated/io/papermc/paper/registry/keys/GameEventKeys.java @@ -23,7 +23,7 @@ import org.jetbrains.annotations.NotNull; "unused", "SpellCheckingInspection" }) -@GeneratedFrom("1.20.4") +@GeneratedFrom("1.20.5") @ApiStatus.Experimental public final class GameEventKeys { /** diff --git a/paper-api-generator/generated/io/papermc/paper/registry/keys/StructureKeys.java b/paper-api-generator/generated/io/papermc/paper/registry/keys/StructureKeys.java index 37fc873309..91ae4dc2ff 100644 --- a/paper-api-generator/generated/io/papermc/paper/registry/keys/StructureKeys.java +++ b/paper-api-generator/generated/io/papermc/paper/registry/keys/StructureKeys.java @@ -24,7 +24,7 @@ import org.jetbrains.annotations.NotNull; "unused", "SpellCheckingInspection" }) -@GeneratedFrom("1.20.4") +@GeneratedFrom("1.20.5") @ApiStatus.Experimental public final class StructureKeys { /** diff --git a/paper-api-generator/generated/io/papermc/paper/registry/keys/StructureTypeKeys.java b/paper-api-generator/generated/io/papermc/paper/registry/keys/StructureTypeKeys.java index 7415875b0d..8e7628c6a4 100644 --- a/paper-api-generator/generated/io/papermc/paper/registry/keys/StructureTypeKeys.java +++ b/paper-api-generator/generated/io/papermc/paper/registry/keys/StructureTypeKeys.java @@ -23,7 +23,7 @@ import org.jetbrains.annotations.NotNull; "unused", "SpellCheckingInspection" }) -@GeneratedFrom("1.20.4") +@GeneratedFrom("1.20.5") @ApiStatus.Experimental public final class StructureTypeKeys { /** diff --git a/paper-api-generator/generated/io/papermc/paper/registry/keys/TrimMaterialKeys.java b/paper-api-generator/generated/io/papermc/paper/registry/keys/TrimMaterialKeys.java index a9946153a2..e52bb12173 100644 --- a/paper-api-generator/generated/io/papermc/paper/registry/keys/TrimMaterialKeys.java +++ b/paper-api-generator/generated/io/papermc/paper/registry/keys/TrimMaterialKeys.java @@ -23,7 +23,7 @@ import org.jetbrains.annotations.NotNull; "unused", "SpellCheckingInspection" }) -@GeneratedFrom("1.20.4") +@GeneratedFrom("1.20.5") @ApiStatus.Experimental public final class TrimMaterialKeys { /** diff --git a/paper-api-generator/generated/io/papermc/paper/registry/keys/TrimPatternKeys.java b/paper-api-generator/generated/io/papermc/paper/registry/keys/TrimPatternKeys.java index 5da2648555..35c4acb498 100644 --- a/paper-api-generator/generated/io/papermc/paper/registry/keys/TrimPatternKeys.java +++ b/paper-api-generator/generated/io/papermc/paper/registry/keys/TrimPatternKeys.java @@ -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.inventory.meta.trim.TrimPattern; import org.jetbrains.annotations.ApiStatus; import org.jetbrains.annotations.NotNull; @@ -23,9 +24,18 @@ import org.jetbrains.annotations.NotNull; "unused", "SpellCheckingInspection" }) -@GeneratedFrom("1.20.4") +@GeneratedFrom("1.20.5") @ApiStatus.Experimental public final class TrimPatternKeys { + /** + * {@code minecraft:bolt} + * + * @apiNote This field is version-dependant and may be removed in future Minecraft versions + */ + @ApiStatus.Experimental + @MinecraftExperimental("update 1.21") + public static final TypedKey BOLT = create(key("bolt")); + /** * {@code minecraft:coast} * @@ -47,6 +57,15 @@ public final class TrimPatternKeys { */ public static final TypedKey EYE = create(key("eye")); + /** + * {@code minecraft:flow} + * + * @apiNote This field is version-dependant and may be removed in future Minecraft versions + */ + @ApiStatus.Experimental + @MinecraftExperimental("update 1.21") + public static final TypedKey FLOW = create(key("flow")); + /** * {@code minecraft:host} * diff --git a/paper-api-generator/src/main/java/io/papermc/generator/utils/CollectingContext.java b/paper-api-generator/src/main/java/io/papermc/generator/utils/CollectingContext.java index 98f707846e..614babf9e0 100644 --- a/paper-api-generator/src/main/java/io/papermc/generator/utils/CollectingContext.java +++ b/paper-api-generator/src/main/java/io/papermc/generator/utils/CollectingContext.java @@ -6,14 +6,14 @@ import java.util.List; import net.minecraft.core.Holder; import net.minecraft.core.HolderGetter; import net.minecraft.core.Registry; -import net.minecraft.data.worldgen.BootstapContext; +import net.minecraft.data.worldgen.BootstrapContext; import net.minecraft.resources.ResourceKey; import org.checkerframework.checker.nullness.qual.NonNull; import org.checkerframework.framework.qual.DefaultQualifier; @DefaultQualifier(NonNull.class) public record CollectingContext(List> registered, - Registry registry) implements BootstapContext { + Registry registry) implements BootstrapContext { @Override public Holder.Reference register(final ResourceKey resourceKey, final @NonNull T t, final Lifecycle lifecycle) { diff --git a/paper-api-generator/wideners.at b/paper-api-generator/wideners.at index 80ce0310c6..54524a165e 100644 --- a/paper-api-generator/wideners.at +++ b/paper-api-generator/wideners.at @@ -1,7 +1,6 @@ -accessWidener v1 named -accessible method net/minecraft/server/WorldLoader loadAndReplaceLayer (Lnet/minecraft/server/packs/resources/ResourceManager;Lnet/minecraft/core/LayeredRegistryAccess;Lnet/minecraft/server/RegistryLayer;Ljava/util/List;)Lnet/minecraft/core/LayeredRegistryAccess; +public net/minecraft/server/WorldLoader loadAndReplaceLayer(Lnet/minecraft/server/packs/resources/ResourceManager;Lnet/minecraft/core/LayeredRegistryAccess;Lnet/minecraft/server/RegistryLayer;Ljava/util/List;)Lnet/minecraft/core/LayeredRegistryAccess; # for auto-marking experimental stuff -accessible field net/minecraft/core/RegistrySetBuilder entries Ljava/util/List; -accessible class net/minecraft/core/RegistrySetBuilder$RegistryStub -accessible field net/minecraft/data/registries/UpdateOneTwentyOneRegistries BUILDER Lnet/minecraft/core/RegistrySetBuilder; +public net/minecraft/core/RegistrySetBuilder entries +public net/minecraft/core/RegistrySetBuilder$RegistryStub +public net/minecraft/data/registries/UpdateOneTwentyOneRegistries BUILDER