Skip to content

Commit

Permalink
Remove static fields from mixin class
Browse files Browse the repository at this point in the history
This is not allowed by Sponge

(cherry picked from commit b01fc86)
  • Loading branch information
magicus committed Dec 30, 2021
1 parent 1401cb1 commit f9ec938
Showing 1 changed file with 2 additions and 4 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -24,8 +24,6 @@
@Environment(EnvType.CLIENT)
@Mixin(InGameHud.class)
public abstract class StatusEffectTimerMixin extends DrawableHelper {
public static final int TEXT_COLOR = 0x99FFFFFF;

@Shadow @Final
private MinecraftClient client;

Expand Down Expand Up @@ -59,11 +57,11 @@ private void renderDurationOverlay(MatrixStack matrices, CallbackInfo c) {

String duration = getDurationAsString(statusEffectInstance);
int durationLength = client.textRenderer.getWidth(duration);
drawStringWithShadow(matrices, client.textRenderer, duration, x + 13 - (durationLength / 2), y + 14, TEXT_COLOR);
drawStringWithShadow(matrices, client.textRenderer, duration, x + 13 - (durationLength / 2), y + 14, 0x99FFFFFF);

String amplifier = getAmplifierAsString(statusEffectInstance);
int amplifierLength = client.textRenderer.getWidth(amplifier);
drawStringWithShadow(matrices, client.textRenderer, amplifier, x + 22 - amplifierLength, y + 3, TEXT_COLOR);
drawStringWithShadow(matrices, client.textRenderer, amplifier, x + 22 - amplifierLength, y + 3, 0x99FFFFFF);
}
}
}
Expand Down

0 comments on commit f9ec938

Please sign in to comment.