Smart Keep Inventory
原版中你只能选择始终保留物品栏或从不保留。Smart Keep Inventory 允许你决定在何种条件下玩家死亡后应保留其物品栏。
例如,你可以将其配置为仅在玩家被特定生物击杀时才保留物品栏。
默认情况下,此模组会使得玩家在被 Boss(标记为 c:bosses 的生物)击杀时保留其物品栏和经验值。
⚙️ 配置
配置通过数据包完成。
条件定义位于 data/<namespace>/smart_keep_inventory/condition 下的文件中,格式如下:
{
"player": <EntityPredicate>, // 可选。这是死亡的玩家
"killer": <EntityPredicate>, // 可选。杀死玩家的实体。直接或间接
"damage": <DamageSourcePredicate>, // 可选。杀死玩家的伤害来源
"keepExperience": <true | false>, // 默认为 true。是否也保留玩家的 experience 值
"disabled": <true | false> // 可选。仅用于禁用具有相同 ID 的现有条件
}
有关谓词(Predicates)的更多信息,请参阅 Minecraft Wiki:
该模组还允许你反转 EntityPredicate。语法如下:
// 不只是使用 <EntityPredicate>,而是这样包裹它
{
"invert":true,
"predicate": <EntityPredicate>
}
示例:
这允许玩家在被僵尸击杀时保留物品栏但不保留经验值。
{
"killer": {
"type": "minecraft:zombie"
},
"keepExperience": false
}
以下是应用于 Boss 的模组默认配置:
{
"killer": {
"type": "#c:bosses"
}
}
兼容性
此模组应支持任何添加物品栏的模组(如 Curios、Accessory 等),前提是该模组已遵守游戏规则。
墓碑模组也应得到支持,如果它们已经检查了该游戏规则。在这种情况下,如果玩家保留了物品栏,则不应生成墓碑。
Smart Keep Inventory
In vanilla you can only either have keep inventory enabled all time or not. Smart Keep Inventory allows you to decide under which conditions the players inventory should be kept upon death.
For example you can have it configured to only allow keep inventory if the player is killed by a specific mob.
By default this mod makes it so players will keep their inventory and experiences if they are killed by bosses (mobs tagged as c:bosses)
⚙️ Configuration
Configuration is done via a datapack.
Conditions are defined via a file under data/<namespace>/smart_keep_inventory/condition
and have the following format:
{
"player": <EntityPredicate>, // Optional. This is the player that died
"killer": <EntityPredicate>, // Optional. This entity that killed the player. Directly or indirectly
"damage": <DamageSourcePredicate>, // Optional. The damagesource that killed the player
"keepExperience": <true | false>, // Default true. Whether to also keep the players experiences or not
"disabled": <true | false> // Optional. Only used to disable an EXISTING condition with the same id
}
For more information about predicates check out the minecraft wiki under
The mod also allows you to invert EntityPredicate. The syntax for that is as follow:
// Instead of just <EntityPredicate> wrap it like this
{
"invert":true,
"predicate": <EntityPredicate>
}
Example:
This allows the player to keep their inventories if they are killed by a zombie but not their xp.
{
"killer": {
"type": "minecraft:zombie"
},
"keepExperience": false
}
The following is the default configuration of the mod applying to bosses:
{
"killer": {
"type": "#c:bosses"
}
}
Compability
This mod should support any mod adding inventories (Curios, Accessory etc.) provided they respected the gamerule already.
Gravestone mods should also be supported if they already check the gamerule. If a player keeps their inventory a grave should not be generated in that case.
下载 Smart Keep Inventory
下载 Smart Keep Inventory
需要联机服务器吗?
稳定流畅、一键部署,几分钟即可和朋友联机开服
最低仅需 8 元/月 即可畅快联机
下载 Smart Keep Inventory
下载 Smart Keep Inventory
需要联机服务器吗?
稳定流畅、一键部署,几分钟即可和朋友联机开服
最低仅需 8 元/月 即可畅快联机
下载 Smart Keep Inventory
需要联机服务器吗?
稳定流畅、一键部署,几分钟即可和朋友联机开服
最低仅需 8 元/月 即可畅快联机
下载 Smart Keep Inventory
下载 Smart Keep Inventory
需要联机服务器吗?
稳定流畅、一键部署,几分钟即可和朋友联机开服
最低仅需 8 元/月 即可畅快联机
下载 Smart Keep Inventory
需要联机服务器吗?
稳定流畅、一键部署,几分钟即可和朋友联机开服
最低仅需 8 元/月 即可畅快联机
下载 Smart Keep Inventory
需要联机服务器吗?
稳定流畅、一键部署,几分钟即可和朋友联机开服
最低仅需 8 元/月 即可畅快联机
下载 Smart Keep Inventory
需要联机服务器吗?
稳定流畅、一键部署,几分钟即可和朋友联机开服
最低仅需 8 元/月 即可畅快联机
Smart Keep Inventory 1.1.0
-
更新至 26.3
- 更新至 26.2 -
添加用于反转玩家与击杀者谓词逻辑的选项。例如:
// 假设您想反转以下内容
{
"killer": {
"type": "#c:bosses"
}
}
// 然后将其包裹如下。现在这将针对除 Boss 之外的所有生物
{
"killer": {
"invert": true,
"predicate": {
"type": "#c:bosses"
}
}
}
有关过往版本,请参阅:
关于这个资源的讨论、问题反馈与使用心得
还没有讨论,来发第一帖吧
你是这个资源的作者?登录后可认领此资源。
相似资源
模组
显示你正在注视的方块的信息。(适用于 Minecraft 1.16+ 的 Hwyla/Waila 分支)
模组
使用 JavaScript 编辑配方、添加自定义物品、编写世界事件!
模组
查看物品与配方
模组
在游戏画面角落显示附近世界地形、玩家、生物和实体的地图。可创建路径点,帮助你找到标记过的位置。
模组
AE2:一款流行的自动化与存储模组
模组
那是什么?一个 Waila/Hwyla 的分支。
评论 0
登录后参与评分
还没有评论,来抢沙发吧