Rename leftover resource->datapack (#5662)

This commit is contained in:
Nassim Jahnke 2021-05-17 08:59:20 +02:00
parent 2d83abfdc1
commit 54608e4fe2
2 changed files with 17 additions and 17 deletions

View file

@ -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..0000000000000000000000000000000000000000
--- /dev/null
+++ b/src/main/java/io/papermc/paper/resource/Datapack.java
+++ b/src/main/java/io/papermc/paper/datapack/Datapack.java
@@ -0,0 +0,0 @@
+package io.papermc.paper.resource;
+package io.papermc.paper.datapack;
+
+import org.checkerframework.checker.nullness.qual.NonNull;
+
@ -42,13 +42,13 @@ index 0000000000000000000000000000000000000000..00000000000000000000000000000000
+ }
+
+}
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..0000000000000000000000000000000000000000
--- /dev/null
+++ b/src/main/java/io/papermc/paper/resource/DatapackManager.java
+++ b/src/main/java/io/papermc/paper/datapack/DatapackManager.java
@@ -0,0 +0,0 @@
+package io.papermc.paper.resource;
+package io.papermc.paper.datapack;
+
+import org.checkerframework.checker.nullness.qual.NonNull;
+
@ -79,10 +79,10 @@ index 0000000000000000000000000000000000000000..00000000000000000000000000000000
}
+
+ /**
+ * @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
@ -98,9 +98,9 @@ index 0000000000000000000000000000000000000000..00000000000000000000000000000000
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
}

View file

@ -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..0000000000000000000000000000000000000000
--- /dev/null
+++ b/src/main/java/io/papermc/paper/resource/PaperDatapack.java
+++ b/src/main/java/io/papermc/paper/datapack/PaperDatapack.java
@@ -0,0 +0,0 @@
+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..00000000000000000000000000000000
+ 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..0000000000000000000000000000000000000000
--- /dev/null
+++ b/src/main/java/io/papermc/paper/resource/PaperDatapackManager.java
+++ b/src/main/java/io/papermc/paper/datapack/PaperDatapackManager.java
@@ -0,0 +0,0 @@
+package io.papermc.paper.resource;
+package io.papermc.paper.datapack;
+
+import net.minecraft.server.packs.repository.ResourcePackLoader;
+import net.minecraft.server.packs.repository.ResourcePackRepository;
@ -141,7 +141,7 @@ index 0000000000000000000000000000000000000000..00000000000000000000000000000000
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;