Skip to content

Commit c03cd90

Browse files
useernamesorin.iliuta
authored andcommitted
Added Potion Config Options as well
1 parent 071d431 commit c03cd90

File tree

2 files changed

+11
-3
lines changed

2 files changed

+11
-3
lines changed

src/main/java/net/torocraft/torohud/conf/HealthBarGuiConf.java

Lines changed: 8 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -67,6 +67,14 @@ public enum Skin {NONE, BASIC}
6767
@Name("Armor Y Offset")
6868
public static int armorYOffset = 0;
6969

70+
// Potion Config
71+
@Name("Potion X Offset")
72+
public static int potionXOffset = 0;
73+
74+
@Name("Potion Y Offset")
75+
public static int potionYOffset = 0;
76+
77+
7078
// Overall GUI Config
7179
@Name("Disable GUI")
7280
public static boolean disableGui = false;
@@ -76,7 +84,6 @@ public enum Skin {NONE, BASIC}
7684

7785
@Name("Y Offset")
7886
public static int yOffset = 0;
79-
8087
@Name("GUI Position")
8188
public static GuiAnchor guiPosition = GuiAnchor.TOP_LEFT;
8289

src/main/java/net/torocraft/torohud/display/PotionDisplay.java

Lines changed: 3 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -10,6 +10,7 @@
1010
import net.minecraft.potion.PotionEffect;
1111
import net.minecraft.util.ResourceLocation;
1212
import net.torocraft.torohud.network.MessageEntityStatsResponse;
13+
import net.torocraft.torohud.conf.HealthBarGuiConf;
1314

1415
public class PotionDisplay extends AbstractEntityDisplay implements IDisplay {
1516

@@ -62,8 +63,8 @@ private void drawEffects() {
6263
}
6364

6465
int index = 0;
65-
int x = this.x + X_OFFSET;
66-
int y = this.y + Y_OFFSET;
66+
int x = this.x + X_OFFSET + HealthBarGuiConf.potionXOffset;
67+
int y = this.y + Y_OFFSET + HealthBarGuiConf.potionYOffset;
6768

6869
for (PotionEffect potion : Ordering.natural().sortedCopy(potions)) {
6970

0 commit comments

Comments
 (0)