Requiem - Pandemonium Expansion

Requiem - Pandemonium Expansion

55k Downloads

live_shell predicate gets buggy with impersonation

Dunk0w0 opened this issue ยท 0 comments

commented

So what I'm trying to do is set it up so that on a server there are two teams, alive and dead. I want to make it so a player who is dead is automatically put on the dead team but not if they are still alive. I want to could having a shell and just disassociating as still alive, which is how having the live_shell predicate is super useful with being able to tell if when someone is ethereal they are just disassociating with emancipation or if they are dead. Unfortunately, the live_shell predicate gets confused with impersonation involved. For instance, if someone were to disassociate and then someone where to possess their shell, the game would think that the original player's shell had died and would put the player on the dead team, which causes issues because their shell is very much still alive it just is being used. Incase my explanation wasn't the best here are some screenshots of what I mean

2022-11-21_19 34 07
2022-11-21_19 34 15
2022-11-21_19 34 24
2022-11-21_19 34 30

A solution I have tried is to have a scoreboard that tracks whether or not someone is being impersonated using this command:

/execute as @A store result score @s impersonating run impersonate disguise query @s

and then having it only activate the command if nobody is being impersonated and somebody is ethereal (for some reason the impersonate query command outputs a 1 for not impersonating and 0 for is impersonating)

/execute unless entity @A[scores={impersonating=0}] if entity @A[scores={ethereal=1}] as @A[predicate=!requiem:live_shell,nbt={cardinal_components:{"requiem:remnant":{ethereal:1b}}}] run scoreboard players set @s deaths 2

but yet this still doesn't work and still puts the players on the dead team who have their shells being possessed by someone else. I do know that this would probably be a little hard to solve as I know when you possess someone's shell the game is deleting the shell and using the impersonate mod to disguise the player as who they are impersonating, so I do understand if this is a tricky one to tackle. I just am hoping for some way to distinguish if a player has an alive shell and its just being possessed or if their shell is dead.