Skip to content

Commit

Permalink
Added Potion Config Options as well
Browse files Browse the repository at this point in the history
  • Loading branch information
sor1n authored and sorin.iliuta committed May 19, 2020
1 parent 071d431 commit a34315d
Show file tree
Hide file tree
Showing 2 changed files with 11 additions and 3 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -67,6 +67,14 @@ public enum Skin {NONE, BASIC}
@Name("Armor Y Offset")
public static int armorYOffset = 0;

// Potion Config
@Name("Potion X Offset")
public static int potionXOffset = 0;

@Name("Potion Y Offset")
public static int potionYOffset = 0;


// Overall GUI Config
@Name("Disable GUI")
public static boolean disableGui = false;
Expand All @@ -76,7 +84,6 @@ public enum Skin {NONE, BASIC}

@Name("Y Offset")
public static int yOffset = 0;

@Name("GUI Position")
public static GuiAnchor guiPosition = GuiAnchor.TOP_LEFT;

Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -10,6 +10,7 @@
import net.minecraft.potion.PotionEffect;
import net.minecraft.util.ResourceLocation;
import net.torocraft.torohud.network.MessageEntityStatsResponse;
import net.torocraft.torohud.conf.HealthBarGuiConf;

public class PotionDisplay extends AbstractEntityDisplay implements IDisplay {

Expand Down Expand Up @@ -62,8 +63,8 @@ private void drawEffects() {
}

int index = 0;
int x = this.x + X_OFFSET;
int y = this.y + Y_OFFSET;
int x = this.x + X_OFFSET + HealthBarGuiConf.potionXOffset;
int y = this.y + Y_OFFSET + HealthBarGuiConf.potionYOffset;

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

Expand Down

0 comments on commit a34315d

Please sign in to comment.