Skip to content

Commit

Permalink
Geiger Gui Config
Browse files Browse the repository at this point in the history
Added Geiger gui configuration options
Added Digamma Diagnostic gui configuration options
  • Loading branch information
Alcatergit committed Apr 26, 2023
1 parent 27cb79e commit d79cb43
Show file tree
Hide file tree
Showing 2 changed files with 14 additions and 4 deletions.
9 changes: 9 additions & 0 deletions src/main/java/com/hbm/config/RadiationConfig.java
Original file line number Diff line number Diff line change
Expand Up @@ -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";
Expand Down Expand Up @@ -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);
}

}
9 changes: 5 additions & 4 deletions src/main/java/com/hbm/render/misc/RenderScreenOverlay.java
Original file line number Diff line number Diff line change
Expand Up @@ -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;
Expand Down Expand Up @@ -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);
Expand Down Expand Up @@ -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);
Expand Down

0 comments on commit d79cb43

Please sign in to comment.