-
-
Notifications
You must be signed in to change notification settings - Fork 97
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
ItemList Changes #1119
ItemList Changes #1119
Conversation
This update introduces a bunch of changes to the ItemList feature, to hopefully enhance user experience. Most importantly, you can now filter out specific elements in the list to narrow down the results. The lore-search now works properly, and you're now able to use the wiki lookup key in the recipe book. Besides all that, shift-clicking on the recipe result button will suggest the recipe to the player using the `viewrecipe` command, to allow quick super-craft access.
Properly use parentheses in the `(animal)` and `(pest)` flagged entries.
Replaces direct chat command handling with MessageScheduler.
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.
Overall pretty good logic, you can decide to accept the nit picks as you see fit.
src/main/java/de/hysky/skyblocker/skyblock/itemlist/recipebook/FilterOption.java
Outdated
Show resolved
Hide resolved
src/main/java/de/hysky/skyblocker/skyblock/itemlist/recipebook/FilterOption.java
Outdated
Show resolved
Hide resolved
...ain/java/de/hysky/skyblocker/skyblock/itemlist/recipebook/SkyblockCraftingRecipeResults.java
Outdated
Show resolved
Hide resolved
...ain/java/de/hysky/skyblocker/skyblock/itemlist/recipebook/SkyblockCraftingRecipeResults.java
Outdated
Show resolved
Hide resolved
src/main/java/de/hysky/skyblocker/skyblock/itemlist/recipebook/SkyblockRecipeBookWidget.java
Outdated
Show resolved
Hide resolved
src/main/java/de/hysky/skyblocker/skyblock/itemlist/recipebook/SkyblockRecipeBookWidget.java
Outdated
Show resolved
Hide resolved
src/main/java/de/hysky/skyblocker/utils/render/gui/CyclingTextureWidget.java
Outdated
Show resolved
Hide resolved
Replaced the Identifiable interface with a Supplier-based design for enum, updated related classes to use Supplier methods and refactored filtering logic for consistency. Additionally, added a new tip for viewing recipes in the recipe book, and changed the Shift+Click requirement to a simple right click.
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.
Just one more question.
...ain/java/de/hysky/skyblocker/skyblock/itemlist/recipebook/SkyblockCraftingRecipeResults.java
Show resolved
Hide resolved
var rawID = ItemUtils.getItemId(result.getDisplayStack()); | ||
if (result.isMouseOver(mouseX, mouseY)) { | ||
MessageScheduler.INSTANCE.sendMessageAfterCooldown(String.format("/viewrecipe %s", rawID), true); | ||
return true; |
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.
Nice catch I overlooked this.
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.
LGTM, thanks.
src/main/java/de/hysky/skyblocker/skyblock/itemlist/recipebook/FilterOption.java
Outdated
Show resolved
Hide resolved
src/main/java/de/hysky/skyblocker/skyblock/itemlist/recipebook/FilterOption.java
Show resolved
Hide resolved
src/main/java/de/hysky/skyblocker/skyblock/itemlist/recipebook/FilterOption.java
Outdated
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.
I don't think the asserts are necessary
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.
They just fix all the warning in the IDE
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.
I think it makes sense to use asserts as "I know this won't be null, now stop giving me warnings."
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.
I think it makes sense to use asserts as "I know this won't be null, now stop giving me warnings."
Or even with other boolean conditions, such as when the children
method returns a list of three, you know for sure its size is going to be 3, so you can assert children().size() == 3
- It's just cleaner than @SurpressWarnings
This update introduces a bunch of changes to the ItemList feature, to hopefully enhance user experience. Most importantly, you can now filter out specific elements in the list to narrow down the results. The lore search now works properly, and you're now able to use the wiki lookup key in the recipe book. Besides all that, shift-clicking on the recipe result button will suggest the recipe to the player using the
viewrecipe
command, to allow quick super-craft access.P.S. The second commit only exists because I forgot to check those files in the first one.