Skip to content
This repository was archived by the owner on Jan 8, 2019. It is now read-only.
Open
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
6 changes: 6 additions & 0 deletions src/main/java/com/zyin/zyinhud/ZyinHUDConfig.java
Original file line number Diff line number Diff line change
Expand Up @@ -492,6 +492,12 @@ private static void ReadConfigSettings(File configFile, boolean loadSettings) {
else
p.set(PotionTimers.HideBeaconPotionEffects);

p = config.get(CATEGORY_POTIONTIMERS, "NotBlinkingBeaconPotionEffects", false);
if (loadSettings)
PotionTimers.DontBlinkBeaconPotionEffects = p.getBoolean(false);
else
p.set(PotionTimers.DontBlinkBeaconPotionEffects);

p = config.get(CATEGORY_POTIONTIMERS, "ShowVanillaStatusEffectHUD", true);
if (loadSettings)
PotionTimers.ShowVanillaStatusEffectHUD = p.getBoolean(true);
Expand Down
7 changes: 6 additions & 1 deletion src/main/java/com/zyin/zyinhud/gui/GuiZyinHUDOptions.java
Original file line number Diff line number Diff line change
Expand Up @@ -504,6 +504,8 @@ private void DrawPotionTimerButtons() {
AddButtonAt(1, 0, new GuiButton(1009, 0, 0, buttonWidth, buttonHeight, GetButtonLabel_Boolean("potiontimers.options.showvanillastatuseffecthud", PotionTimers.ShowVanillaStatusEffectHUD)));
AddButtonAt(1, 1, new GuiButton(1010, 0, 0, buttonWidth, buttonHeight, GetButtonLabel_Boolean("potiontimers.options.showeffectname", PotionTimers.ShowEffectName)));
AddButtonAt(1, 2, new GuiButton(1011, 0, 0, buttonWidth, buttonHeight, GetButtonLabel_Boolean("potiontimers.options.showeffectlevel", PotionTimers.ShowEffectLevel)));
AddButtonAt(1, 3, new GuiButton(1012, 0, 0, buttonWidth, buttonHeight, GetButtonLabel_Boolean("potiontimers.options.dontblinkbeaconpotioneffects", PotionTimers.DontBlinkBeaconPotionEffects)));

}

private void DrawDurabilityInfoButtons() {
Expand Down Expand Up @@ -1018,7 +1020,10 @@ protected void actionPerformed(GuiButton button, int mouseButton) {
PotionTimers.ToggleShowEffectLevel();
button.displayString = GetButtonLabel_Boolean("potiontimers.options.showeffectlevel", PotionTimers.ShowEffectLevel);
break;

case 1012: //Don't blink beacon potion effects
PotionTimers.ToggleNotBlinkingBeaconPotionEffects();
button.displayString = GetButtonLabel_Boolean("potiontimers.options.dontblinkbeaconpotioneffects", PotionTimers.DontBlinkBeaconPotionEffects);
break;
/////////////////////////////////////////////////////////////////////////
// Durability Info
/////////////////////////////////////////////////////////////////////////
Expand Down
10 changes: 9 additions & 1 deletion src/main/java/com/zyin/zyinhud/mods/PotionTimers.java
Original file line number Diff line number Diff line change
Expand Up @@ -139,6 +139,10 @@ public String GetFriendlyName() {
* The constant HideBeaconPotionEffects.
*/
public static boolean HideBeaconPotionEffects;
/**
* The constant DontBlinkBeaconPotionEffects.
*/
public static boolean DontBlinkBeaconPotionEffects;
/**
* The constant ShowVanillaStatusEffectHUD.
*/
Expand Down Expand Up @@ -245,7 +249,7 @@ else if (TextMode == TextModes.WHITE)
mc.fontRenderer.setUnicodeFlag(true);

//render the potion duration text onto the screen
if (potionDuration >= blinkingThresholds[blinkingThresholds.length - 1]) //if the text is not blinking then render it normally
if (potionDuration >= blinkingThresholds[blinkingThresholds.length - 1] || (DontBlinkBeaconPotionEffects && potionEffect.getIsAmbient())) //if the text is not blinking then render it normally
{
mc.fontRenderer.drawStringWithShadow(potionText, x, y, colorInt);
} else //else if the text is blinking, have a chance to not render it based on the blinking variables
Expand Down Expand Up @@ -406,4 +410,8 @@ public static boolean ToggleShowVanillaStatusEffectHUD() {
return ShowVanillaStatusEffectHUD = !ShowVanillaStatusEffectHUD;
}

public static boolean ToggleNotBlinkingBeaconPotionEffects() {
return DontBlinkBeaconPotionEffects = !DontBlinkBeaconPotionEffects;
}

}
1 change: 1 addition & 0 deletions src/main/resources/assets/zyinhud/lang/en_us.lang
Original file line number Diff line number Diff line change
Expand Up @@ -227,6 +227,7 @@ potiontimers.options.showvanillastatuseffecthud=Vanilla potion HUD:
potiontimers.options.showvanillastatuseffecthud.tooltip=Enable/disable the vanilla status effects HUD
potiontimers.options.showeffectname=Show effect name:
potiontimers.options.showeffectlevel=Show effect level:
potiontimers.options.hidebeaconpotioneffects=Don't blink beacon effect:

safeoverlay.name=Safe Overlay
safeoverlay.mode.off=Off
Expand Down
3 changes: 2 additions & 1 deletion src/main/resources/assets/zyinhud/lang/zh_cn.lang
Original file line number Diff line number Diff line change
Expand Up @@ -224,7 +224,8 @@ potiontimers.options.hidebeaconpotioneffects=隐藏信标药水效果:
potiontimers.options.showvanillastatuseffecthud=原版状态效果HUD:
potiontimers.options.showvanillastatuseffecthud.tooltip=显示/隐藏原版状态效果HUD:
potiontimers.options.showeffectname=显示效果名称:
potiontimers.options.showeffectlevel=显示效果级别:
potiontimers.options.showeffectlevel=显示效果级别:
potiontimers.options.dontblinkbeaconpotioneffects=不闪烁信标药水效果:

safeoverlay.name=安全覆盖
safeoverlay.mode.off=关
Expand Down