SkyblockerMod / Skyblocker

Hypixel Skyblock fabric Mod for latest minecraft version
https://hysky.de
GNU Lesser General Public License v3.0
169 stars 82 forks source link

Use item stack name for rabbit level slot text and update color #881

Open kevinthegreat1 opened 1 month ago

kevinthegreat1 commented 1 month ago

The lore regex method works fine, but since a lot of things in the chocolate factory have levels it could be a bit more generalized to include other things in the CF, such as the time tower, rabbit shrine, etc. Also, this should stop working on max level rabbits since they don't have the next level text in their lore, but I don't have any at max level so I don't know for sure.

I'd suggest parsing the display names instead as well, it would be easier to handle since all items include their current levels in their display names and there's only 2 different formats. With this, you could use a switch for the different slots with the different formats and it should be much easier that way. This is up to you, though.

Originally posted by @Emirlol in https://github.com/SkyblockerMod/Skyblocker/pull/827#pullrequestreview-2166141919

Also maybe make the slot text color match the level color.

x-yingcan-x commented 1 month ago

pic here is a rabbit with max lv (it looks normal for me but strange on github ¯\_(ツ)_/¯)

aiden-powers commented 1 month ago

Is there a way to get the color of the first lore text and apply that to the overlay text?

The get method (last time I used it) returns a string with the clean text instead of the color codes included.