gnembon / fabric-carpet

Fabric Carpet
MIT License
1.73k stars 275 forks source link

In 1.20.5, the stackableShulkerBoxes rule causes stacked shulker boxes' stack size to appear incorrectly outside of the player's inventory #1899

Open DorkOrc opened 7 months ago

DorkOrc commented 7 months ago

Issue

In 1.20.5, there is a bug (MC-270846, marked as "Won't Fix") that causes items with a stack size higher than their max_stack_size component, to display their count incorrectly outside of the player's inventory.

This affects stackableShulkerBoxes as it does not modify the max_stack_size component for the client.

Steps for how to reproduce

  1. Enable the stackableShulkerBoxes carpet rule
  2. Stack some shulker boxes in your inventory. Observe that it displays the count correctly.
  3. Open a container, such as a chest, and move it into the container. Observe that it does not display the count correctly.
sakura-ryoko commented 7 months ago

This issue can be fixed using Tweakeroo's Stackable Shulker boxes feature in addition to the carpet rule; because the behavior you are referring to is Client side.

manchesterjm commented 7 months ago

Is there an updated to Tweakeroo? The only version I can find is for 1.20.4

sakura-ryoko commented 7 months ago

Is there an updated to Tweakeroo? The only version I can find is for 1.20.4

See the Masa Modding discord for more information, as this is the Carpet GitHub.

17183248569 commented 7 months ago

looks like this is just a special case of #1903 . i tried to use the method mentioned in #1903, and this bug disappeared too.

altrisi commented 7 months ago

Wondering how feasible it'd be to make it play nicer with vanilla clients with the new stack size stuff.

17183248569 commented 7 months ago

Wondering how feasible it'd be to make it play nicer with vanilla clients with the new stack size stuff.

i tried that before realizing this BUG is just a special case of 1903, and tried to fix it by rewriting the encoding of items, to sent a extra max size tag to the client side when the default max size of shulker box is changed.

and found that the issue of this fixing method is that: if the client is in creative mode, and the user take the item out of the box to his/her inventory, the fake tag becomes real and will stay with the item forever....

maybe that is doable , maybe after digging the code of screen and editing it a lot? 🤔

sakura-ryoko commented 7 months ago

It could be the network rules being out of sync, but I have noticed this issue myself testing tweakeroo switching it's related settings on and off, when the server is carpet, and also on the client and wondered why it wasn't working....

I was primarily testing to see how "nice" the setting plays with Carpet Mod, and noticed that re-enabling the tweakeroo settings fixed it because it was all a Client-side problem.

You're always welcome to download my "sakura" builds for 1.20.5+, if you want to test these things for mod compatibility reasons ...

Daniel99j2 commented 6 months ago

Wondering how feasible it'd be to make it play nicer with vanilla clients with the new stack size stuff.

i tried that before realizing this BUG is just a special case of 1903, and tried to fix it by rewriting the encoding of items, to sent a extra max size tag to the client side when the default max size of shulker box is changed.

and found that the issue of this fixing method is that: if the client is in creative mode, and the user take the item out of the box to his/her inventory, the fake tag becomes real and will stay with the item forever....

maybe that is doable , maybe after digging the code of screen and editing it a lot? 🤔

Here’s a proposed solution for that: If the player is in creative, send an additional client side tag like “stackableShulkerBox, and if any items have that tag on the server side as well as the custom stack size, then remove both tags.

17183248569 commented 6 months ago

Wondering how feasible it'd be to make it play nicer with vanilla clients with the new stack size stuff.

i tried that before realizing this BUG is just a special case of 1903, and tried to fix it by rewriting the encoding of items, to sent a extra max size tag to the client side when the default max size of shulker box is changed. and found that the issue of this fixing method is that: if the client is in creative mode, and the user take the item out of the box to his/her inventory, the fake tag becomes real and will stay with the item forever.... maybe that is doable , maybe after digging the code of screen and editing it a lot? 🤔

Here’s a proposed solution for that: If the player is in creative, send an additional client side tag like “stackableShulkerBox, and if any items have that tag on the server side as well as the custom stack size, then remove both tags.

i write some code to do the things you said. https://github.com/ch-yx/fabric-carpet/actions/runs/9054860589/job/24875193573 but i have no time to test it.

i m looking forward to some advices.