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

關於 playDeathAnimation 的建議 #1

Open
LeeGodSRC opened this issue Jun 21, 2021 · 0 comments
Open

關於 playDeathAnimation 的建議 #1

LeeGodSRC opened this issue Jun 21, 2021 · 0 comments

Comments

@LeeGodSRC
Copy link

由於 CraftCommon.playDeathAnimation 的使用情況通常會先將原版的玩家隱藏

因此 EntityTracker 也不會去發送任何與之相關的packet

所以我認為似乎沒有必要重新創建新的 EntityPlayer 實體
直接沿用原本的 EntityPlayer
send Spawn & Status Packet

然後在 20 ticks 之後將 send destroy packet
這樣就可以達成一個簡單的 fake death animation
而且因為是直接沿用同個 EntityPlayer, ID是一樣的
因此就不需要去管 PlayerInfo

但也因此需要保證在 20 ticks 內不會發生 showPlayer 的狀況

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

1 participant