Added config for ChargeHud
This commit is contained in:
parent
afdbe69d18
commit
0ac115b0e1
2 changed files with 14 additions and 1 deletions
|
@ -2,6 +2,7 @@ package techreborn.client.hud;
|
||||||
|
|
||||||
import org.lwjgl.opengl.GL11;
|
import org.lwjgl.opengl.GL11;
|
||||||
|
|
||||||
|
import techreborn.config.ConfigTechReborn;
|
||||||
import ic2.api.item.ElectricItem;
|
import ic2.api.item.ElectricItem;
|
||||||
import ic2.api.item.IElectricItem;
|
import ic2.api.item.IElectricItem;
|
||||||
import ic2.api.item.IElectricItemManager;
|
import ic2.api.item.IElectricItemManager;
|
||||||
|
@ -41,7 +42,7 @@ public class ChargeHud
|
||||||
ItemStack stack = player.getCurrentArmor(2);;
|
ItemStack stack = player.getCurrentArmor(2);;
|
||||||
if(stack != null)
|
if(stack != null)
|
||||||
{
|
{
|
||||||
if((stack.getItem() instanceof IElectricItem))
|
if((stack.getItem() instanceof IElectricItem) && ConfigTechReborn.ShowChargeHud)
|
||||||
{
|
{
|
||||||
double MaxCharge = ((IElectricItem) stack.getItem()).getMaxCharge(stack);
|
double MaxCharge = ((IElectricItem) stack.getItem()).getMaxCharge(stack);
|
||||||
double CurrentCharge = ElectricItem.manager.getCharge(stack);
|
double CurrentCharge = ElectricItem.manager.getCharge(stack);
|
||||||
|
|
|
@ -137,6 +137,9 @@ public class ConfigTechReborn {
|
||||||
public static boolean UUrecipesTitaniumDust;
|
public static boolean UUrecipesTitaniumDust;
|
||||||
public static boolean UUrecipesAluminumDust;
|
public static boolean UUrecipesAluminumDust;
|
||||||
|
|
||||||
|
// Client
|
||||||
|
public static boolean ShowChargeHud;
|
||||||
|
|
||||||
public static Configuration config;
|
public static Configuration config;
|
||||||
|
|
||||||
private ConfigTechReborn(File configFile) {
|
private ConfigTechReborn(File configFile) {
|
||||||
|
@ -1036,6 +1039,15 @@ public class ConfigTechReborn {
|
||||||
.translateToLocal("config.techreborn.allow.UUrecipesAluminumDust.tooltip"))
|
.translateToLocal("config.techreborn.allow.UUrecipesAluminumDust.tooltip"))
|
||||||
.getBoolean(true);
|
.getBoolean(true);
|
||||||
|
|
||||||
|
ShowChargeHud = config
|
||||||
|
.get(CATEGORY_POWER,
|
||||||
|
StatCollector
|
||||||
|
.translateToLocal("config.techreborn.showChargehud"),
|
||||||
|
true,
|
||||||
|
StatCollector
|
||||||
|
.translateToLocal("config.techreborn.showChargehud.tooltip"))
|
||||||
|
.getBoolean(true);
|
||||||
|
|
||||||
|
|
||||||
if (config.hasChanged())
|
if (config.hasChanged())
|
||||||
config.save();
|
config.save();
|
||||||
|
|
Loading…
Add table
Add a link
Reference in a new issue