potion cleanup

This commit is contained in:
Sen 2025-03-26 21:07:23 +01:00
parent 460a58e062
commit e108650cd4
30 changed files with 644 additions and 968 deletions

View file

@ -851,12 +851,13 @@ public class Game implements IThreadListener {
x = 40;
y = 40;
for(PotionEffect effect : this.thePlayer.getEffects()) {
Potion potion = Potion.POTION_TYPES[effect.getPotionID()];
int color = potion.getLiquidColor();
Potion potion = effect.getPotion();
int color = potion.getColor();
String name = (potion.isBadEffect() ? TextColor.ORANGE : TextColor.ACID) + potion.getDisplay() + PotionHelper.getPotionPotency(effect.getAmplifier());
String desc = TextColor.NEON + Potion.getDurationString(effect);
String desc = TextColor.NEON + effect.getDurationString();
// Drawing.drawRectColor(x, y, 250, Font.DEFAULT.yglyph + 2, color | 0xff000000);
Drawing.drawGradientBorder(x, y, 250, Font.YGLYPH + 4, color | 0xff000000, Util.mixColor(color | 0xff000000, 0xff000000), 0xff202020, 0xffcfcfcf, 0xff6f6f6f);
Drawing.drawRectBorder(x, y, 250, Font.YGLYPH + 4, 0xff000000, 0xff202020, 0xffcfcfcf, 0xff6f6f6f);
Drawing.drawGradient(x + 2, y + 2, effect.isInfinite() ? 246 : ((int)(246.0f * ((float)effect.getRemaining() / (float)effect.getDuration()))), Font.YGLYPH, color | 0xff000000, Util.mixColor(color | 0xff000000, 0xff000000));
Drawing.drawText(name, x + 4, y + 2, 0xffffffff);
Drawing.drawTextRight(desc, x + 250 - 4, y + 2, 0xffffffff);
y += 24;