Inventory Essentials (Fabric Edition)

Inventory Essentials (Fabric Edition)

424k Downloads

Shift-dragging causes unwanted crafting

copygirl opened this issue ยท 2 comments

commented

Minecraft Version

1.18.x

Mod Loader

Forge

Mod Loader Version

39.1.2

Mod Version

4.0.1

Describe the Issue

When shift-clicking the output from the crafting table, if the remaining ingredients make a valid recipe with a different output, the other item will also be crafted. This happened to me when crafting torches, where I would suddenly also get tiny coal if coal remained in the crafting grid, but can probably also be done when crafting sticks, where a single or multiple planks remaining in just one slot would craft buttons.

My suggested fix would be to only move items using the shift-dragging feature when moving over a new slot the cursor enters the slot's "bounding box", not while staying over the same slot. This would also fix issues where when you attempt to sort a bunch of dropped items into chests, the picked up items would immediately be put away when they move into the slot that's just been freed up.

Logs

No response

Do you use any performance-enhancing mods (e.g. OptiFine)?

No response

commented

This was the quickest option to get the core issue resolved for 1.18 so I can move on to porting, anything beyond that can be considered for 1.19+

commented

Wait, I don't know if that's the right solution!

In another mod, I actually found it useful to hold shift and them move over a stack in the inventory (to move it to the crafting grid), and then move to the crafting output to craft the item, going back and forth to craft a couple of stacks at once. (In my case, 64x flax into 64x string.)

I'm also not sure if it would help with modded crafting result slots, if they don't extend the ResultSlot class.

Is there something wrong with my suggested fix?