0

How do I make a loot table in Minecraft give me one of several items? I'm setting up a data pack where every player gets a random item every ten seconds, and want it to be less resource-intensive. I want it to drop one random item every time.

1
  • I'm no loot table expert, but don't you just need multiple entries? Then you can set their probabilities with weight, but maybe you don't even need to do that in your case. Nov 10, 2019 at 10:49

1 Answer 1

2

You would use multiple entries in a pool. For example, if you wanted it to give stone or dirt, you would use this:

{
  "type": "see below",
  "pools": [{
    "rolls": 1,
    "entries": [
      {
        "type": "item",
        "name": "stone"
      },
      {
        "type": "item",
        "name": "dirt"
      },
    ]
  }]
}

For type, refer to this from the wiki:

type: Optional type of the loot table. Must be one of empty if the loot table does not generate any loot, entity for loot an entity drops, block for loot a block drops, chest for a treasure chest, fishing for a fishing loot table, advancement_reward if it's used as a reward for an advancement or generic if none of the above apply.


See the wiki for more information.

You must log in to answer this question.

Not the answer you're looking for? Browse other questions tagged .