Carpet Shadow

Carpet Shadow

11.9k Downloads

pick block does not pick shadowed items on server

TyIuNnG opened this issue ยท 7 comments

commented

Describe the bug
In single-player, players can middle-click a block to pick the block from inventory if available. This works with shadowed-item as well, but on server this only works if the mod is installed on both server and client side in my past experience with the mod. However in V1.9.6-1.19, pick block doesn't pick anything even if the mod is presented on both sides.

To Reproduce
middle-click any block

Expected behavior
items will be picked from inventory even if it's shadowed item

commented

that happens because the setting 'shadowItemTooltip' is active.
on servers the mod uses the lore Nbt Tag to show the tooltip to the clients that effectively makes clients think it is a different item preventing middle-click actions.
the client side mod removes the tag and shows the tooltip with it's own edit to the code instead.

TL:DR:
disable 'shadowItemTooltip' to fix the issue

commented

thanks that fix the issue, but why does the client side not remove the tag and do the thing you said?

commented

probably some changes in the client code that i didn't notice when i converted the mod to 1.19 have to investigate more in the future

commented

alright thanks for the help, I guess the client code will take some time to fix

commented

probably some changes in the client code that i didn't notice when i converted the mod to 1.19 have to investigate more in the future

or could it possibly be because of the latest change changes
MutableText sub = MutableText.of(new LiteralTextContent(((ShadowItem) (Object) this).getShadowId()));
to
MutableText sub = MutableText.of(new LiteralTextContent(((ShadowItem) (Object) instance).getShadowId()));
Although I do not think it has much to do with it.

commented

Yes, it is fixed now, thank you so much!

commented

Potentially Fixed by latest release, please confirm and close the issue ๐Ÿ˜„