Open Raycoms opened 3 years ago
Might be better to fix in Minecolonies. Generally you don't want things like this to be possible from the client side (Mouse Tweaks is clientside-only).
That's strange because shift clicking etc works perfectly fine. Even shifting over several stacks which should have a similar behaviour.
@Override
public void setStackInSlot(final int slot, @Nonnull final ItemStack stack)
{
mainInventory.set(slot, stack.copy());
}
Basically because we copy here, the scrolling to insert breaks.
How do other inventories do it?
Also FYI Mouse Tweaks doesn't (and can't) directly manipulate containers with setStackInSlot
; it implements all its features by simulating button presses using handleMouseClick
.
Vanilla mostly sets the stack directly, but they don't track inventory changes as we need it. We're tracking the contents of the inventories to avoid changing contents and us not noticing things are gone or new.
Initial bug report: https://github.com/ldtteam/minecolonies/issues/6078
It's because Minecolonies copies the stack on setStackInSlot.