mirror of
https://github.com/GTNewHorizons/lwjgl3ify.git
synced 2026-11-21 20:52:17 +00:00
Add a config, add-opens for journeymap
This commit is contained in:
1 parent
2c0cb1e203
commit
4db434f63f
4 files changed
+36
-6
No files matched your search
+2
-1
@@ -89,7 +89,8 @@ minecraft.extraRunJvmArguments.addAll(
|
||||
"--add-opens", "java.base/java.text=ALL-UNNAMED",
|
||||
"--add-opens", "java.base/java.util=ALL-UNNAMED",
|
||||
"--add-opens", "java.base/jdk.internal.reflect=ALL-UNNAMED",
|
||||
"--add-opens", "java.base/sun.nio.ch=ALL-UNNAMED"
|
||||
"--add-opens", "java.base/sun.nio.ch=ALL-UNNAMED",
|
||||
"--add-opens", "java.desktop/sun.awt.image=ALL-UNNAMED"
|
||||
)
|
||||
|
||||
for (runTask in ["runClient", "runServer", "runObfClient", "runObfServer"]) {
|
||||
|
||||
@@ -13,7 +13,8 @@
|
||||
"--add-opens", "java.base/java.text=ALL-UNNAMED",
|
||||
"--add-opens", "java.base/java.util=ALL-UNNAMED",
|
||||
"--add-opens", "java.base/jdk.internal.reflect=ALL-UNNAMED",
|
||||
"--add-opens", "java.base/sun.nio.ch=ALL-UNNAMED"
|
||||
"--add-opens", "java.base/sun.nio.ch=ALL-UNNAMED",
|
||||
"--add-opens", "java.desktop/sun.awt.image=ALL-UNNAMED"
|
||||
],
|
||||
"formatVersion": 1,
|
||||
"libraries": [
|
||||
|
||||
@@ -1,6 +1,7 @@
|
||||
package me.eigenraven.lwjgl3ify;
|
||||
|
||||
import cpw.mods.fml.common.eventhandler.SubscribeEvent;
|
||||
import me.eigenraven.lwjgl3ify.core.Config;
|
||||
import net.minecraft.client.Minecraft;
|
||||
import net.minecraftforge.client.event.RenderGameOverlayEvent;
|
||||
import net.minecraftforge.common.MinecraftForge;
|
||||
@@ -27,8 +28,12 @@ public class ClientProxy extends CommonProxy {
|
||||
public void onRenderGameOverlayTextEvent(RenderGameOverlayEvent.Text event) {
|
||||
if (Minecraft.getMinecraft().gameSettings.showDebugInfo
|
||||
&& event.type == RenderGameOverlayEvent.ElementType.TEXT) {
|
||||
event.right.add(Math.min(3, event.right.size()), javaVersion);
|
||||
event.right.add(Math.min(4, event.right.size()), lwjglVersion);
|
||||
if (Config.SHOW_LWJGL_VERSION) {
|
||||
event.right.add(Math.min(3, event.right.size()), lwjglVersion);
|
||||
}
|
||||
if (Config.SHOW_JAVA_VERSION) {
|
||||
event.right.add(Math.min(3, event.right.size()), javaVersion);
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
@@ -1,7 +1,10 @@
|
||||
package me.eigenraven.lwjgl3ify.core;
|
||||
|
||||
import java.io.File;
|
||||
import java.util.Arrays;
|
||||
import java.util.List;
|
||||
import net.minecraft.launchwrapper.Launch;
|
||||
import net.minecraftforge.common.config.Configuration;
|
||||
|
||||
public class Config {
|
||||
public static final String[] DEFAULT_EXTENSIBLE_ENUMS = new String[] {
|
||||
@@ -41,6 +44,26 @@ public class Config {
|
||||
"thaumcraft.common.entities.golems.EnumGolemType",
|
||||
};
|
||||
|
||||
// TODO: Make this an actual config file :P
|
||||
public static List<String> EXTENSIBLE_ENUMS = Arrays.asList(DEFAULT_EXTENSIBLE_ENUMS);
|
||||
public static List<String> EXTENSIBLE_ENUMS;
|
||||
|
||||
public static boolean SHOW_JAVA_VERSION = true;
|
||||
public static boolean SHOW_LWJGL_VERSION = true;
|
||||
|
||||
static {
|
||||
final Configuration config = new Configuration(new File(Launch.minecraftHome, "config/lwjgl3ify.cfg"));
|
||||
final String CATEGORY_CORE = "core";
|
||||
EXTENSIBLE_ENUMS = Arrays.asList(config.get(
|
||||
CATEGORY_CORE,
|
||||
"extensibleEnums",
|
||||
DEFAULT_EXTENSIBLE_ENUMS,
|
||||
"Enums to make extensible at runtime")
|
||||
.getStringList());
|
||||
SHOW_JAVA_VERSION = config.getBoolean(
|
||||
"showJavaVersion", CATEGORY_CORE, SHOW_JAVA_VERSION, "Show java version in the debug hud");
|
||||
SHOW_LWJGL_VERSION = config.getBoolean(
|
||||
"showLwjglVersion", CATEGORY_CORE, SHOW_LWJGL_VERSION, "Show lwjgl version in the debug hud");
|
||||
if (config.hasChanged()) {
|
||||
config.save();
|
||||
}
|
||||
}
|
||||
}
|
||||
Reference in new issue
Block a user