Skip to content

Commit

Permalink
Move COLORS constant outside of mixin
Browse files Browse the repository at this point in the history
  • Loading branch information
MystWraith committed Dec 20, 2023
1 parent cebc7b8 commit 8ac2762
Show file tree
Hide file tree
Showing 2 changed files with 3 additions and 4 deletions.
2 changes: 2 additions & 0 deletions src/main/java/tech/showierdata/pickaxe/Pickaxe.java
Original file line number Diff line number Diff line change
Expand Up @@ -70,6 +70,8 @@ public class Pickaxe implements ModInitializer {

public Text prevMessage;

public static final Identifier COLORS = new Identifier("pickaxe", "textures/gui/colors.png");

public static Pickaxe getInstance() {
return instence;
}
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -25,9 +25,6 @@
@Mixin(InGameHud.class)
public abstract class InGameHudMixin {

@Unique
final Identifier COLORS = new Identifier("pickaxe", "textures/gui/colors.png");

/*@ModifyVariable(method = "renderStatusBars", at = @At(value = "STORE", ordinal = 0))
PlayerEntity modifPlayerEntity(PlayerEntity playerEntity) {
if (Pickaxe.getInstance().isInPickaxe()) return null;
Expand Down Expand Up @@ -109,7 +106,7 @@ void renderNewExperienceBar(DrawContext context, int x, int y, int width, boolea
v += 10;
break;
}
context.drawTexture(COLORS, x, y, 0, v, width, 5, 182, 50);
context.drawTexture(Pickaxe.COLORS, x, y, 0, v, width, 5, 182, 50);
}

@ModifyConstant(method = "renderExperienceBar", constant = @Constant(intValue = 8453920))
Expand Down

0 comments on commit 8ac2762

Please sign in to comment.