From d79cb437355c09a6be133680ed3de20d0aee78ab Mon Sep 17 00:00:00 2001 From: Alcater Date: Wed, 26 Apr 2023 14:23:18 +0200 Subject: [PATCH] Geiger Gui Config Added Geiger gui configuration options Added Digamma Diagnostic gui configuration options --- src/main/java/com/hbm/config/RadiationConfig.java | 9 +++++++++ .../java/com/hbm/render/misc/RenderScreenOverlay.java | 9 +++++---- 2 files changed, 14 insertions(+), 4 deletions(-) diff --git a/src/main/java/com/hbm/config/RadiationConfig.java b/src/main/java/com/hbm/config/RadiationConfig.java index b99ba831b8..734b4e3594 100644 --- a/src/main/java/com/hbm/config/RadiationConfig.java +++ b/src/main/java/com/hbm/config/RadiationConfig.java @@ -20,6 +20,11 @@ public class RadiationConfig { public static int railgunUse = 250000000; public static int fireDuration = 4 * 20; public static boolean neutronActivation = true; + + public static int geigerX = 16; + public static int geigerY = 2; + public static int digammaX = 16; + public static int digammaY = 18; public static void loadFromConfig(Configuration config) { final String CATEGORY_NUKE = "06_explosions"; @@ -62,6 +67,10 @@ public static void loadFromConfig(Configuration config) { neutronActivation = CommonConfig.createConfigBool(config, CATEGORY_RAD, "7.01_itemContamination", "Whether high radiation levels should radiate items in inventory", true); + geigerX = CommonConfig.createConfigInt(config, CATEGORY_RAD, "7.02_geigerX", "X Coordinate of the geiger counter gui (x=0 is on the right)", 16); + geigerY = CommonConfig.createConfigInt(config, CATEGORY_RAD, "7.03_geigerY", "Y Coordinate of the geiger counter gui (y=0 is on the bottom)", 2); + digammaX = CommonConfig.createConfigInt(config, CATEGORY_RAD, "7.04_digammaX", "X Coordinate of the digamma diagnostic gui (x=0 is on the right)", 16); + digammaY = CommonConfig.createConfigInt(config, CATEGORY_RAD, "7.05_digammaY", "Y Coordinate of the digamma diagnostic counter gui (y=0 is on the bottom)", 18); } } diff --git a/src/main/java/com/hbm/render/misc/RenderScreenOverlay.java b/src/main/java/com/hbm/render/misc/RenderScreenOverlay.java index 7700fe4cae..b9c48a55de 100644 --- a/src/main/java/com/hbm/render/misc/RenderScreenOverlay.java +++ b/src/main/java/com/hbm/render/misc/RenderScreenOverlay.java @@ -2,6 +2,7 @@ import org.lwjgl.opengl.GL11; import com.hbm.lib.RefStrings; +import com.hbm.config.RadiationConfig; import net.minecraft.client.Minecraft; import net.minecraft.client.gui.Gui; @@ -60,8 +61,8 @@ public static void renderRadCounter(ScaledResolution resolution, float in, Gui g //if(radiation >= 1 && radiation <= 999) // bar -= (1 + Minecraft.getMinecraft().theWorld.rand.nextInt(3)); - int posX = 16; - int posY = resolution.getScaledHeight() - 18 - 2; + int posX = RadiationConfig.geigerX; + int posY = resolution.getScaledHeight() - 18 - RadiationConfig.geigerY; Minecraft.getMinecraft().renderEngine.bindTexture(misc); gui.drawTexturedModalRect(posX, posY, 0, 0, 94, 18); @@ -121,8 +122,8 @@ public static void renderDigCounter(ScaledResolution resolution, float in, Gui g //if(radiation >= 1 && radiation <= 999) // bar -= (1 + Minecraft.getMinecraft().theWorld.rand.nextInt(3)); - int posX = 16; - int posY = resolution.getScaledHeight() - 36 - 2; + int posX = RadiationConfig.digammaX; + int posY = resolution.getScaledHeight() - 36 - RadiationConfig.digammaY; Minecraft.getMinecraft().renderEngine.bindTexture(misc); gui.drawTexturedModalRect(posX, posY, 0, 218, 94, 18);