Skip to content

關於 playDeathAnimation 的建議 #1

@LeeGodSRC

Description

@LeeGodSRC

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

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

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

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

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

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions