mirror of
https://github.com/PaperMC/Paper.git
synced 2024-12-30 16:19:03 +01:00
Updated Upstream (Bukkit/CraftBukkit)
Upstream has released updates that appear to apply and compile correctly. This update has not been tested by PaperMC and as with ANY update, please do your own testing Bukkit Changes: 5dbedae1 PR-864: Fix Registry#match() failing namespaced inputs 49256865 PR-863: Fix boolean PersistentDataType 9f15450b SPIGOT-7195, SPIGOT-7197: Add DataPack API ebef5b6a Disable InterfaceIsType Checkstyle check 01d577f5 Slight tweak to boolean PersistentDataType javadoc d2b99e56 PR-857: Add boolean PersistentDataType CraftBukkit Changes: 2270366cd PR-1196: Test Registry instances more thoroughly 863dacb7a PR-1191: Do not start on pre-release Java 17 1f2dd8e12 SPIGOT-7362: Properly handle null in CraftBlock#blockFaceToNotch() dbc70bed5 SPIGOT-7195, SPIGOT-7197: Add DataPack API
This commit is contained in:
parent
c137b5dc31
commit
1b571414da
10 changed files with 72 additions and 14 deletions
|
@ -73,6 +73,18 @@ diff --git a/src/main/java/org/bukkit/Bukkit.java b/src/main/java/org/bukkit/Buk
|
|||
index 0000000000000000000000000000000000000000..0000000000000000000000000000000000000000 100644
|
||||
--- a/src/main/java/org/bukkit/Bukkit.java
|
||||
+++ b/src/main/java/org/bukkit/Bukkit.java
|
||||
@@ -0,0 +0,0 @@ public final class Bukkit {
|
||||
/**
|
||||
* Get the DataPack Manager.
|
||||
*
|
||||
+ * @deprecated use {@link #getDatapackManager()}
|
||||
* @return the manager
|
||||
*/
|
||||
@NotNull
|
||||
+ @Deprecated(forRemoval = true)
|
||||
public static DataPackManager getDataPackManager() {
|
||||
return server.getDataPackManager();
|
||||
}
|
||||
@@ -0,0 +0,0 @@ public final class Bukkit {
|
||||
public static com.destroystokyo.paper.entity.ai.MobGoals getMobGoals() {
|
||||
return server.getMobGoals();
|
||||
|
@ -92,6 +104,18 @@ diff --git a/src/main/java/org/bukkit/Server.java b/src/main/java/org/bukkit/Ser
|
|||
index 0000000000000000000000000000000000000000..0000000000000000000000000000000000000000 100644
|
||||
--- a/src/main/java/org/bukkit/Server.java
|
||||
+++ b/src/main/java/org/bukkit/Server.java
|
||||
@@ -0,0 +0,0 @@ public interface Server extends PluginMessageRecipient, net.kyori.adventure.audi
|
||||
/**
|
||||
* Get the DataPack Manager.
|
||||
*
|
||||
+ * @deprecated use {@link #getDatapackManager()}
|
||||
* @return the manager
|
||||
*/
|
||||
@NotNull
|
||||
+ @Deprecated(forRemoval = true) // Paper
|
||||
public DataPackManager getDataPackManager();
|
||||
|
||||
/**
|
||||
@@ -0,0 +0,0 @@ public interface Server extends PluginMessageRecipient, net.kyori.adventure.audi
|
||||
*/
|
||||
@NotNull
|
||||
|
@ -104,3 +128,33 @@ index 0000000000000000000000000000000000000000..00000000000000000000000000000000
|
|||
+ io.papermc.paper.datapack.DatapackManager getDatapackManager();
|
||||
// Paper end
|
||||
}
|
||||
diff --git a/src/main/java/org/bukkit/packs/DataPack.java b/src/main/java/org/bukkit/packs/DataPack.java
|
||||
index 0000000000000000000000000000000000000000..0000000000000000000000000000000000000000 100644
|
||||
--- a/src/main/java/org/bukkit/packs/DataPack.java
|
||||
+++ b/src/main/java/org/bukkit/packs/DataPack.java
|
||||
@@ -0,0 +0,0 @@ import org.jetbrains.annotations.NotNull;
|
||||
|
||||
/**
|
||||
* Represents a data pack.
|
||||
+ * @deprecated use {@link io.papermc.paper.datapack.Datapack}
|
||||
*/
|
||||
@ApiStatus.Experimental
|
||||
+@Deprecated(forRemoval = true) // Paper
|
||||
public interface DataPack extends Keyed {
|
||||
|
||||
/**
|
||||
diff --git a/src/main/java/org/bukkit/packs/DataPackManager.java b/src/main/java/org/bukkit/packs/DataPackManager.java
|
||||
index 0000000000000000000000000000000000000000..0000000000000000000000000000000000000000 100644
|
||||
--- a/src/main/java/org/bukkit/packs/DataPackManager.java
|
||||
+++ b/src/main/java/org/bukkit/packs/DataPackManager.java
|
||||
@@ -0,0 +0,0 @@ import org.jetbrains.annotations.Nullable;
|
||||
|
||||
/**
|
||||
* Manager of data packs.
|
||||
+ * @deprecated use {@link io.papermc.paper.datapack.DatapackManager}
|
||||
*/
|
||||
@ApiStatus.Experimental
|
||||
+@Deprecated(forRemoval = true) // Paper
|
||||
public interface DataPackManager {
|
||||
|
||||
/**
|
||||
|
|
|
@ -331,7 +331,7 @@ index 0000000000000000000000000000000000000000..00000000000000000000000000000000
|
|||
public String getTranslationKey() {
|
||||
return Bukkit.getUnsafe().getTranslationKey(this);
|
||||
}
|
||||
+
|
||||
|
||||
+ // Paper start
|
||||
+ /**
|
||||
+ * @throws IllegalArgumentException if the entity does not have a translation key (is probably a custom entity)
|
||||
|
@ -342,7 +342,10 @@ index 0000000000000000000000000000000000000000..00000000000000000000000000000000
|
|||
+ return org.bukkit.Bukkit.getUnsafe().getTranslationKey(this);
|
||||
+ }
|
||||
+ // Paper end
|
||||
}
|
||||
+
|
||||
/**
|
||||
* Gets if this EntityType is enabled by feature in a world.
|
||||
*
|
||||
diff --git a/src/main/java/org/bukkit/entity/Villager.java b/src/main/java/org/bukkit/entity/Villager.java
|
||||
index 0000000000000000000000000000000000000000..0000000000000000000000000000000000000000 100644
|
||||
--- a/src/main/java/org/bukkit/entity/Villager.java
|
||||
|
|
|
@ -1429,7 +1429,7 @@ diff --git a/src/main/java/org/bukkit/UnsafeValues.java b/src/main/java/org/bukk
|
|||
index 0000000000000000000000000000000000000000..0000000000000000000000000000000000000000 100644
|
||||
--- a/src/main/java/org/bukkit/UnsafeValues.java
|
||||
+++ b/src/main/java/org/bukkit/UnsafeValues.java
|
||||
@@ -0,0 +0,0 @@ import org.bukkit.plugin.PluginDescriptionFile;
|
||||
@@ -0,0 +0,0 @@ import org.jetbrains.annotations.Nullable;
|
||||
*/
|
||||
@Deprecated
|
||||
public interface UnsafeValues {
|
||||
|
|
|
@ -59,4 +59,5 @@ index 0000000000000000000000000000000000000000..00000000000000000000000000000000
|
|||
+ return org.bukkit.Bukkit.getUnsafe().getDefaultEntityAttributes(this.key);
|
||||
+ }
|
||||
// Paper end
|
||||
}
|
||||
|
||||
/**
|
||||
|
|
|
@ -1322,9 +1322,9 @@ index 0000000000000000000000000000000000000000..00000000000000000000000000000000
|
|||
--- a/src/main/java/org/bukkit/UnsafeValues.java
|
||||
+++ b/src/main/java/org/bukkit/UnsafeValues.java
|
||||
@@ -0,0 +0,0 @@ public interface UnsafeValues {
|
||||
String getTranslationKey(EntityType entityType);
|
||||
|
||||
String getTranslationKey(ItemStack itemStack);
|
||||
@Nullable
|
||||
FeatureFlag getFeatureFlag(@NotNull NamespacedKey key);
|
||||
+
|
||||
+ // Paper start
|
||||
+ @Deprecated(forRemoval = true)
|
||||
|
|
|
@ -6853,8 +6853,8 @@ index 0000000000000000000000000000000000000000..00000000000000000000000000000000
|
|||
+ }
|
||||
+ // Paper end
|
||||
|
||||
/**
|
||||
* This helper class represents the different NBT Tags.
|
||||
@Override
|
||||
public FeatureFlag getFeatureFlag(NamespacedKey namespacedKey) {
|
||||
diff --git a/src/main/resources/META-INF/services/io.papermc.paper.plugin.entrypoint.classloader.ClassloaderBytecodeModifier b/src/main/resources/META-INF/services/io.papermc.paper.plugin.entrypoint.classloader.ClassloaderBytecodeModifier
|
||||
new file mode 100644
|
||||
index 0000000000000000000000000000000000000000..0000000000000000000000000000000000000000
|
||||
|
|
|
@ -16,6 +16,6 @@ index 0000000000000000000000000000000000000000..00000000000000000000000000000000
|
|||
- System.err.println("Unsupported Java detected (" + javaVersion + "). Only up to Java 20 is supported.");
|
||||
- return;
|
||||
- }
|
||||
|
||||
try {
|
||||
// Paper start - Handled by TerminalConsoleAppender
|
||||
String javaVersionName = System.getProperty("java.version");
|
||||
// J2SE SDK/JRE Version String Naming Convention
|
||||
boolean isPreRelease = javaVersionName.contains("-");
|
||||
|
|
|
@ -2063,8 +2063,8 @@ index 0000000000000000000000000000000000000000..00000000000000000000000000000000
|
|||
public static byte toLegacyData(BlockState data) {
|
||||
return CraftLegacy.toLegacyData(data);
|
||||
@@ -0,0 +0,0 @@ public final class CraftMagicNumbers implements UnsafeValues {
|
||||
return CraftFeatureFlag.getFromNMS(namespacedKey);
|
||||
}
|
||||
// Paper end
|
||||
|
||||
+ // Paper start
|
||||
+ @Override
|
||||
|
|
|
@ -1 +1 @@
|
|||
Subproject commit 4727d326da2bcd87ae2a6e6d6dd0cc5249c0288f
|
||||
Subproject commit 5dbedae1cbbc70791dcfc374c4c8da35db309a44
|
|
@ -1 +1 @@
|
|||
Subproject commit b346a5f6dd890c8ecfff2323082a8178c4fffa62
|
||||
Subproject commit 2270366cdd98ff02eaa62212b7881084feadd764
|
Loading…
Reference in a new issue