Stacker icon indicating copy to clipboard operation
Stacker copied to clipboard

Compatibility with Inventory-Profiles

Open QZLin opened this issue 2 years ago • 4 comments

Cannot sort oversized stack with Inventory-Profiles when join multiplayer game https://github.com/blackd/Inventory-Profiles/issues/169#issuecomment-1242669423

Found something funny, I use Stacker (Andrew6rant/Stacker) and Inventory-Profiles on Minecraft fabric 1.19.1. Sort function will not work for oversized stacks if I directly join a multiplayer game. But if I leave the multiplayer game then open a local world and close it, sorting will work on both the local world and multiplayer world (for oversized stacks).

Looks like the problem is caused by Stacker because because ItemStack::getMaxCount returns 64 when connected to a server. IPN uses this value to check if the stack is oversized. image I suggest you report this to Stacker.

QZLin avatar Sep 10 '22 11:09 QZLin

Any news on this?

Wubzzz1337 avatar Feb 28 '23 17:02 Wubzzz1337

@Andrew6rant

https://github.com/blackd/Inventory-Profiles/issues/293#issuecomment-1448526621

<3

Wubzzz1337 avatar Mar 02 '23 10:03 Wubzzz1337

Bumping because this is a quick fix and hope dev will see it :( @Andrew6rant

Wubzzz1337 avatar Mar 24 '23 15:03 Wubzzz1337

Stacker has a fundamental problem with the way I coded it - namely the fact that I didn't account for dedicated servers compared to integrated servers.

In earlier mod versions it wasn't too bad. I used Cloth Config as the config API (which was only built and meant for client use), so I had no protection against client-server desync if the configs did not match up. But in the switch from 1.18.1 to 1.18.2, or maybe it was 1.18.2 to 1.19, Minecraft changed the way blocks and items were registered - to be initialized on world load versus right at the start of the game. This I believe, is where the issue first popped up.

It isn't a quick fix to implement, but it is a necessary one. This was my second ever mod, and at the beginning I built it without really knowing what I was doing.

I don't have the time to dedicate to rewriting the mod at the moment, but I am planning on overhauling the whole system in the future.

Andrew6rant avatar Mar 24 '23 22:03 Andrew6rant