需要的工具

  • [KJS]Kubejs MOD

战利品表制作

创建数据包

数据包文件结构:

  • 数据包名称\data\airdrop_supply\loot_tables\ammo.json

  • 数据包名称\data\airdrop_supply\loot_tables\medic.json

如图所显:

战利品表数据包制作-第1张图片

战利品表编辑

代码如下:

{
  "pools": [
    {
      "rolls": 1,
      "entries": [
        {
          "type": "item",
          "name": "minecraft:stone"
          "weight": 20,
          "functions": [
              {
                "function": "set_count",
                "count": {
                  "min": 10,
                  "max": 20
                }
              },
              {
                "function": "set_nbt",
                "tag": "{Potion: 'minecraft:regeneration'}"
              }
            ]
          },
        }
      ]
    }
  ]
}
  • "rolls":抽取次数,

  • "name":"物品ID" (比如minecraft:stone替换成其他物品ID就可以)

  • "weight":权重,

  • "min":物品最小数,

  • "max":物品最大数

  • "tag":"{NBT数据标签}" (使用[KJS]Kubejs MOD可以查看物品的NBT数据标签)

如有多个自定义物品可以参考下列代码:

{
  "pools": [
    {
      "rolls": 1,
      "entries": [
        {
          "type": "minecraft:item",
          "name": "minecraft:stone",
          "functions": [
            {
              "function": "minecraft:set_nbt"
            }
          ]
        },
        {
          "type": "minecraft:item",
          "name": "minecraft:stone",
          "functions": [
            {
              "function": "minecraft:set_nbt"
            }
          ]
        }
      ]
    }
  ]
}

如想单独设置抽奖数的话可以:

{
  "pools": [
    {
      "rolls": 1,
      "entries": [
        {
          "type": "minecraft:item",
          "name": "minecraft:bread"
        }
      ]
    },
    {
      "rolls": 1,
      "entries": [
        {
          "type": "minecraft:item",
          "name": "minecraft:stone"
        }
      ]
    }
  ]
}

推荐工具

战利品表生成器:战利品表 生成器 - Minecraft 1.18, 1.19, 1.20 (misode.github.io)