SPIGOT-7195, SPIGOT-7197: Add DataPack API

By: Doc <nachito94@msn.com>
This commit is contained in:
CraftBukkit/Spigot
2023-05-30 19:05:48 +10:00
parent d8a3b1e7f0
commit a345ec2e35
9 changed files with 334 additions and 0 deletions

View File

@@ -0,0 +1,29 @@
--- a/net/minecraft/server/packs/repository/ResourcePackLoader.java
+++ b/net/minecraft/server/packs/repository/ResourcePackLoader.java
@@ -20,7 +20,7 @@
private static final Logger LOGGER = LogUtils.getLogger();
private final String id;
- private final ResourcePackLoader.c resources;
+ public final ResourcePackLoader.c resources; // PAIL private -> public
private final IChatBaseComponent title;
private final IChatBaseComponent description;
private final EnumResourcePackVersion compatibility;
@@ -59,7 +59,7 @@
try {
IResourcePack iresourcepack = resourcepackloader_c.open(s);
- ResourcePackLoader.a resourcepackloader_a;
+ ResourcePackLoader.a resourcepackloader_a = null; // CraftBukkit - decompile fix
label53:
{
FeatureFlagsMetadataSection featureflagsmetadatasection;
@@ -93,7 +93,7 @@
iresourcepack.close();
}
- return featureflagsmetadatasection;
+ return resourcepackloader_a; // CraftBukkit - decompile fix
}
if (iresourcepack != null) {