Mohist icon indicating copy to clipboard operation
Mohist copied to clipboard

[1.16.5] All mod properties on players lost after death

Open MCUmbrella opened this issue 3 years ago • 7 comments

Minecraft Version : 1.16.5

Mohist Version : 923

Operating System : Linux

Logs : Nothing. It's just like normal

Mod list : mcwbridges, minecraft, ftbessentials, ftblibrary, bluemap, aoa3, creeperheal, bettercaves, quark, autoreglib, sit, performant, yungsapi, backpacked, upstream, betterstrongholds, randompatches, cfm, architectury, ferritecore, byg, forge, chinjufumod, bettermineshafts, betterendforge

Plugin list : https://haste.mohistmc.com/lesunatapi

Description of issue : All mod properties on players(e.g. AoA3 skill level, the backpack from Travellers Backpack you are currently equipped) will be lost after death, even though the mod offers the option to keep them. Issue #1940 #1947 and #1954 is also about this situation.

MCUmbrella avatar Jan 22 '22 00:01 MCUmbrella

#2003 also notes properties being reset on death

Mike5357 avatar Jan 22 '22 00:01 Mike5357

The respawn code looks a bit weird: https://github.com/MohistMC/Mohist/blob/b2f20aa287c7b465a067581b91a4f5d9a57ed7c8/patches/minecraft/net/minecraft/server/management/PlayerList.java.patch#L694-L707 why are things like id copied from the "old" player object to the "new" one, when both objects are identical?

I'm not entirely sure, but it assume mainly this line could be the part of this issue: https://github.com/MohistMC/Mohist/blob/b2f20aa287c7b465a067581b91a4f5d9a57ed7c8/patches/minecraft/net/minecraft/server/management/PlayerList.java.patch#L710 This probably simply overrides the existing capabilities with new ones. Usually one could copy the capability data from the old player object afterwards, but that does not exist here, so the data is lost. Can you just call #reviveCaps here instead?

maxanier avatar Jan 27 '22 22:01 maxanier

Probably fixed with https://github.com/MohistMC/Mohist/commit/37cdfa9238456e638491d20194ea01a6794cce42

maxanier avatar Jan 30 '22 13:01 maxanier

It also happens when a player change dimension.

Exiels avatar Jan 30 '22 23:01 Exiels

It also happens when a player change dimension.

On the latest release? (933)

Mike5357 avatar Jan 30 '22 23:01 Mike5357

Yes, Mohist-1.16.5-933

Exiels avatar Jan 30 '22 23:01 Exiels

It no longer happens when a player changes dimension, at least not as far as I tested it on 953

nyaalex avatar Feb 09 '22 17:02 nyaalex

fixed

Mgazul avatar Jul 05 '23 11:07 Mgazul