[Witchery Bug] Chalk stacks when shift-clicked into a chest
TechnoMysterio opened this issue · 2 comments
Description
Chalk stacks when it's shift-clicked into an inventory, even if the chalk items have different durability. If they do have different durability, then they tend to copy each others durability, usually turning a fresh talk into a half-used one.
Context
Environment
The issue is present in Single-Player and Multi-Player
Other mods
The issue is present with just Forge and Witchery: Resurrected
Steps to Reproduce
The more details are provided, the easier will be to reproduce and analyze the issue, thus more chances to solve it
- Play in survival, get two chalk items, and use one of them a little.
- Place used chalk in a chest, then shift-click the fresh chalk into the chest.
- The chalks should stack, and the durability of the first gets applied to the second.
I wonder if there was an attempt at a feature where chalk in a stack 'combine' durability properly?
Meaning, 2 chalk in a stack will have the whole stack act as one item, with double the durability. So half durability would be equal to one full chalk's worth of durability?
I had researched a little bit about this issue.
It happens because Witchery defines the Chalk item as stackable to 64 if not damaged, 1 if otherwise. When shift-clicking an undamaged chalk into a chest, it only checks the shifted stack and compared to the item in the slot, without checking its damage too. Minecraft thinks the two items as stackable and stacks them, retaining the damage of the original stack in the slot (the damage one)
I tried fixing the issue at the root, but it seems to be a bug in vanilla code about how it handles stackable damageable items. I did not try to fix that as it is outside the scope of Companion and more of a job for mods like Universal Tweaks or similar.
Having Chalk stacksize set to 1 is the best solution imho, and Companion already has a tweak (disabled by default) to reduce Chalk stacksize to 1 regardless of item damage. Companion config -> Item Tweaks -> Tweak Unstackable Chalk