aboutsummaryrefslogtreecommitdiff
path: root/src
diff options
context:
space:
mode:
Diffstat (limited to 'src')
-rw-r--r--src/main/java/io/github/moulberry/notenoughupdates/mixins/MixinGuiIngameForge.java11
-rw-r--r--src/main/java/io/github/moulberry/notenoughupdates/options/separatesections/Misc.java8
2 files changed, 19 insertions, 0 deletions
diff --git a/src/main/java/io/github/moulberry/notenoughupdates/mixins/MixinGuiIngameForge.java b/src/main/java/io/github/moulberry/notenoughupdates/mixins/MixinGuiIngameForge.java
index b263cf31..9ad3e921 100644
--- a/src/main/java/io/github/moulberry/notenoughupdates/mixins/MixinGuiIngameForge.java
+++ b/src/main/java/io/github/moulberry/notenoughupdates/mixins/MixinGuiIngameForge.java
@@ -19,9 +19,12 @@
package io.github.moulberry.notenoughupdates.mixins;
+import io.github.moulberry.notenoughupdates.NotEnoughUpdates;
import io.github.moulberry.notenoughupdates.miscfeatures.ItemCustomizeManager;
+import net.minecraft.entity.player.EntityPlayer;
import net.minecraft.item.Item;
import net.minecraft.item.ItemStack;
+import net.minecraft.potion.Potion;
import net.minecraftforge.client.GuiIngameForge;
import org.spongepowered.asm.mixin.Mixin;
import org.spongepowered.asm.mixin.injection.At;
@@ -34,4 +37,12 @@ public class MixinGuiIngameForge {
public Item renderHelmet(ItemStack stack) {
return ItemCustomizeManager.useCustomItem(stack).getItem();
}
+
+ @Redirect(method = "renderHealth", at = @At(value = "INVOKE", target = "Lnet/minecraft/entity/player/EntityPlayer;isPotionActive(Lnet/minecraft/potion/Potion;)Z", ordinal = 0))
+ public boolean renderHealth(EntityPlayer player, Potion potion) {
+ if (!NotEnoughUpdates.INSTANCE.config.misc.hideRegenBounce || !NotEnoughUpdates.INSTANCE.hasSkyblockScoreboard()) {
+ return player.isPotionActive(potion);
+ }
+ return false;
+ }
}
diff --git a/src/main/java/io/github/moulberry/notenoughupdates/options/separatesections/Misc.java b/src/main/java/io/github/moulberry/notenoughupdates/options/separatesections/Misc.java
index f0e36d56..1f5c84ac 100644
--- a/src/main/java/io/github/moulberry/notenoughupdates/options/separatesections/Misc.java
+++ b/src/main/java/io/github/moulberry/notenoughupdates/options/separatesections/Misc.java
@@ -363,4 +363,12 @@ public class Misc {
values = {"Off", "AM/PM [1PM]", "24hr [13:00]"}
)
public int showWhenCountdownEnds = 1;
+
+ @Expose
+ @ConfigOption(
+ name = "Stop Hearts Bouncing",
+ desc = "Stops the hearts bouncing with regeneration effect"
+ )
+ @ConfigEditorBoolean
+ public boolean hideRegenBounce = false;
}