一种基于重生点的部分 KeepInventory 机制。
当你设置重生点时,你的物品栏会在此刻被保存。死亡后,仅恢复该次保存时的物品。所有其他物品将在你的死亡位置掉落。
例如,如果你在进入某个结构之前设置了重生点并随后死亡,你将保留进入结构前的装备,但在结构内收集的战利品将会掉落。
更多详情
-
支持床和重生锚,并且应该能兼容 大多数 模组化的重生系统
-
你可以再次点击重生点来重新保存物品栏
-
部分堆叠的物品会被保留,因此如果你保存时有 10 个钻石,又收集了 10 个钻石然后死亡,你将保留 10 个钻石,另外 10 个钻石会掉落
-
处理了 Bundle(收纳袋)和潜影盒的内容物,例如如果你先保存物品栏,然后将一些物品放入 Bundle 中然后死亡,你应该保留所有物品
-
即使物品栏中的物品位置发生了变动,物品仍会被恢复;不过在部分恢复的情况下,顺序可能会影响堆叠的分割方式
-
默认情况下,如果重生方块被破坏或缺失,你的物品不会被保存。你可以通过游戏指令 savepoint:restore_without_spawnpoint 更改此行为。
-
默认情况下,经验值不会被保存。你可以通过游戏指令 savepoint:restore_experience 更改此行为。
-
在比较物品时,会检查 #savepoint:restore_compare 标签中的组件。默认情况下,以下组件不包含在内:
欢迎提交 Issue 以建议更多需要忽略的组件
注意事项
A kind of partial KeepInventory based on spawn points.
When you set your spawn, your inventory will be saved at that instant. When you die, only the items you had for that save will be restored. All your other items will drop at your death location.
For example, if you set your spawn before looting a structure and then die, you will keep the equipment you had before going into the structure, but the loot you collected while inside will drop.
More Details
-
Works with beds and respawn anchors, and should work with most modded respawn systems
-
You may click the respawn point again to save your inventory again
-
Partial stacks are preserved, so if you save with 10 diamonds, collect 10 more diamonds, and then die, you will keep 10 diamonds and drop 10 diamonds
-
Contents of bundles & shulker boxes are handled, for example if you save your inventory then put some items inside a bundle then die, you should keep all your items
-
Items are still restored even if inventory items are moved around, although in a partial restore scenario the order may affect how stacks are split
-
By default your items are not saved if your respawn block is destroyed or missing. You can change this with the gamerule savepoint:restore_without_spawnpoint.
-
By default, XP is not saved. You can change this with the gamerule savepoint:restore_experience.
-
When comparing items, components in #savepoint:restore_compare are checked. By default, this does not include:
- Durability
- Map markers
- Writable book content
Feel free to open an issue with suggestions for more ignored components
Notes
- Works server-side, so it works with vanilla clients. The only client feature is potential translations for the "Inventory Saved" message in the future.
- Inspired by Respawn Save Points by seymourimadeit and CreativelyJake, check them out!
- Compatible with Revive
- Might be compatible with some gravestone mods
- [≤1.21.11] compatible with Accessories
- [≥26.1] compatible with Trinkets Updated
- If you're in singleplayer and want a mod that resets not only your inventory but the whole world, see Save State
- Requires Fabric API and Fabric Language Kotlin
- Pairs well with a mod that makes your items not fly everywhere when you die
评论 0
登录后参与评分
还没有评论,来抢沙发吧