aboutsummaryrefslogtreecommitdiff
path: root/src
diff options
context:
space:
mode:
Diffstat (limited to 'src')
-rw-r--r--src/main/java/makamys/lodmod/util/Util.java12
1 files changed, 12 insertions, 0 deletions
diff --git a/src/main/java/makamys/lodmod/util/Util.java b/src/main/java/makamys/lodmod/util/Util.java
index 0a10463..ae80b78 100644
--- a/src/main/java/makamys/lodmod/util/Util.java
+++ b/src/main/java/makamys/lodmod/util/Util.java
@@ -10,8 +10,20 @@ import java.nio.file.FileSystems;
import java.nio.file.Files;
import java.nio.file.Path;
+import net.minecraft.launchwrapper.Launch;
+
public class Util {
+
+ private static boolean allowResourceOverrides = Boolean.parseBoolean(System.getProperty("lodmod.allowResourceOverrides", "false"));
+
public static Path getResourcePath(String relPath) {
+ if(allowResourceOverrides) {
+ File overrideFile = new File(new File(Launch.minecraftHome, "lodmod/resources"), relPath);
+ if(overrideFile.exists()) {
+ return overrideFile.toPath();
+ }
+ }
+
try {
URL resourceURL = Util.class.getClassLoader().getResource(relPath);