aboutsummaryrefslogtreecommitdiff
path: root/src/main
diff options
context:
space:
mode:
Diffstat (limited to 'src/main')
-rw-r--r--src/main/java/makamys/neodymium/Config.java3
-rw-r--r--src/main/java/makamys/neodymium/MixinConfigPlugin.java8
-rw-r--r--src/main/java/makamys/neodymium/Neodymium.java9
-rw-r--r--src/main/java/makamys/neodymium/mixin/MixinGuiMainMenu.java23
4 files changed, 41 insertions, 2 deletions
diff --git a/src/main/java/makamys/neodymium/Config.java b/src/main/java/makamys/neodymium/Config.java
index 6c72fde..6c11def 100644
--- a/src/main/java/makamys/neodymium/Config.java
+++ b/src/main/java/makamys/neodymium/Config.java
@@ -51,6 +51,9 @@ public class Config {
@ConfigBoolean(cat="render", def=true, com="Render fog? Slightly reduces framerate.")
public static boolean renderFog;
+ @ConfigBoolean(cat="misc", def=true, com="Replace splash that says 'OpenGL 1.2!' with 'OpenGL 3.3!'. Just for fun.")
+ public static boolean replaceOpenGLSplash;
+
@ConfigInt(cat="debug", def=-1, min=-1, max=Integer.MAX_VALUE)
public static int maxMeshesPerFrame;
@ConfigInt(cat="debug", def=Keyboard.KEY_F4, min=-1, max=Integer.MAX_VALUE, com="The LWJGL keycode of the key that has to be held down while pressing the debug keybinds. Setting this to 0 will make the keybinds usable without holding anything else down. Setting this to -1 will disable debug keybinds entirely.")
diff --git a/src/main/java/makamys/neodymium/MixinConfigPlugin.java b/src/main/java/makamys/neodymium/MixinConfigPlugin.java
index 38d6304..b745944 100644
--- a/src/main/java/makamys/neodymium/MixinConfigPlugin.java
+++ b/src/main/java/makamys/neodymium/MixinConfigPlugin.java
@@ -14,7 +14,9 @@ import makamys.neodymium.util.OFUtil;
public class MixinConfigPlugin implements IMixinConfigPlugin {
@Override
- public void onLoad(String mixinPackage) {}
+ public void onLoad(String mixinPackage) {
+ Config.reloadConfig();
+ }
@Override
public String getRefMapperConfig() {
@@ -41,6 +43,10 @@ public class MixinConfigPlugin implements IMixinConfigPlugin {
mixins.add("MixinRenderGlobal_OptiFine");
}
+ if(Config.replaceOpenGLSplash) {
+ mixins.add("MixinGuiMainMenu");
+ }
+
return mixins;
}
diff --git a/src/main/java/makamys/neodymium/Neodymium.java b/src/main/java/makamys/neodymium/Neodymium.java
index e8a0c5c..ce2f8eb 100644
--- a/src/main/java/makamys/neodymium/Neodymium.java
+++ b/src/main/java/makamys/neodymium/Neodymium.java
@@ -54,7 +54,6 @@ public class Neodymium
public void preInit(FMLPreInitializationEvent event)
{
MCLibModules.updateCheckAPI.submitModTask(MODID, "@UPDATE_URL@");
- Config.reloadConfig();
}
@EventHandler
@@ -169,4 +168,12 @@ public class Neodymium
return !isActive() || (isActive() && renderer.renderWorld && !renderer.rendererActive);
}
+ public static String modifySplash(String splash) {
+ if(splash.equals("OpenGL 1.2!")) {
+ return "OpenGL 3.3!";
+ } else {
+ return splash;
+ }
+ }
+
}
diff --git a/src/main/java/makamys/neodymium/mixin/MixinGuiMainMenu.java b/src/main/java/makamys/neodymium/mixin/MixinGuiMainMenu.java
new file mode 100644
index 0000000..27f6b07
--- /dev/null
+++ b/src/main/java/makamys/neodymium/mixin/MixinGuiMainMenu.java
@@ -0,0 +1,23 @@
+package makamys.neodymium.mixin;
+
+import org.spongepowered.asm.mixin.Mixin;
+import org.spongepowered.asm.mixin.Shadow;
+import org.spongepowered.asm.mixin.injection.At;
+import org.spongepowered.asm.mixin.injection.Inject;
+import org.spongepowered.asm.mixin.injection.callback.CallbackInfo;
+
+import makamys.neodymium.Neodymium;
+import net.minecraft.client.gui.GuiMainMenu;
+
+@Mixin(GuiMainMenu.class)
+abstract class MixinGuiMainMenu {
+
+ @Shadow
+ private String splashText;
+
+ @Inject(method = "<init>*", at = @At("RETURN"))
+ private void postConstructor(CallbackInfo ci) {
+ splashText = Neodymium.modifySplash(splashText);
+ }
+
+}