Mojira Archive
MC-275648

Conditions don't work on the sequence function in loot tables

In loot tables, conditions on the `sequence` function don't have any effect

What I expected to happen was...:
The conditions should be applied

What actually happened was...:
The conditions don't have any effect

Steps to Reproduce:
1. Create a loot table in a datapack
2. Apply the sequence function to an item. Example :

{
  "pools": [
    {
      "rolls": 1,
      "entries": [
        {
          "type": "minecraft:item",
          "name": "minecraft:bow",
          "functions": [
            {
              "function": "minecraft:sequence",
              "functions": [
                {
                  "function": "minecraft:set_enchantments",
                  "enchantments": {
                    "minecraft:infinity": 1
                  }
                },
                {
                  "function": "minecraft:set_lore",
                  "lore": [
                    {
                      "text": "custom lore"
                    }
                  ],
                  "mode": "append"
                }
              ],
              "conditions": [
                {
                  "condition": "minecraft:random_chance",
                  "chance": 0
                }
              ]
            }
          ]
        }
      ]
    }
  ]
}

3. Load the datapack (example with one added as attachement)

4. Run the command `/loot give @s loot test:sequence_condition` to give yourself the loot of the loot table

The bow should not have any enchantment or custom lore, as the random chance is 0. But it does.

 

Invalid

Bafy

2024-08-19, 09:01 AM

2024-10-11, 07:25 AM

2024-10-11, 07:25 AM

0

0

Confirmed

Data Packs, Loot tables

24w33a, 1.21.1, 24w36a

-