Tweakeroo

Tweakeroo

2M Downloads

[Feature/Bug?] Swapping tools with low durability ignores stack size

chimericdream opened this issue ยท 2 comments

commented

On our server, we have a mod installed which we've used to increase the stack size for most tool items. However, one of my players noticed that when a low durability tool is swapped out for a new one, it grabs the entire stack of pickaxes, shovels, or whatever. I realize this isn't a normal scenario, so I don't know whether this would be considered a bug or feature request.

Version: 0.12.1 (MC 1.18.1)
Current Behavior: a full stack of shovels/picks/whatever is swapped out for a low durability tool instead of just 1
Desired Behavior: only one tool is pulled from the stack to replace the low durability one. If no inventory space is left for the tool to be replaced, it is dropped instead

Thanks!

commented

Are the tools "normally" stackable as normal inventory actions? Or is it like Carpet's stackable shulker boxes where they will only stack on the ground, and if you try to do normal stacking operations in the inventory, it will just unstack and make a mess? I think this would possibly be a separate option to use the stack-aware swapping code. Although not sure it needs to be an option...

commented

Here are a couple of screenshots showing what happens. We use the Lenient Stack Size mod, so they stack normally in your inventory, as long as they have matching NBT (damage, enchants, etc). Like I said, I know this is a non-standard use case, since these items don't stack by default in the vanilla game. So if it turns out to be more effort than it's worth, I totally understand!

2022-02-06_10 38 17

2022-02-06_10 38 31

2022-02-06_10 38 42