B1n-ry / Youre-in-grave-danger

A minecraft mod which adds one single block. The grave, which will generate when you die, and store your items
https://www.curseforge.com/minecraft/mc-mods/youre-in-grave-danger
MIT License
65 stars 18 forks source link

Items disappearing after player kick #120

Open onycius opened 1 year ago

onycius commented 1 year ago

Describe the bug Players being killed through ticking entity crashes/errors don't formally die (there's no death message), despite them actually dying. Because of this, a grave does not spawn.

To Reproduce Steps to reproduce the behavior:

  1. Create an invalid ticking entity
  2. The entity gets killed and no grave is spawned

Expected behavior The player will instantly die, but the game does not register that they're dead. A grave does not spawn and all their items are lost.

Info

Additional context The crash occurred within the following scenarios so far: teleporting outside world border results in the suffocation death fighting a large HP and Attack Damage entity

Error: (https://mclo.gs/5KAGvAB)

EnderGirl1500 commented 3 months ago

That's vanilla behaviour and happens in other games as well... actually, it happens in different types of software too. I don't know if it's a 100% correct to use this term in this case, but I call those "mini rollbacks" since rollbacks are progress losses.

So, when the game crashes or is closed in the wrong way (like alt+f4), some of the most recent information is lost. That's why, with or without this mod, the game could remember you with no items in your inventory but not your death, so you lose everything. In some other cases, it can be the opposite: the game remembers your inventory with all your items, but also all the items on the floor / inside the grave. That's how many dupe glitches work.

So I don't think there's much that can be done to fix it since the issue stems from the game not having enough time to save all the progress before it closes unexpectedly.

B1n-ry commented 3 months ago

Well said. There is a chance I somewhere forget to mark the graves as updated, but I haven't checked yet, and might not do so for some time as the time I do modding, and in particular the time I work on this mod, is now exclusively in 1.20+ (since there's a massive large difference in the codebase between 1.19 and 1.20 releases). I'll probably close the issue when I've checked, but don't expect it to happen very soon. Also don't expect me to fix it when that happens. Sorry I have not said anything sooner