mojira.dev
MC-139184

fishing loot tables don't validate "entity"

The bug 

When creating a loot table using any condition or function that uses "entity" a warning will appear:

Found validation problem in {minecraft:gameplay/fishing}.pools[0].entries[0].condition[0]: Parameters [<parameter minecraft:last_damage_player>] are not provided in this context
Found validation problem in {minecraft:gameplay/fishing}.pools[0].entries[0].condition[0]: Parameters [<parameter minecraft:last_damage_player>] are not provided in this context

A similar warning appears with "this", "killer_player", or "killer" and conditions/functions may fail or not work as intended.

One example loot table:

{
    "pools":  [
        {
            "rolls": 1,
            "entries": [
                {
                    "type": "item",
                    "name": "minecraft:cod",
                    "weight": 1,
                    "conditions": [
                       {
                         "condition": "entity_scores",
                         "entity": "this",
                         "scores": {
                           "test_score": 1
                          }
                       }
                    ]
                }
            ]
        }
    ]
}
{
    "pools":  [
        {
            "rolls": 1,
            "entries": [
                {
                    "type": "item",
                    "name": "minecraft:cod",
                    "weight": 1,
                    "conditions": [
                       {
                         "condition": "entity_scores",
                         "entity": "this",
                         "scores": {
                           "test_score": 1
                          }
                       }
                    ]
                }
            ]
        }
    ]
}

Comments 1

Only tool and position are available in fishing drops.

MukiTanuki

(Unassigned)

Unconfirmed

Loot tables

entity, fishing, loot_table

Minecraft 1.13.2, Minecraft 18w45a, Minecraft 18w46a, Minecraft 18w47a, Minecraft 18w48a, ..., Minecraft 1.14.2 Pre-Release 1, Minecraft 1.14.2 Pre-Release 4, Minecraft 1.14.2, Minecraft 1.14.3, 1.14.4

Retrieved