diff --git a/common/src/main/java/dev/dubhe/anvilcraft/integration/jade/provider/PowerBlockProvider.java b/common/src/main/java/dev/dubhe/anvilcraft/integration/jade/provider/PowerBlockProvider.java index 8e483c636..b40ad70b5 100644 --- a/common/src/main/java/dev/dubhe/anvilcraft/integration/jade/provider/PowerBlockProvider.java +++ b/common/src/main/java/dev/dubhe/anvilcraft/integration/jade/provider/PowerBlockProvider.java @@ -29,8 +29,6 @@ public void appendTooltip(ITooltip tooltip, BlockAccessor accessor, IPluginConfi int color; float percent = (float) consume / generate; if (percent < 0.75) { - color = 0xFF32CD32; - } else if (percent <= 1) { color = 0xFFFFD700; } else { color = 0xFFFF0000; @@ -41,7 +39,10 @@ public void appendTooltip(ITooltip tooltip, BlockAccessor accessor, IPluginConfi percent, Component.translatable("tooltip.anvilcraft.jade.power_information", consume, generate), elementHelper.progressStyle().color(color).textColor(-1), - Util.make(BoxStyle.DEFAULT, boxStyle -> boxStyle.borderColor = 0xFF555555), + Util.make(BoxStyle.DEFAULT, boxStyle -> { + boxStyle.borderColor = 0xFF555555; + boxStyle.bgColor = 0xFF32CD32; + }), true ) );