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条
展开其余评论