Mirror von
https://github.com/PaperMC/Paper.git
synchronisiert 2024-11-15 04:20:04 +01:00
Rename leftover resource->datapack (#5662)
Dieser Commit ist enthalten in:
Ursprung
ec90a78595
Commit
6ecbe57765
@ -4,13 +4,13 @@ Date: Sun, 16 May 2021 15:07:34 +0100
|
||||
Subject: [PATCH] Add basic Datapack API
|
||||
|
||||
|
||||
diff --git a/src/main/java/io/papermc/paper/resource/Datapack.java b/src/main/java/io/papermc/paper/resource/Datapack.java
|
||||
diff --git a/src/main/java/io/papermc/paper/datapack/Datapack.java b/src/main/java/io/papermc/paper/datapack/Datapack.java
|
||||
new file mode 100644
|
||||
index 0000000000000000000000000000000000000000..5233057bf1ee10da28d7c3b9c36665616650b1ea
|
||||
index 0000000000000000000000000000000000000000..7b2ab0be10a21e0496ad1d485ff8cb2c0b92a2cb
|
||||
--- /dev/null
|
||||
+++ b/src/main/java/io/papermc/paper/resource/Datapack.java
|
||||
+++ b/src/main/java/io/papermc/paper/datapack/Datapack.java
|
||||
@@ -0,0 +1,32 @@
|
||||
+package io.papermc.paper.resource;
|
||||
+package io.papermc.paper.datapack;
|
||||
+
|
||||
+import org.checkerframework.checker.nullness.qual.NonNull;
|
||||
+
|
||||
@ -42,13 +42,13 @@ index 0000000000000000000000000000000000000000..5233057bf1ee10da28d7c3b9c3666561
|
||||
+ }
|
||||
+
|
||||
+}
|
||||
diff --git a/src/main/java/io/papermc/paper/resource/DatapackManager.java b/src/main/java/io/papermc/paper/resource/DatapackManager.java
|
||||
diff --git a/src/main/java/io/papermc/paper/datapack/DatapackManager.java b/src/main/java/io/papermc/paper/datapack/DatapackManager.java
|
||||
new file mode 100644
|
||||
index 0000000000000000000000000000000000000000..b404e1a0d0afbf6297cc0c2623696fac26bcbc08
|
||||
index 0000000000000000000000000000000000000000..58f78d5e91beacaf710f62461cf869f70d08b2a2
|
||||
--- /dev/null
|
||||
+++ b/src/main/java/io/papermc/paper/resource/DatapackManager.java
|
||||
+++ b/src/main/java/io/papermc/paper/datapack/DatapackManager.java
|
||||
@@ -0,0 +1,21 @@
|
||||
+package io.papermc.paper.resource;
|
||||
+package io.papermc.paper.datapack;
|
||||
+
|
||||
+import org.checkerframework.checker.nullness.qual.NonNull;
|
||||
+
|
||||
@ -70,7 +70,7 @@ index 0000000000000000000000000000000000000000..b404e1a0d0afbf6297cc0c2623696fac
|
||||
+
|
||||
+}
|
||||
diff --git a/src/main/java/org/bukkit/Bukkit.java b/src/main/java/org/bukkit/Bukkit.java
|
||||
index 5f7208196684d9c8373df28b7cfb5f9e21baa41e..bd834cd9b1d05327da195b76719e90ac14943dbb 100644
|
||||
index 5f7208196684d9c8373df28b7cfb5f9e21baa41e..33f04d57b7df3a6f9743246ba9af6d67f4fa4b54 100644
|
||||
--- a/src/main/java/org/bukkit/Bukkit.java
|
||||
+++ b/src/main/java/org/bukkit/Bukkit.java
|
||||
@@ -1937,6 +1937,14 @@ public final class Bukkit {
|
||||
@ -79,17 +79,17 @@ index 5f7208196684d9c8373df28b7cfb5f9e21baa41e..bd834cd9b1d05327da195b76719e90ac
|
||||
}
|
||||
+
|
||||
+ /**
|
||||
+ * @return the resource pack manager
|
||||
+ * @return the datapack manager
|
||||
+ */
|
||||
+ @NotNull
|
||||
+ public static io.papermc.paper.resource.DatapackManager getDatapackManager() {
|
||||
+ public static io.papermc.paper.datapack.DatapackManager getDatapackManager() {
|
||||
+ return server.getDatapackManager();
|
||||
+ }
|
||||
// Paper end
|
||||
|
||||
@NotNull
|
||||
diff --git a/src/main/java/org/bukkit/Server.java b/src/main/java/org/bukkit/Server.java
|
||||
index f3e27d2d02a9407bb1b091b8c1125ad5abf99e55..5f2b9a91b03a3e8b2dc5ce7743e31bea882500e4 100644
|
||||
index f3e27d2d02a9407bb1b091b8c1125ad5abf99e55..35ec8a060c2a2d2d48477b1bb940db51d18bf38e 100644
|
||||
--- a/src/main/java/org/bukkit/Server.java
|
||||
+++ b/src/main/java/org/bukkit/Server.java
|
||||
@@ -1698,5 +1698,11 @@ public interface Server extends PluginMessageRecipient, net.kyori.adventure.audi
|
||||
@ -98,9 +98,9 @@ index f3e27d2d02a9407bb1b091b8c1125ad5abf99e55..5f2b9a91b03a3e8b2dc5ce7743e31bea
|
||||
com.destroystokyo.paper.entity.ai.MobGoals getMobGoals();
|
||||
+
|
||||
+ /**
|
||||
+ * @return the resource pack manager
|
||||
+ * @return the datapack manager
|
||||
+ */
|
||||
+ @NotNull
|
||||
+ io.papermc.paper.resource.DatapackManager getDatapackManager();
|
||||
+ io.papermc.paper.datapack.DatapackManager getDatapackManager();
|
||||
// Paper end
|
||||
}
|
||||
|
@ -4,13 +4,13 @@ Date: Sun, 16 May 2021 15:07:34 +0100
|
||||
Subject: [PATCH] Add basic Datapack API
|
||||
|
||||
|
||||
diff --git a/src/main/java/io/papermc/paper/resource/PaperDatapack.java b/src/main/java/io/papermc/paper/resource/PaperDatapack.java
|
||||
diff --git a/src/main/java/io/papermc/paper/datapack/PaperDatapack.java b/src/main/java/io/papermc/paper/datapack/PaperDatapack.java
|
||||
new file mode 100644
|
||||
index 0000000000000000000000000000000000000000..3108efce8657db84329eceae43a10532f3d1f8d9
|
||||
index 0000000000000000000000000000000000000000..6426f646afdd2a75df89d522068a36cf170d697d
|
||||
--- /dev/null
|
||||
+++ b/src/main/java/io/papermc/paper/resource/PaperDatapack.java
|
||||
+++ b/src/main/java/io/papermc/paper/datapack/PaperDatapack.java
|
||||
@@ -0,0 +1,51 @@
|
||||
+package io.papermc.paper.resource;
|
||||
+package io.papermc.paper.datapack;
|
||||
+
|
||||
+import io.papermc.paper.event.server.ServerResourcesReloadedEvent;
|
||||
+import net.minecraft.server.MinecraftServer;
|
||||
@ -61,13 +61,13 @@ index 0000000000000000000000000000000000000000..3108efce8657db84329eceae43a10532
|
||||
+ server.reloadServerResources(enabledKeys, ServerResourcesReloadedEvent.Cause.PLUGIN);
|
||||
+ }
|
||||
+}
|
||||
diff --git a/src/main/java/io/papermc/paper/resource/PaperDatapackManager.java b/src/main/java/io/papermc/paper/resource/PaperDatapackManager.java
|
||||
diff --git a/src/main/java/io/papermc/paper/datapack/PaperDatapackManager.java b/src/main/java/io/papermc/paper/datapack/PaperDatapackManager.java
|
||||
new file mode 100644
|
||||
index 0000000000000000000000000000000000000000..5c4858dfc5a416c88c1dedca5d59ee72dd8aa0ca
|
||||
index 0000000000000000000000000000000000000000..378aaeebd7e011565fdc505da68c5b5285339add
|
||||
--- /dev/null
|
||||
+++ b/src/main/java/io/papermc/paper/resource/PaperDatapackManager.java
|
||||
+++ b/src/main/java/io/papermc/paper/datapack/PaperDatapackManager.java
|
||||
@@ -0,0 +1,26 @@
|
||||
+package io.papermc.paper.resource;
|
||||
+package io.papermc.paper.datapack;
|
||||
+
|
||||
+import net.minecraft.server.packs.repository.ResourcePackLoader;
|
||||
+import net.minecraft.server.packs.repository.ResourcePackRepository;
|
||||
@ -134,14 +134,14 @@ index e87523612d0423d71eab7b9af851c1c268cdf84f..568da9686c41a41e43ede3fe15e0ca53
|
||||
return this.c;
|
||||
}
|
||||
diff --git a/src/main/java/org/bukkit/craftbukkit/CraftServer.java b/src/main/java/org/bukkit/craftbukkit/CraftServer.java
|
||||
index 6cc8eb04f42592aa12f76bb4a0a863ea509741b2..554d13d65952af1b98db074ebc4a2d90474029f6 100644
|
||||
index 6cc8eb04f42592aa12f76bb4a0a863ea509741b2..edeb3e542c2e32379a5fb4229b389ad4a4987dbb 100644
|
||||
--- a/src/main/java/org/bukkit/craftbukkit/CraftServer.java
|
||||
+++ b/src/main/java/org/bukkit/craftbukkit/CraftServer.java
|
||||
@@ -18,6 +18,7 @@ import com.mojang.serialization.Lifecycle;
|
||||
import io.netty.buffer.ByteBuf;
|
||||
import io.netty.buffer.ByteBufOutputStream;
|
||||
import io.netty.buffer.Unpooled;
|
||||
+import io.papermc.paper.resource.PaperDatapackManager; // Paper
|
||||
+import io.papermc.paper.datapack.PaperDatapackManager; // Paper
|
||||
import io.papermc.paper.util.TraceUtil;
|
||||
import it.unimi.dsi.fastutil.objects.Object2ObjectLinkedOpenHashMap;
|
||||
import java.awt.image.BufferedImage;
|
||||
|
Laden…
In neuem Issue referenzieren
Einen Benutzer sperren