[1.14.4] Weird shift click behavior with secretrooms
gabriel-andreescu opened this issue ยท 19 comments
Problem: shift clicking multiple items on the same type don't combine them into one stack, instead 2 or more stacks are created, when you click one of them, it combines them as if it was a visual glitch
How to recreate: new sp world, get some wood, split it into your inv, then shift click DRAG over the splited items so they go into your hotbar
Versions:
mc_1.14.4
MouseTweaks-2.12
forge_28.1.0 & 28.1.39 (tested on both versions to make sure)
@Wyn-Price the world you tested in, was it a creative type world or survival?
I kept testing, if I create a world of type creative (doesn't matter if I change it to survival afterwards) I cannot reproduce, but if I start with a survival type world, and literally punch the trees or open to lan with cheats (which I used to test until now), then it happens.
Can anyone else test please? I need to know if it's on my end only.
I tested with it in creative mode, then changed to survival mode. Having it not work based on the game type the world starts with makes 0 sense to me. Definitively not caused by secretrooms
It doesn't make sense for me either, can you please check by starting on a survival world?
note: MouseTweaks works just fine with 28 other mods I use...I'm not saying it's caused by any of these mods, I'm just trying to figure it out so we all benefit from the findings :) , thought that's how it's supposed to work
Okay so i having it in surival mode, I was able to reproduce the issue. Loading everything up in a developer enviroment, I was able to figure out what the issue is. When you shift drag, it looks like the item stack is moved on both the client and the server.
The issue arises from some overlooked code in the custom tooltip that the switch probe uses. In the tooltip event. I do ItemStack#getOrCreateChildTag
, which means clientside, the stack has the tag compund, but serverside it does not. It also means that only the items that have been hovered over have the tag. This means that the stacks can't be matched, and explaines why the stack doesn't get put in the right place.
No idea why this only happenes in single player generated worlds, that part makes 0 sense.
I actually found out too, I commented all your events one by one (I'm new to modding) ... but yeah, maybe next time try to be a little more open with ppl that try to help you out, no offense.
Edit:
Thanks @YaLTeR for letting us having this conversation here, wish you both success with your mods!
I'm perfectly open with people trying to help me out, but over the years you accumilate so many bug reports that miss out crutial information or just aren't to do with your mod whatsoever that i physically just don't have time to investigate all of them myself.
From first glance, this just didn't look like anything secretrooms could cause. Clearly I was wrong.
Related commit: Wyn-Price/SecretRooms@b90902b
File link
So it happened even when shift-clicking regularly, without MT? In theory shift click-drag should behave the exact same way as regular shift-clicking.
I'm still trying to debug this thing...it's so annoying, sometimes it happens sometimes it doesn't I'm not sure what's causing it, I've removed the world folder on my server to get rid of datapacks, and it's still happening, on a local single player world it doesn't with the same mods, so I assumed it's the data packs...I'm going crazy
Could you test with and without Mouse Tweaks on your setup, and with just Mouse Tweaks on a clean Minecraft?
Update:
without MT on my setup it doesn't happen
with MT on clean install it doesn't happen
I guess enable one mod at a time with MT and see what's causing this?
Remove half of the mods. If the problem persists, it's in the installed half of the mods. If the problem goes away, it's in the half that you removed. Repeat the process until you find the culprit.
This way it'll take you about log_2(mod count) steps, rather than potentially (mod count).
Oh thanks, I didn't know how you call it, but that's what I did so I got down to 2 mods:
MouseTweaks-2.12-mc1.14.4.jar
secretrooms-6.0.1.jar
I can reproduce it with clean install...
I'm under linux by the way, maybe that has something to do with it?