-
Notifications
You must be signed in to change notification settings - Fork 178
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
Toolbelt #2493
base: master
Are you sure you want to change the base?
Toolbelt #2493
Conversation
src/main/java/gregtech/common/crafting/GTShapelessOreRecipe.java
Outdated
Show resolved
Hide resolved
fix button texture yeet NBTSyncValue.java
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.
a few things
# Conflicts: # src/main/java/gregtech/api/items/toolitem/ItemGTToolbelt.java
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 see a reason for now passing in the stack
for the various IToolBehavior
methods. In 2 of the three methods, the stack parameter is not used at all in the implementors. In the third, you can retrieve the stack from the players held item. The third method already handles the toolbelt because it directly calls getBehaviorTag
on the stack retrieved from the player's hand.
src/main/java/gregtech/api/items/toolitem/behavior/IToolBehavior.java
Outdated
Show resolved
Hide resolved
src/main/java/gregtech/api/items/toolitem/behavior/IToolBehavior.java
Outdated
Show resolved
Hide resolved
itemstack.setCount(1); | ||
|
||
if (dyeable.hasColor(itemstack1)) { | ||
int l = dyeable.getColor(itemstack); |
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.
We do have our own DyeUtil#determineDyeColor, if that would help cleanup this mess
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 noticed that when you "finish" crafting with the toolbelt (shift-clicking the crafting output), the selected item gets deselected, not sure if intended. otherwise, a few other things i noticed.
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.
When adjusting the AOE size in the drill GUI, if you are at the max AOE the displayed AOE number will flicker higher and then go back to the max number. Same with the minimums.
Also when opening the AOE GUI, the JEI search bar shinks to match the size of the GUI, do you know of any way to prevent this? (This is something JEI does I believe, don't know if they have an opt out)
The toolbelt, when no tools are selected, uses regular right click to open the GUI. However, other tools, such as the drill, use shift + rclick to open the GUI. We should move the toolbelt to use that as well, for consistency.
When the toolbelt is dyed, a tooltip could be added to the belt, something like, "Dyed: (color)"
When crafting an item with the toolbelt (Was using the hatch switch recipe with a screwdriver in the toolbelt), after completing the craft, the toolbelt does not render the selected item any more until it is removed from the crafting grid
When crafting with the toolbelt, the toolbelt sometimes does not use the selected item for the craft. Eg, I have a toolbelt with a wrench and a screwdriver, and when making a machine hull the recipe completes when the screwdiver is the selected item. Or this may be the result of a broken feature, as when removing the toolbelt from the crafting screen (No craft peformed), the toolbelt updates to show the wrench as the active item. So the issue would be that the toolbelt does not update visually when placed into the crafting table.
I don't really like the selected slot being able to be set to -1, as I would prefer to have a selected slot at all times.
src/main/java/gregtech/api/items/toolitem/aoe/AoESymmetrical.java
Outdated
Show resolved
Hide resolved
src/main/java/gregtech/api/items/toolitem/aoe/AoESymmetrical.java
Outdated
Show resolved
Hide resolved
ToolStackHandler handler = getHandler(stack); | ||
if (slot < 0 || slot >= handler.getSlots()) | ||
handler.selectedSlot = -1; | ||
else handler.selectedSlot = slot; |
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.
This also needs to send a tool update packet
improve slotSizeSupplier skip initializing if we can't determine the material
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.
https://pastebin.com/RvC9r6kT Crash when crafting an LV machine casing.
What
Toolbelt
Implementation Details
Pain and suffering
Outcome
Less inventory clogging with excessive numbers of tools
Potential Compatibility Issues
There was an incidental refactor of some GT recipe classes, but I don't expect problems from it.
A lot of changes have been made inside the tool API, but none of it should be breaking.