Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

live_shell predicate gets buggy with impersonation #605

Open
Dunk0w0 opened this issue Nov 22, 2022 · 0 comments
Open

live_shell predicate gets buggy with impersonation #605

Dunk0w0 opened this issue Nov 22, 2022 · 0 comments
Labels
bug Something isn't working feature request Request to add new features

Comments

@Dunk0w0
Copy link

Dunk0w0 commented Nov 22, 2022

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.

@PsychoBreadstick PsychoBreadstick added bug Something isn't working feature request Request to add new features labels Mar 5, 2023
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
bug Something isn't working feature request Request to add new features
Projects
None yet
Development

No branches or pull requests

2 participants