#ifdef DEV_ENV is no longer applicable since 8bc0b0a
There is no longer a dedicated "core" project where DEV_ENV would be defined, instead whichever is the currently selected version automatically becomes the main project using the main src folder.
This commit is contained in:
@@ -236,14 +236,15 @@ public class ReplayMod implements
|
||||
}
|
||||
|
||||
static { // Note: even preInit is too late and we'd have to issue another resource reload
|
||||
//#ifdef DEV_ENV
|
||||
//noinspection ConstantConditions
|
||||
if (true) {
|
||||
//#else
|
||||
//$$ //noinspection ConstantConditions
|
||||
//$$ if (false) {
|
||||
//#endif
|
||||
DirectoryResourcePack jGuiResourcePack = new DirectoryResourcePack(new File("../jGui/src/main/resources")) {
|
||||
initJGuiResourcePack();
|
||||
}
|
||||
|
||||
private static void initJGuiResourcePack() {
|
||||
File folder = new File("../jGui/src/main/resources");
|
||||
if (!folder.exists()) {
|
||||
return;
|
||||
}
|
||||
DirectoryResourcePack jGuiResourcePack = new DirectoryResourcePack(folder) {
|
||||
@Override
|
||||
protected InputStream openFile(String resourceName) throws IOException {
|
||||
try {
|
||||
@@ -290,7 +291,7 @@ public class ReplayMod implements
|
||||
//$$ };
|
||||
//$$ defaultResourcePacks.add(mainResourcePack);
|
||||
//#endif
|
||||
}}
|
||||
}
|
||||
|
||||
//#if FABRIC>=1
|
||||
@Override
|
||||
|
||||
@@ -76,16 +76,7 @@ public class Utils {
|
||||
private static Logger LOGGER = LogManager.getLogger();
|
||||
|
||||
private static InputStream getResourceAsStream(String path) {
|
||||
// FIXME this seems broken in 1.13, hence the workaround. probably want to open an issue with modlauncher (or forge?)
|
||||
//#ifdef DEV_ENV
|
||||
try {
|
||||
return new java.io.FileInputStream(new File("../src/main/resources" + path));
|
||||
} catch (java.io.FileNotFoundException e) {
|
||||
throw new RuntimeException(e);
|
||||
}
|
||||
//#else
|
||||
//$$ return Utils.class.getResourceAsStream(path);
|
||||
//#endif
|
||||
return Utils.class.getResourceAsStream(path);
|
||||
}
|
||||
|
||||
public static final Image DEFAULT_THUMBNAIL;
|
||||
|
||||
Reference in New Issue
Block a user