PaperMC / Paper

The most widely used, high performance Minecraft server that aims to fix gameplay and mechanics inconsistencies
https://papermc.io/
Other
10.02k stars 2.32k forks source link

shulker box/block disapearing when placed on block that a mob is moving through #7854

Open James-Tripper opened 2 years ago

James-Tripper commented 2 years ago

Expected behavior

When i try to place a block and a quick moving mob crosses the block while i am placing it I would expect that the block would be re written into my inventory, as that seems to be what has happened with regular blocks, but this time i was placing a shulker full of equipment in the nether while a baby zombified piglin ran through the placement. the shulker full on disappeared. not back in my inventory, not on the ground where i tried to place it. I shut down the game (client) and started making this bug report then thought to reload the game to see if it just hadn't rendered. Upon logging back in i found the shulker back in my hand, but

Observed/Actual behavior

this time i was placing a shulker full of equipment in the nether while a baby zombified piglin ran through the placement. the shulker full on disappeared. not back in my inventory, not on the ground where i tried to place it. I shut down the game (client) and started making this bug report then thought to reload the game to see if it just hadn't rendered. Upon logging back in i found the shulker back in my hand, but this is not something that i enjoy happening.

Steps/models to reproduce

go the the nether, or wherever, try and place blocks, or shulkers full of stuff, and do it where quick moving friendly/neutral mobs are close by. chickens work, or baby piglins, zombified or otherwise. or sheep/cows when trying to build fences around them, it's bound to happen eventually. DON'T TRY TO PUT IT ON THE MOB, JUST ON THE BLOCK THAT THE MOB IS CROSSING

Plugin and Datapack List

vane suite 1.8.2 squaremap 1.1.2 Plugins (10): ProtocolLib, squaremap, vane-admin, vane-bedtime, vane-core, vane-enchantments, vane-permissions, vane-portals, vane-regions, vane-trifles

Paper version

This server is running Paper version git-Paper-350 (MC: 1.18.2) (Implementing API version 1.18.2-R0.1-SNAPSHOT) (Git: 3f7fbe3) You are running the latest version Previous version: git-Paper-305 (MC: 1.18.2) also previous version, with same results, 260

Other

more information: this disappearing block thing has been happening pretty much since I've been using paper, but it's the first time that the block didn't promptly show up back in my inventory. and it's the first time it happened with a shulker box this probably doesn't help and should be made into it's own bug, but anyway.. I updated to 350 from 260 because i was getting an increase of nether portals losing their link. I'd go into the nether just fine, but on returning to the over-world i would be routed to a newly spawned gate that wasn't even in the same chunk. this is something that happened with every gate after updating to 1.18 from 1.17, but now it was happening randomly. updating to 350 seemed to fix the issue. if it does continue then it will get a issue report.

lynxplay commented 2 years ago

I am having trouble replicating this. While such placement resulted in a ghost item stack (the client believed it was gone, while it still existed on the server) a simply re-join or update of the slot through clicking synced it and the shulker box returned.

Can you provide any further reproduction steps ? Does this happen on a server without your suite of plugins ?

James-Tripper commented 2 years ago

Maybe i didn't explain it properly, but it seems to me that you reproduced it perfectly and got it spot on. The server knew where it was and what it was doing while the client (ie, me) had a panic attack. and yes, a rejoin made the shulker box return. I just thought that maybe this was a bug that warranted being fixed.

Machine-Maker commented 2 years ago

I'm not sure if this is solvable. I think this is the result of tiny desyncs in positions of mobs between the client and the server. When the client tries to place a block, it thinks it should succeed, but the server says no. This is the reason in places where the server stops you from placing blocks (like a worldguard protected region) it manually sends an inventory update to re-sync with the client. I don't know how easy it would be to tell that a re-sync is needed. And I think its too much to send an inventory update after every block place.

lynxplay commented 2 years ago

Yea I feel like that a full resync is overkill. I'll mark it as accepted for now with low priority.

James-Tripper commented 2 years ago

Fair enough. Thanks for looking into it guys