Uploaded image for project: 'Minecraft: Java Edition'
  1. Minecraft: Java Edition
  2. MC-151742

Custom loot_table Not Overriding Tool Requirements

XMLWordPrintable

    • Icon: Bug Bug
    • Resolution: Duplicate
    • None
    • Minecraft 1.14.1
    • None
    • Windows 7; Java
    • Unconfirmed
    • (Unassigned)

      When creating loot drop tables for blocks that require certain strength tools by default, adding a drop for a weaker tool does not allow it to drop items.

      Example: Lapis Ore drops nothing when broken with a Golden or Wooden pickaxe. If you use the condition "match_tool" to set up a drop for wooden_pickaxe, this does not allow drops to be produced.

      In this example using a Wooden Pickaxe on Lapis Ore should produce between 0 and 9 Lapis Lazuli. Even if the count is set to 100% using uniform counts, binomial p=1.0, or a direct count, the block will drop 0 lapis.

       

      {
        "type": "minecraft:item",
        "conditions": [
          {
            "condition": "minecraft:match_tool",
            "predicate": {
              "item": "minecraft:wooden_pickaxe"
            }
          }
        ],
        "functions": [
          {
            "function": "minecraft:set_count",
            "count": {
              "n": 9,
              "p": 0.35,
              "type": "minecraft:binomial"
            }
          }
        ],
        "name": "minecraft:lapis_lazuli"
      },
      

      I believe the custom table should override tool requirements to break blocks. There a very few blocks that have tool requirements that are handled in code rather that the loot_tables.

       

            Unassigned Unassigned
            Jereth Wayne Hines
            Votes:
            0 Vote for this issue
            Watchers:
            1 Start watching this issue

              Created:
              Updated:
              Resolved: