okaaay let's go

This commit is contained in:
Noah van der Aa 2024-10-22 18:23:19 +02:00
parent 33ff3dff21
commit 510057a8ad
1087 changed files with 99 additions and 46 deletions

View file

@ -40,7 +40,7 @@ How To (Plugin Developers)
<dependency>
<groupId>io.papermc.paper</groupId>
<artifactId>paper-api</artifactId>
<version>1.21.1-R0.1-SNAPSHOT</version>
<version>1.21.2-R0.1-SNAPSHOT</version>
<scope>provided</scope>
</dependency>
```
@ -53,7 +53,7 @@ repositories {
}
dependencies {
compileOnly("io.papermc.paper:paper-api:1.21.1-R0.1-SNAPSHOT")
compileOnly("io.papermc.paper:paper-api:1.21.2-R0.1-SNAPSHOT")
}
java {

View file

@ -1,9 +1,9 @@
group=io.papermc.paper
version=1.21.1-R0.1-SNAPSHOT
mcVersion=1.21.1
version=1.21.2-R0.1-SNAPSHOT
mcVersion=1.21.2
# Set to true while updating Minecraft version
updatingMinecraft=false
updatingMinecraft=true
org.gradle.caching=true
org.gradle.parallel=true

View file

@ -30,6 +30,7 @@ index 0000000000000000000000000000000000000000..00000000000000000000000000000000
@@ -0,0 +0,0 @@
package org.bukkit.entity;
import org.bukkit.GameRule;
+import org.bukkit.Material;
import org.bukkit.block.data.BlockData;
import org.bukkit.material.MaterialData;

View file

@ -136,12 +136,14 @@ index 0000000000000000000000000000000000000000..00000000000000000000000000000000
+ */
+ FeatureFlag VANILLA = create("vanilla");
+ /**
+ * The {@code bundle} feature flag.
+ */
@ApiStatus.Experimental // Paper - add missing annotation
/**
* <strong>AVAILABLE BETWEEN VERSIONS:</strong> 1.19.3 - 1.21.2
@@ -0,0 +0,0 @@ public interface FeatureFlag extends Keyed {
* @deprecated not available since 1.21.2
*/
@Deprecated
- public static final FeatureFlag BUNDLE = Bukkit.getUnsafe().getFeatureFlag(NamespacedKey.minecraft("bundle"));
+ FeatureFlag BUNDLE = create("bundle");
+ FeatureFlag BUNDLE = deprecated("bundle");
/**
- * <strong>AVAILABLE BETWEEN VERSIONS:</strong> 1.19 - 1.19.4
@ -155,21 +157,35 @@ index 0000000000000000000000000000000000000000..00000000000000000000000000000000
@ApiStatus.Experimental // Paper - add missing annotation
- public static final FeatureFlag TRADE_REBALANCE = Bukkit.getUnsafe().getFeatureFlag(NamespacedKey.minecraft("trade_rebalance"));
+ FeatureFlag TRADE_REBALANCE = create("trade_rebalance");
+
- /**
- * <strong>AVAILABLE BETWEEN VERSIONS:</strong> 1.20.5 - 1.20.6
- *
- * @deprecated not available since 1.21
- */
- @Deprecated
- public static final FeatureFlag UPDATE_121 = Bukkit.getUnsafe().getFeatureFlag(NamespacedKey.minecraft("update_1_21"));
+ @Deprecated(since = "1.20")
+ FeatureFlag UPDATE_1_20 = deprecated("update_1_20");
+
+ @Deprecated(since = "1.21")
+ FeatureFlag UPDATE_121 = deprecated("update_1_21");
/**
- * <strong>AVAILABLE BETWEEN VERSIONS:</strong> 1.20.5 - 1.20.6
- *
- * @deprecated not available since 1.21
@ApiStatus.Experimental // Paper - add missing annotation
- public static final FeatureFlag WINTER_DROP = Bukkit.getUnsafe().getFeatureFlag(NamespacedKey.minecraft("winter_drop"));
+ FeatureFlag WINTER_DROP = create("winter_drop");
@ApiStatus.Experimental // Paper - add missing annotation
- public static final FeatureFlag REDSTONE_EXPERIMENTS = Bukkit.getUnsafe().getFeatureFlag(NamespacedKey.minecraft("redstone_experiments"));
+ FeatureFlag REDSTONE_EXPERIMENTS = create("redstone_experiments");
@ApiStatus.Experimental // Paper - add missing annotation
- public static final FeatureFlag MINECART_IMPROVEMENTS = Bukkit.getUnsafe().getFeatureFlag(NamespacedKey.minecraft("minecart_improvements"));
+ FeatureFlag MINECART_IMPROVEMENTS = create("minecart_improvements");
+
+ /**
+ * An index of all feature flags.
*/
- @Deprecated
- public static final FeatureFlag UPDATE_121 = Bukkit.getUnsafe().getFeatureFlag(NamespacedKey.minecraft("update_1_21"));
+ */
+ Index<Key, FeatureFlag> ALL_FLAGS = Index.create(FeatureFlag::key, List.copyOf(FeatureFlagImpl.ALL_FLAGS));
+
+ private static FeatureFlag create(@Subst("vanilla") final String name) {
@ -182,6 +198,7 @@ index 0000000000000000000000000000000000000000..00000000000000000000000000000000
+ return new FeatureFlagImpl.Deprecated(NamespacedKey.minecraft(name));
+ }
+ // Paper end - overhaul FeatureFlag API
}
diff --git a/src/main/java/org/bukkit/FeatureFlagImpl.java b/src/main/java/org/bukkit/FeatureFlagImpl.java
new file mode 100644

View file

@ -2437,6 +2437,7 @@ index 0000000000000000000000000000000000000000..00000000000000000000000000000000
public void setPlayerListName(@Nullable String name);
/**
@@ -0,0 +0,0 @@ public interface Player extends HumanEntity, Conversable, OfflinePlayer, PluginM
* Gets the currently displayed player list header for this player.
*
* @return player list header or null

View file

@ -370,9 +370,9 @@ index 0000000000000000000000000000000000000000..00000000000000000000000000000000
--- a/src/main/java/org/bukkit/MinecraftExperimental.java
+++ b/src/main/java/org/bukkit/MinecraftExperimental.java
@@ -0,0 +0,0 @@ public @interface MinecraftExperimental {
@ApiStatus.Internal
public enum Requires {
WINTER_DROP,
+ BUNDLE, TRADE_REBALANCE // Paper
}
}

View file

@ -135,7 +135,7 @@ index 0000000000000000000000000000000000000000..00000000000000000000000000000000
-
- <groupId>org.spigotmc</groupId>
- <artifactId>spigot-api</artifactId>
- <version>1.21.1-R0.1-SNAPSHOT</version>
- <version>1.21.2-R0.1-SNAPSHOT</version>
- <packaging>jar</packaging>
-
- <name>Spigot-API</name>

View file

@ -11,10 +11,10 @@ index 0000000000000000000000000000000000000000..00000000000000000000000000000000
@@ -0,0 +0,0 @@
package org.bukkit.entity;
-public interface Dolphin extends WaterMob { }
-public interface Dolphin extends Ageable, WaterMob { }
+import org.bukkit.Location;
+
+public interface Dolphin extends WaterMob { // Paper start - Dolphin API
+public interface Dolphin extends Ageable, WaterMob { // Paper start - Dolphin API
+
+ /**
+ * Gets the moistness level of this dolphin

View file

@ -8,14 +8,6 @@ diff --git a/src/main/java/org/bukkit/FeatureFlag.java b/src/main/java/org/bukki
index 0000000000000000000000000000000000000000..0000000000000000000000000000000000000000 100644
--- a/src/main/java/org/bukkit/FeatureFlag.java
+++ b/src/main/java/org/bukkit/FeatureFlag.java
@@ -0,0 +0,0 @@ public interface FeatureFlag extends Keyed {
public static final FeatureFlag VANILLA = Bukkit.getUnsafe().getFeatureFlag(NamespacedKey.minecraft("vanilla"));
+ @ApiStatus.Experimental // Paper - add missing annotation
public static final FeatureFlag BUNDLE = Bukkit.getUnsafe().getFeatureFlag(NamespacedKey.minecraft("bundle"));
/**
@@ -0,0 +0,0 @@ public interface FeatureFlag extends Keyed {
@Deprecated
public static final FeatureFlag UPDATE_1_20 = Bukkit.getUnsafe().getFeatureFlag(NamespacedKey.minecraft("update_1_20"));
@ -24,6 +16,20 @@ index 0000000000000000000000000000000000000000..00000000000000000000000000000000
public static final FeatureFlag TRADE_REBALANCE = Bukkit.getUnsafe().getFeatureFlag(NamespacedKey.minecraft("trade_rebalance"));
/**
@@ -0,0 +0,0 @@ public interface FeatureFlag extends Keyed {
@Deprecated
public static final FeatureFlag UPDATE_121 = Bukkit.getUnsafe().getFeatureFlag(NamespacedKey.minecraft("update_1_21"));
+ @ApiStatus.Experimental // Paper - add missing annotation
public static final FeatureFlag WINTER_DROP = Bukkit.getUnsafe().getFeatureFlag(NamespacedKey.minecraft("winter_drop"));
+ @ApiStatus.Experimental // Paper - add missing annotation
public static final FeatureFlag REDSTONE_EXPERIMENTS = Bukkit.getUnsafe().getFeatureFlag(NamespacedKey.minecraft("redstone_experiments"));
+ @ApiStatus.Experimental // Paper - add missing annotation
public static final FeatureFlag MINECART_IMPROVEMENTS = Bukkit.getUnsafe().getFeatureFlag(NamespacedKey.minecraft("minecart_improvements"));
}
diff --git a/src/main/java/org/bukkit/Material.java b/src/main/java/org/bukkit/Material.java
index 0000000000000000000000000000000000000000..0000000000000000000000000000000000000000 100644
--- a/src/main/java/org/bukkit/Material.java
@ -35,8 +41,8 @@ index 0000000000000000000000000000000000000000..00000000000000000000000000000000
+ @MinecraftExperimental(org.bukkit.MinecraftExperimental.Requires.BUNDLE) // Paper - add missing annotation
+ @ApiStatus.Experimental // Paper - add missing annotation
BUNDLE(16835, 1),
FISHING_ROD(4167, 1, 64),
CLOCK(14980),
WHITE_BUNDLE(12072, 1),
ORANGE_BUNDLE(18288, 1),
diff --git a/src/main/java/org/bukkit/Sound.java b/src/main/java/org/bukkit/Sound.java
index 0000000000000000000000000000000000000000..0000000000000000000000000000000000000000 100644
--- a/src/main/java/org/bukkit/Sound.java
@ -51,8 +57,12 @@ index 0000000000000000000000000000000000000000..00000000000000000000000000000000
+ @MinecraftExperimental(org.bukkit.MinecraftExperimental.Requires.BUNDLE) // Paper - add missing annotation
+ @org.jetbrains.annotations.ApiStatus.Experimental // Paper - add missing annotation
ITEM_BUNDLE_INSERT("item.bundle.insert"),
+<<<<<<< HEAD
ITEM_BUNDLE_INSERT_FAIL("item.bundle.insert_fail"),
+=======
+ @MinecraftExperimental(org.bukkit.MinecraftExperimental.Requires.BUNDLE) // Paper - add missing annotation
+ @org.jetbrains.annotations.ApiStatus.Experimental // Paper - add missing annotation
+>>>>>>> Experimental annotations change
ITEM_BUNDLE_REMOVE_ONE("item.bundle.remove_one"),
ITEM_CHORUS_FRUIT_TELEPORT("item.chorus_fruit.teleport"),
ITEM_CROP_PLANT("item.crop.plant"),

View file

@ -23,7 +23,7 @@ index 0000000000000000000000000000000000000000..00000000000000000000000000000000
+ // Paper end
+
/**
* Get the sleep ticks of the player. This value may be capped.
* Check whether a cooldown is active on the specified item.
*
diff --git a/src/main/java/org/bukkit/entity/LivingEntity.java b/src/main/java/org/bukkit/entity/LivingEntity.java
index 0000000000000000000000000000000000000000..0000000000000000000000000000000000000000 100644

View file

@ -4,6 +4,25 @@ Date: Fri, 26 Apr 2024 17:00:00 -0700
Subject: [PATCH] Fix SpawnerEntry$Equipment API
diff --git a/src/main/java/org/bukkit/Sound.java b/src/main/java/org/bukkit/Sound.java
index 0000000000000000000000000000000000000000..0000000000000000000000000000000000000000 100644
--- a/src/main/java/org/bukkit/Sound.java
+++ b/src/main/java/org/bukkit/Sound.java
@@ -0,0 +0,0 @@ public enum Sound implements Keyed, net.kyori.adventure.sound.Sound.Type { // Pa
@MinecraftExperimental(org.bukkit.MinecraftExperimental.Requires.BUNDLE) // Paper - add missing annotation
@org.jetbrains.annotations.ApiStatus.Experimental // Paper - add missing annotation
ITEM_BUNDLE_INSERT("item.bundle.insert"),
-<<<<<<< HEAD
+ @MinecraftExperimental(org.bukkit.MinecraftExperimental.Requires.BUNDLE) // Paper - add missing annotation
+ @org.jetbrains.annotations.ApiStatus.Experimental // Paper - add missing annotation
ITEM_BUNDLE_INSERT_FAIL("item.bundle.insert_fail"),
-=======
@MinecraftExperimental(org.bukkit.MinecraftExperimental.Requires.BUNDLE) // Paper - add missing annotation
@org.jetbrains.annotations.ApiStatus.Experimental // Paper - add missing annotation
->>>>>>> Experimental annotations change
ITEM_BUNDLE_REMOVE_ONE("item.bundle.remove_one"),
ITEM_CHORUS_FRUIT_TELEPORT("item.chorus_fruit.teleport"),
ITEM_CROP_PLANT("item.crop.plant"),
diff --git a/src/main/java/org/bukkit/block/spawner/SpawnerEntry.java b/src/main/java/org/bukkit/block/spawner/SpawnerEntry.java
index 0000000000000000000000000000000000000000..0000000000000000000000000000000000000000 100644
--- a/src/main/java/org/bukkit/block/spawner/SpawnerEntry.java
@ -21,9 +40,11 @@ index 0000000000000000000000000000000000000000..00000000000000000000000000000000
- * Set the loot table for the entity.
+ * Set the loot table for the spawned entity's equipment slots.
* <br>
- * To remove a loot table use null. Do not use {@link LootTables#EMPTY}
- * to clear a LootTable.
+<<<<<<< HEAD
* To remove a loot table use null.
+=======
+ * To remove a loot table use {@link LootTables#EMPTY}.
+>>>>>>> Fix SpawnerEntry$Equipment API
*
* @param table this {@link org.bukkit.entity.Mob} will have.
*/

View file

@ -1098,12 +1098,15 @@ diff --git a/src/main/java/org/bukkit/entity/Salmon.java b/src/main/java/org/buk
index 0000000000000000000000000000000000000000..0000000000000000000000000000000000000000 100644
--- a/src/main/java/org/bukkit/entity/Salmon.java
+++ b/src/main/java/org/bukkit/entity/Salmon.java
@@ -0,0 +0,0 @@ package org.bukkit.entity;
@@ -0,0 +0,0 @@ import org.jetbrains.annotations.NotNull;
/**
* Represents a salmon fish.
*/
-public interface Salmon extends Fish { }
+public interface Salmon extends io.papermc.paper.entity.SchoolableFish { } // Paper - Schooling Fish API
-public interface Salmon extends Fish {
+public interface Salmon extends io.papermc.paper.entity.SchoolableFish { // Paper - Schooling Fish API
/**
* Get the variant of this salmon.
diff --git a/src/main/java/org/bukkit/entity/TNTPrimed.java b/src/main/java/org/bukkit/entity/TNTPrimed.java
index 0000000000000000000000000000000000000000..0000000000000000000000000000000000000000 100644
--- a/src/main/java/org/bukkit/entity/TNTPrimed.java

View file

@ -13,9 +13,9 @@ index 0000000000000000000000000000000000000000..00000000000000000000000000000000
import java.util.Map;
import java.util.Set;
+import net.kyori.adventure.text.Component;
import org.bukkit.NamespacedKey;
import org.bukkit.Tag;
import org.bukkit.attribute.Attribute;
import org.bukkit.attribute.AttributeModifier;
import org.bukkit.configuration.serialization.ConfigurationSerializable;
@@ -0,0 +0,0 @@ public interface ItemMeta extends Cloneable, ConfigurationSerializable, Persiste
@NotNull
String getDisplayName();

View file

@ -22,5 +22,5 @@ index 0000000000000000000000000000000000000000..00000000000000000000000000000000
+ // Paper end
+
/**
* Get the sleep ticks of the player. This value may be capped.
* Check whether a cooldown is active on the specified item.
*

View file

@ -175,7 +175,7 @@ index 0000000000000000000000000000000000000000..00000000000000000000000000000000
- <groupId>org.spigotmc</groupId>
- <artifactId>spigot</artifactId>
- <packaging>jar</packaging>
- <version>1.21.1-R0.1-SNAPSHOT</version>
- <version>1.21.2-R0.1-SNAPSHOT</version>
- <name>Spigot</name>
- <url>https://www.spigotmc.org/</url>
-

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