尼科斯·格雷夫斯

尼科斯·格雷夫斯

一个严肃的模组,这样你就不会丢失你的物品了

游戏机制

Created for Remnants SMP Available on Github Issue Tracker on GitHub

展示

在岩浆池中失去所有物品的几率对你来说是不是太残酷了?

通用信息

  • 可以通过游戏规则 nicos_graves:spawn_player_graves 开关坟墓。
  • 坟墓的可访问性可以通过 nicos_graves:grave_access 更改。

兼容性

已知漏洞

存在一个漏洞:当你将模组从 1.21.9 更新到 1.21.10 时,世界中所有坟墓都会显示一个非常长的名称。此漏洞仅在更新 Minecraft 版本时出现。

开发者/整合包信息

要使一个物品成为灵魂绑定物品(即让该物品在死亡时保留),可以将该物品添加到标签 data/nicos_graves/tags/items/soulbound.json 中。

{
  "replace": false,
  "values": [
    "mod_id:my_cool_item"
  ]
}

或者,物品类可以实现接口 SoulboundItem,并重写 isRetained 方法。

package you.your_mod.items;

import net.minecraft.entity.player.PlayerEntity;
import net.minecraft.item.Item;
import net.minecraft.item.ItemStack;
import net.minecraft.world.World;
import nazario.nicosgraves.api.SoulboundItem;

public class MyCoolItem extends Item implements SoulboundItem {

    public MyCoolItem(Settings settings) {
        super(settings);
    }

    @Override
    public boolean isRetained(ItemStack stack, PlayerEntity player, World world) {
        return true;
    }
}