#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
|
static { // Note: even preInit is too late and we'd have to issue another resource reload
|
||||||
//#ifdef DEV_ENV
|
initJGuiResourcePack();
|
||||||
//noinspection ConstantConditions
|
}
|
||||||
if (true) {
|
|
||||||
//#else
|
private static void initJGuiResourcePack() {
|
||||||
//$$ //noinspection ConstantConditions
|
File folder = new File("../jGui/src/main/resources");
|
||||||
//$$ if (false) {
|
if (!folder.exists()) {
|
||||||
//#endif
|
return;
|
||||||
DirectoryResourcePack jGuiResourcePack = new DirectoryResourcePack(new File("../jGui/src/main/resources")) {
|
}
|
||||||
|
DirectoryResourcePack jGuiResourcePack = new DirectoryResourcePack(folder) {
|
||||||
@Override
|
@Override
|
||||||
protected InputStream openFile(String resourceName) throws IOException {
|
protected InputStream openFile(String resourceName) throws IOException {
|
||||||
try {
|
try {
|
||||||
@@ -290,7 +291,7 @@ public class ReplayMod implements
|
|||||||
//$$ };
|
//$$ };
|
||||||
//$$ defaultResourcePacks.add(mainResourcePack);
|
//$$ defaultResourcePacks.add(mainResourcePack);
|
||||||
//#endif
|
//#endif
|
||||||
}}
|
}
|
||||||
|
|
||||||
//#if FABRIC>=1
|
//#if FABRIC>=1
|
||||||
@Override
|
@Override
|
||||||
|
|||||||
@@ -76,16 +76,7 @@ public class Utils {
|
|||||||
private static Logger LOGGER = LogManager.getLogger();
|
private static Logger LOGGER = LogManager.getLogger();
|
||||||
|
|
||||||
private static InputStream getResourceAsStream(String path) {
|
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?)
|
return Utils.class.getResourceAsStream(path);
|
||||||
//#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
|
|
||||||
}
|
}
|
||||||
|
|
||||||
public static final Image DEFAULT_THUMBNAIL;
|
public static final Image DEFAULT_THUMBNAIL;
|
||||||
|
|||||||
Reference in New Issue
Block a user