aboutsummaryrefslogtreecommitdiffhomepage
path: root/paper-server/patches/unapplied/net/minecraft/server/packs/VanillaPackResourcesBuilder.java.patch
blob: 5f4418300b790738e34b4d299c63e3528271a721 (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
--- a/net/minecraft/server/packs/VanillaPackResourcesBuilder.java
+++ b/net/minecraft/server/packs/VanillaPackResourcesBuilder.java
@@ -138,6 +138,15 @@
 
     public VanillaPackResourcesBuilder applyDevelopmentConfig() {
         developmentConfig.accept(this);
+        if (Boolean.getBoolean("Paper.pushPaperAssetsRoot")) {
+            try {
+                this.pushAssetPath(net.minecraft.server.packs.PackType.SERVER_DATA, net.minecraft.server.packs.VanillaPackResourcesBuilder.safeGetPath(java.util.Objects.requireNonNull(
+                    // Important that this is a patched class
+                    VanillaPackResourcesBuilder.class.getResource("/data/.paperassetsroot"), "Missing required .paperassetsroot file").toURI()).getParent());
+            } catch (java.net.URISyntaxException | IOException ex) {
+                throw new RuntimeException(ex);
+            }
+        }
         return this;
     }