Zrips / CMI

117 stars 99 forks source link

Regarding the issue of the damage display limit on the BossBar #8922

Closed Probe4119 closed 3 months ago

Probe4119 commented 3 months ago

I checked the formula written in the HpBarListener.class via IDEA:

"var6.setTitleOfBar(CMILC.BossBar_hpBar.getLocale(new Object[]{"[victim]", var12.getCustomName(), "[max]", (int)var7.getMaxHealth(), "[current]", var8, "[damage]", (double)((int)(var3 * 100.0)) / 100.0}));"

Can we change (int) to (long) or a formula that supports higher display numbers? Because the display limit is locked at 2.147483647E7, can it have a higher display number?


To modify the formula to support higher display numbers, you can replace (int) with (long) or use appropriate data types that can handle larger values. This change should allow the values to be displayed correctly even if they exceed the limit of 2.147483647E7. image

Zrips commented 3 months ago

Will modify it to more properly process bigger numbers and more properly show them