Compatibility
Minecraft: Java Edition
Platforms
Supported environments
Tags
Creators
Details
YSM Corpse Compatibility is a lightweight addon for Minecraft 1.20.1 Forge that bridges Corpse and Yes Steve Model. It ensures that when a player dies, the resulting corpse accurately reflects their YSM model and texture at that exact moment, without interfering with Corpse's core mechanics.
模组介绍
这是一个适用于 Minecraft 1.20.1 Forge 的兼容附属模组,用于让 Corpse 尸体正确显示玩家的 Yes Steve Model(YSM) 外观。Corpse 继续负责尸体生成、容器、物品交互和生命周期,本模组只负责创建独立的视觉尸体。
Implementation Principles:
When a player dies, the mod captures an appearance snapshot, including the player's UUID, facing direction, and YSM's model_id and select_texture.After Corpse spawns the corpse, the mod reads its data via reflection and attaches the snapshot.An independent YsmCorpseEntity is created as the visual entity.
For each corpse, the client creates a dedicated SnapshotDummyPlayer, which is not added to the player list and does not execute normal ticks.The association is maintained via the source Corpse's UUID. When the Corpse is destroyed, the visual entity is removed synchronously. If a chunk is unloaded, SavedData is used for delayed cleanup.
实现原理 玩家死亡时截取外观快照,包括 UUID、朝向、YSM 的 model_id、select_texture。
Corpse 生成尸体后,通过反射读取其数据,并附加快照。创建独立的 YsmCorpseEntity 作为视觉实体。客户端为每具尸体创建专属的 SnapshotDummyPlayer,不加入玩家列表,也不执行正常 tick。通过源 Corpse UUID 建立关联,Corpse 被销毁时同步删除视觉实体;区块未加载时则使用 SavedData 延迟清理。


