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