Not broken by player loot table?



  • I have a loot table that makes it so logs only drop when mined with an axe; That part was easy. But I noticed it did not drop to creeper explosions/tnt due to failing the match tool check, which obviously I would like to fix if possible.

    I am now having difficulties making it also drop from explosions and the below should work but does not seem to be.

      "type": "minecraft:block",
      "pools": [
        {
          "rolls": 1,
          "bonus_rolls": 0,
          "entries": [
            {
              "type": "minecraft:alternatives",
              "children": [
                {
                  "type": "minecraft:item",
                  "name": "minecraft:acacia_log",
                  "conditions": [
                    {
                      "condition": "minecraft:match_tool",
                      "predicate": {
                        "items": [
                          "minecraft:wooden_axe",
                          "minecraft:stone_axe",
                          "minecraft:iron_axe",
                          "minecraft:golden_axe",
                          "minecraft:diamond_axe",
                          "minecraft:netherite_axe"
                        ]
                      }
                    }
                  ]
                },
                {
                  "type": "minecraft:item",
                  "name": "minecraft:acacia_log",
                  "conditions": [
                    {
                      "condition": "minecraft:survives_explosion"
                    },
                    {
                      "condition": "minecraft:inverted",
                      "term": {
                        "condition": "minecraft:entity_properties",
                        "entity": "this",
                        "predicate": {
                          "type": "minecraft:player"
                        }
                      }
                    }
                  ]
                }
              ]
            }
          ]
        }
      ]
    }
    

    What am I doing wrong? Why is it not dropping from tnt? Is that somehow passing the not-player check? I tried it with creepers too since maybe tnt lit by players still counts, and same thing.



  • For some reason, removing the "survives explosion" check on the second part allows it to drop, and it now works as intended



Suggested Topics

  • 2
  • 2
  • 2
  • 2
  • 2
  • 2
  • 2
  • 2
  • 2
  • 2
  • 2
  • 2
  • 2
  • 2
  • 2