跑跑車首頁

當前位置:首頁攻略秘籍單機攻略 → 我的世界設(shè)置自定義方塊掉落的說明與樣例代碼

我的世界設(shè)置自定義方塊掉落的說明與樣例代碼

作者:佚名來源:本站整理 發(fā)表時間:2015/10/20 8:49:24 評論(0)

This is an example of a loot table. It's the "bonus chest" right now, one of the simpler examples.

Functions would be a list of stuff to apply, like: "set enchants", "set damage", "set nbt", "set data", etc.

("weight" is "chance of getting this vs something else")

晚餐骨:這里是一個物品列表的例子。這個現(xiàn)在是一個獎勵箱的普通例子。

調(diào)用的方式就像是一個列表,比如“設(shè)置附魔”,“設(shè)置損害值”,“設(shè)置nbt”,“設(shè)置元數(shù)據(jù)”諸如此類的東西。

權(quán)重是指與其他物品相比有機會獲得此項的概率。

晚餐骨給了一段json。

[
  {
    "item": "minecraft:stick",
    "weight": 10,
    "functions": [
      {
        "function": "minecraft:set_count",
        "min": 1,
        "max": 3
      }
    ]
  },
  {
    "item": "minecraft:planks",
    "weight": 10,
    "functions": [
      {
        "function": "minecraft:set_count",
        "min": 1,
        "max": 3
      }
    ]
  },
  {
    "item": "minecraft:log",
    "weight": 10,
    "functions": [
      {
        "function": "minecraft:set_count",
        "min": 1,
        "max": 3
      }
    ]
  },
  {
    "item": "minecraft:stone_axe",
    "weight": 3
  },
  {
    "item": "minecraft:wooden_axe",
    "weight": 5
  },
  {
    "item": "minecraft:stone_pickaxe",
    "weight": 3
  },
  {
    "item": "minecraft:wooden_pickaxe",
    "weight": 5
  },
  {
    "item": "minecraft:apple",
    "weight": 5,
    "functions": [
      {
        "function": "minecraft:set_count",
        "min": 2,
        "max": 3
      }
    ]
  },
  {
    "item": "minecraft:bread",
    "weight": 3,
    "functions": [
      {
        "function": "minecraft:set_count",
        "min": 2,
        "max": 3
      }
    ]
  },
  {
    "item": "minecraft:log2",
    "weight": 10,
    "functions": [
      {
        "function": "minecraft:set_count",
        "min": 1,
        "max": 3
      }
    ]
  }

]

這不是官方API你打死我都不信。



玩家評論
我要點評

網(wǎng)名 注:您的評論需要經(jīng)過審核才會顯示出來。

已有 0 位玩家參與點評
下載排行