In Control!

In Control!

74M Downloads

[loot.json] Spawning only one item out of a list

DJYoloSwag07 opened this issue ยท 0 comments

commented

Hello,

I was wondering how to write my loot.json file so that there is a 70% chance that an item drops out of a list of items.

I've tried using a list of items but it makes it so that there is a 70% chance that ALL items of the list are dropped.

I've tried using itemcount but it multiplies the amount of items dropped.

[
    {
        "mob": "minecraft:zombie",
        "remove": ["minecraft:rotten_flesh", "minecraft:iron_ingot", "minecraft:potato"],
        "result": "deny"
    },
    {
        "mob": "minecraft:zombie",
        "random": 0.05,
        "item": "toughasnails:purified_water_bottle"
    },
    {
        "mob": "minecraft:zombie",
        "random": 0.35,
        "item": ["foodexpansion:itemchocolatebar", "minecraft:fermented_spider_eye"]
    },
    {
        "mob": "minecraft:zombie",
        "random": 0.7,
        "item": ["minecraft:string", "minecraft:gunpowder", "minecraft:feather", "minecraft:wheat_seeds", "minecraft:bone", "minecraft:leather", "minecraft:apple", "minecraft:bread", "minecraft:potato", "minecraft:carrot", "minecraft:spider_eye", "minecraft:rotten_flesh", "minecraft:poisonous_potato"]
    }
]

Thanks in advance!