-
-
Notifications
You must be signed in to change notification settings - Fork 84
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Add slot text to Rabbit levels in the Chocolate Factory #827
Conversation
if (slot.id == rabbit.slot()) { | ||
// Assuming the level is to be displayed directly on the slot. | ||
// Adjust x and y offsets as needed. | ||
return List.of(new SlotText(Text.literal(String.valueOf(rabbit.level())), TextPosition.TOP_LEFT)); |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Could use the static SlotText#topLeft
method instead of the constructor for a cleaner look, and perhaps some colors as well.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
For colors, would that be to match the employee level of the rabbit? "Manager" being purple etc
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
That could work, yes
src/main/java/de/hysky/skyblocker/skyblock/chocolatefactory/ChocolateFactorySolver.java
Show resolved
Hide resolved
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
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.
One other suggestion is to not commit directly to your fork's master branch, and to create new branches and commit to them instead so you can work on multiple things at once while keeping a clean branch to create new ones off of. If you don't know how to change it at this moment I'd suggest just keeping it this way for now and only doing that for future PRs if you ever wish to do more. |
Hi, thanks for your interest and contribution. Please address the comments from other maintainers and we’ll try to get this merged. |
src/main/java/de/hysky/skyblocker/skyblock/chocolatefactory/ChocolateFactorySolver.java
Outdated
Show resolved
Hide resolved
src/main/java/de/hysky/skyblocker/skyblock/chocolatefactory/ChocolateFactorySolver.java
Outdated
Show resolved
Hide resolved
…an numbers for the coach is untested but code is there.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Note
Not tested. Also squash please.
Added slot text to the chocolate factory for rabbits, unemployed is represented as 0. This also adds a public list of rabbits inside the edited files + the rabbit record now includes the level of the rabbit