我的世界設置自定義方塊掉落的說明與樣例代碼
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")
晚餐骨:這里是一個物品列表的例子。這個現在是一個獎勵箱的普通例子。
調用的方式就像是一個列表,比如“設置附魔”,“設置損害值”,“設置nbt”,“設置元數據”諸如此類的東西。
權重是指與其他物品相比有機會獲得此項的概率。
晚餐骨給了一段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你打死我都不信。 |
單機攻略排行
下載排行
查看所有0條評論>>