Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Client crash on rendering a cart #74

Closed
RogueRaiden opened this issue Jul 20, 2023 · 4 comments
Closed

Client crash on rendering a cart #74

RogueRaiden opened this issue Jul 20, 2023 · 4 comments
Labels
bug Something isn't working

Comments

@RogueRaiden
Copy link

https://pastebin.com/NMA5dqhN

so a player says they were in the cart inventory and pressed a "sort" button and now any client who loads the cart crashes out of the server.

@RogueRaiden
Copy link
Author

sort button is from Xandus Inventory Tweaks

@RogueRaiden
Copy link
Author

was able to get around it by disabling the cart entity and loading the world, causing it to not exist

@TaskaRaine
Copy link
Owner

Oh dear, that mod gets applied to carts? :V

They were not designed with sort-ability in mind. The inventory object(the chest) on the cart always needs to be the very first object in the inventory, that way I can access specific attributes that tell the cart all sorts of information about the inventory object. Whatever object is taking that space, if any, doesn't have those same attributes that it's expecting and causing issues. Even if it didn't crash... there's no way for the client to know how many slots are in that inventory anymore so none of the items would even be accessible without breaking the cart itself.

I don't know if there's a quick way of solving this problem. I could separate it into two independent inventories... that should solve the problem in this specific case. But as soon as I try to extend to support multiple inventory blocks... there's still going to be wonkiness if those blocks themselves get sorted. Either way, things would need to be refactored, unfortunately

@TaskaRaine TaskaRaine added the bug Something isn't working label Jul 21, 2023
@TaskaRaine
Copy link
Owner

It looks like Xandu released an update to Xandus Inventory Tweaks which adds a blacklist for the sorting feature. Ancient Tools carts are on the blacklist by default ^_^

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
bug Something isn't working
Projects
None yet
Development

No branches or pull requests

2 participants