henkelmax / gravestone

Places a gravestone with your inventory items inside when you die.
21 stars 35 forks source link

Dying in the same moment that you break your gravestone will result in all your items being deleted. #173

Closed abrachoo closed 2 months ago

abrachoo commented 2 months ago

Bug description

Dying in the same moment that you break your gravestone will result in all your items being deleted. The items will appear on the hotbar during the death screen and the new gravestone will only have the previous gravestone's obituary in it. All of the items will be nowhere to be found.

Minecraft version

1.21

Mod version

1.21-1.0.19

Mod loader and version

NeoForge 21.0.148

Steps to reproduce

  1. Die with all your items in your inventory
  2. Break your gravestone and die again at the same time
  3. Break your new gravestone and see that only the obituary remains

Expected behavior

All the items from the first gravestone should be in the new one

Log files

https://gist.github.com/abrachoo/b96aa9a717592961c0dd8f5e49e2534f

Screenshots

No response

henkelmax commented 2 months ago

Is there a setup to consistently reproduce this?

abrachoo commented 2 months ago

I'm not sure about consistency since I don't think you can automate breaking your gravestone, but I was able to reproduce it a few times with this setup.

2024-08-16_19 50 15

The command block has /kill @p

Just push the button and then break the gravestone just before it kills you. I did this in creative mode. It may take a few tries. Be sure to actually have something in your inventory to start with so you can tell when it's gone.

henkelmax commented 2 months ago

I tried your setup for about 50 times and I never once was able to reproduce the issue. The items of the other gravestone are always in the new gravestone.

abrachoo commented 2 months ago

I have recorded a video of it happening https://www.youtube.com/watch?v=b9efa1Jt8Ps

henkelmax commented 2 months ago

Does that happen with just the gravestone mod installed?

abrachoo commented 2 months ago

Yes. I installed a new instance of the latest version of minecraft (1.21.1), neoforge (21.1.18), and gravestone (1.21.1-1.0.20) and nothing else. It took a few more tries, but I was able to make it happen with the same setup. I suspect it's easier to reproduce when there is a little bit of block lag, but that's just speculation on my part.

henkelmax commented 2 months ago

I was able to reproduce it once by running a server and adding a second of simulated latency. I think I have found the cause of the issue. Here is a version that should fix the issue (please unzip the file). Can you check if this fixes it for you? gravestone-forge-1.20.1-1.0.21-rc1.zip

abrachoo commented 2 months ago

I was unable to reproduce the issue with that version, so I think it does in fact fix it.

henkelmax commented 2 months ago

Nice!

Aceplante commented 1 month ago

This just happened on 1.16. How do I get my items if I dont have the obituary?