TheIllusiveC4 / CorpseComplex

Minecraft Mod: Customize player death consequences, including selective keep inventory, soulbound enchantment, experience loss, respawn potion effects and more!
https://www.curseforge.com/minecraft/mc-mods/corpse-complex
Other
5 stars 9 forks source link

loss of all items upon death in base #40

Closed Oliv1ne closed 4 years ago

Oliv1ne commented 4 years ago

Versions (Be specific, do not write "latest"):2.77.5

Crash Log: Please use a paste site like hastebin.

democat3457 commented 4 years ago

By the way, @.TheIllusiveC4, this is also on the Rebirth of the Night modpack, with the same versions provided in #39, just in a different scenario.

TheIllusiveC4 commented 4 years ago

By the way, @.TheIllusiveC4, this is also on the Rebirth of the Night modpack, with the same versions provided in #39, just in a different scenario.

What mod(s) is providing the mobs mentioned in these scenarios (Fire Zombie and Brute Zombie)?

democat3457 commented 4 years ago

Both are from Special Mobs.

TheIllusiveC4 commented 4 years ago

Can either @Oliv1ne or @democat3457 describe the reproduction steps in more detail, and mention if they can reproduce this behavior consistently and reliably? As it is, I've downloaded the modpack and tested dying to both fire zombies and brute zombies dozens of times without experiencing a loss in inventory.

SandwichHorror commented 4 years ago

This has been an issue that's consistently plagued us for at least two months and has been notoriously difficult to reproduce - so I'm not sure if it's those mobs specifically. In many, if not all cases, players reported keeping their baubles intact, which makes me suspect that it is a faulty Corpse Complex interaction with some other mod - and not an unrelated "inventory deletion" bug with the modpack itself.

TheIllusiveC4 commented 4 years ago

In many, if not all cases, players reported keeping their baubles intact, which makes me suspect that it is a faulty Corpse Complex interaction with some other mod - and not an unrelated "inventory deletion" bug with the modpack itself.

I'm just speculating, so don't take this as my final stance or anything, but if their Baubles stays, then it actually does make me suspect it's an unrelated "inventory deletion" bug within the pack environment.

I'm going to proceed under the assumption that keeping Baubles in the modpack is performed by Corpse Complex and not possibly some other mod. If this is accurate, then the Corpse Complex inventory handlers are likely performing correctly as I can't think of a reason that the handler for Baubles specifically is somehow behaving differently than the others (they all share the same or similar logic, code-wise).

If that is the case, my hypothesis would be that something somehow is deleting all of the player's inventory before Corpse Complex can get to them, sporadically. This would explain why Baubles, a non-vanilla inventory, may have been exempted since whatever is doing that would likely not extend its behavior to non-vanilla inventories. This is further proven by https://github.com/TheIllusiveC4/CorpseComplex/issues/39 which states that the tool belt inventory was also successfully salvaged.

A simple way to test this theory would be to uninstall Corpse Complex from the pack and see if the issue persists/resolves. It's unfortunate that it's difficult to reproduce since that means the results would be relatively inconclusive even if the issue seemingly resolves, but it would be interesting to see if it persists.

TheIllusiveC4 commented 4 years ago

I had a bit of an afterthought after the previous message. There is one case I can think of where the vanilla inventory handler may actually fail and differ from the other handlers. If there is no space for a particular item on player respawn, then it wouldn't do anything and essentially trash the item. It's a bit of a long shot and I don't think it's the cause of this issue, but it's not the intended behavior anyways so I've released the change in version 1.0.11.1 if anyone wishes to test that update to see if it resolves this issue somehow.

Punkwashed commented 4 years ago

I am not sure how good my tests are, but i replaced the Corpse Complex file in Rebirth of Night to the 1.0.11.1 version. the bug is still happening with Brute Zombies. although it is behaving differently, normally on the death screen my hotbar empties, with the items reappearing after i re spawn (or not in the case of the bug). but now, everytime the bug occurs, the items are still in my hotbar on the death screen, then disappear after re-spawning.

Punkwashed commented 4 years ago

I have found something weird in the logs.. or i guess not in the logs. whenever the bug is occurring for me in 1.0.11.1. the logs do not say that I died. normally the logs say Punkwashed was slain by Zombie Brute

but when the bug occurs it says nothing both in game and in the log.

SandwichHorror commented 4 years ago

The Brute Zombie supposedly deals damage that "ignores some of the player's armor". I wonder if this damage source, if it is indeed a non-magical special physical damage type, is not registered properly, and when this part of the damage specifically is what kills the player, for some reason the player doesn't properly register as dead.

TheIllusiveC4 commented 4 years ago

I'm close to a revelation based on what you said @Punkwashed but I have two follow-up questions:

1) Do you still keep your Baubles/Tool Belt stuff like you said previously when the bug occurred? 2) Did the logs say Punkwashed was slain by Zombie Brute every time the bug occurred before you updated?

Punkwashed commented 4 years ago

I ran a test with both versions of corpse complex. both versions had the same issue, when the bug occured it would not say that I died. let me test the baubles right now.

Punkwashed commented 4 years ago

Baubles and all items in toolbelt stay in place even when the hotbar and armor are deleted.

TheIllusiveC4 commented 4 years ago

One more question. When the bug occurs, and you do not get your items back, do you come back with full food bars or not?

Punkwashed commented 4 years ago

No, I come back with half hunger and some saturation (hunger;12 sat:5) when the bug does and doesn't occur.

Punkwashed commented 4 years ago

I dont know if it makes a difference but i use the twitch launcher to launch the game.

TheIllusiveC4 commented 4 years ago

No, I come back with half hunger and some saturation (hunger;12 sat:5) when the bug does and doesn't occur.

Is it always 12 and 5? The bigger question is, if you have full food bars before, do you still spawn with those values? I'm also curious because the configs say that "keepSaturation" is set to false, yet you still spawn with some.

Punkwashed commented 4 years ago

i tried eating and getting full hunger and it would always default to 12 hunger and 5 saturation every-time, with or without bugging.

TheIllusiveC4 commented 4 years ago

Okay, so I was actually able to reproduce this bug a couple times with a build of Corpse Complex that logs every time it calls the store and retrieve inventory methods. I found out that when the bug occurs, the death event doesn't actually happen. Corpse Complex's store inventory method never even gets called. This explains why @Punkwashed does not receive a slain message, and why no player zombie spawns when this occurs.

That being the case, I'll have to close this issue as Corpse Complex is not responsible for this behavior. It's unfortunate that all this discussion has led to this outcome, but there's really nothing I can do from my end if Corpse Complex isn't even being called.

Punkwashed commented 4 years ago

Thank you for your assistance.