5

To be clear, I am not asking where to put loot tables in a data pack. I have zero trouble finding that information.

I want to find the default built-in loot tables in json format from the vanilla version of the game.

I found a Reddit thread which has a location for where I can get the loot tables, but it is two years old and the instructions are no longer valid with version 1.14.x.


Why do I want this? I want to make a data pack with a couple options added to the fishing loot options without losing the loot options already present.

If there's a way to add to a loot table without overriding what's already in it, that would solve my underlying problem. But the question still needs an answer for future searchers.

2
  • Yeah I had this same problem when trying to add sand as a husk drop - I just guessed at it and got it pretty much correct, but knowing this would be very helpful.
    – Nik3141
    Jun 5, 2019 at 4:02
  • I'll just run for fil in */*.png; do yes | 7z x "$fil"; done on the versions folder to find out. :D Explanation: That command tells the program "7zip" to unpack every single version .jar file that I have and another programs constantly inputs "y" into it, thereby confirming every overwrite prompt. Then I can just do a file search on it instead of manually searching, because I'm lazy. :P Jun 5, 2019 at 13:15

2 Answers 2

2

The wiki documents a little bit of this on the "client.jar" page (archive) in a folded section called "File hierarchy".

The file you're looking for is .minecraft/versions/<version>/<version>.jar, that's an executable archive. When unpacked, you have a data folder that contains the Vanilla data pack. The file you're looking for is data/minecraft/loot_tables/gameplay/fishing.json or any of the ones in the fishing folder there.

And no, there seems to be no way to append to loot tables, only tags allow that (and models in resource pack have a similar concept).

5
  • 2
    Yay, this is my 400th answer! Jun 7, 2019 at 22:08
  • So I found a way to "add" to the fishing loot table without it overriding built-in loot tables. For the base fishing loot table, add an entry pointing to a new separate loot table file. In future updates, assuming the structure stays the same, the built-in fish/junk/treasure tables will get updated while your addition remains separate. Won't work if vanilla adds a new category of fishing loot, but it's semi-robust.
    – Mar
    Jun 11, 2019 at 4:31
  • Can you link a pastebin of what loot table you used for that, please? Jun 11, 2019 at 10:38
  • 1
    Fishing loot table extension: pastebin.com/CEjEJep1 Since fishing rewards use sub loot tables, editiing/overriding just the top level one allows you to add loot without compromising the sub loot tables. It's not foolproof, but it's semi-robust.
    – Mar
    Jun 13, 2019 at 7:25
  • 1
    It should be possible to only add things with that, if you have control over what loot table is used, like for chests and mobs. But for fishing you don't, so you have to do what you did. Jun 13, 2019 at 8:02
1

Loot tables in version 1.14.2 are inside this location:

C:\Users\<your name>\AppData\Roaming\.minecraft\versions\1.14.2\1.14.2.jar\data\minecraft\loot_tables

As Fabian Röling already said, you can find the loot table for fishing here:

...\loot_tables\gameplay\fishing.json

And it uses these 3 loot tables:

...\loot_tables\gameplay\fishing\fish.json
...\loot_tables\gameplay\fishing\junk.json
...\loot_tables\gameplay\fishing\treasure.json

This is the content of these files:

fishing.json:
{
  "type": "minecraft:fishing",
  "pools": [
    {
      "rolls": 1,
      "entries": [
        {
          "type": "minecraft:loot_table",
          "weight": 10,
          "quality": -2,
          "name": "minecraft:gameplay/fishing/junk"
        },
        {
          "type": "minecraft:loot_table",
          "weight": 5,
          "quality": 2,
          "name": "minecraft:gameplay/fishing/treasure"
        },
        {
          "type": "minecraft:loot_table",
          "weight": 85,
          "quality": -1,
          "name": "minecraft:gameplay/fishing/fish"
        }
      ]
    }
  ]
}
fish.json:
{
  "type": "minecraft:fishing",
  "pools": [
    {
      "rolls": 1.0,
      "entries": [
        {
          "type": "minecraft:item",
          "weight": 60,
          "name": "minecraft:cod"
        },
        {
          "type": "minecraft:item",
          "weight": 25,
          "name": "minecraft:salmon"
        },
        {
          "type": "minecraft:item",
          "weight": 2,
          "name": "minecraft:tropical_fish"
        },
        {
          "type": "minecraft:item",
          "weight": 13,
          "name": "minecraft:pufferfish"
        }
      ]
    }
  ]
}
junk.json:
{
  "type": "minecraft:fishing",
  "pools": [
    {
      "rolls": 1.0,
      "entries": [
        {
          "type": "minecraft:item",
          "weight": 10,
          "functions": [
            {
              "function": "minecraft:set_damage",
              "damage": {
                "min": 0.0,
                "max": 0.9
              }
            }
          ],
          "name": "minecraft:leather_boots"
        },
        {
          "type": "minecraft:item",
          "weight": 10,
          "name": "minecraft:leather"
        },
        {
          "type": "minecraft:item",
          "weight": 10,
          "name": "minecraft:bone"
        },
        {
          "type": "minecraft:item",
          "weight": 10,
          "functions": [
            {
              "function": "minecraft:set_nbt",
              "tag": "{Potion:\"minecraft:water\"}"
            }
          ],
          "name": "minecraft:potion"
        },
        {
          "type": "minecraft:item",
          "weight": 5,
          "name": "minecraft:string"
        },
        {
          "type": "minecraft:item",
          "weight": 2,
          "functions": [
            {
              "function": "minecraft:set_damage",
              "damage": {
                "min": 0.0,
                "max": 0.9
              }
            }
          ],
          "name": "minecraft:fishing_rod"
        },
        {
          "type": "minecraft:item",
          "weight": 10,
          "name": "minecraft:bowl"
        },
        {
          "type": "minecraft:item",
          "weight": 5,
          "name": "minecraft:stick"
        },
        {
          "type": "minecraft:item",
          "functions": [
            {
              "function": "minecraft:set_count",
              "count": 10
            }
          ],
          "name": "minecraft:ink_sac"
        },
        {
          "type": "minecraft:item",
          "weight": 10,
          "name": "minecraft:tripwire_hook"
        },
        {
          "type": "minecraft:item",
          "weight": 10,
          "name": "minecraft:rotten_flesh"
        },
        {
          "type": "minecraft:item",
          "conditions": [
            {
              "condition": "minecraft:alternative",
              "terms": [
                {
                  "condition": "minecraft:location_check",
                  "predicate": {
                    "biome": "minecraft:jungle"
                  }
                },
                {
                  "condition": "minecraft:location_check",
                  "predicate": {
                    "biome": "minecraft:jungle_hills"
                  }
                },
                {
                  "condition": "minecraft:location_check",
                  "predicate": {
                    "biome": "minecraft:jungle_edge"
                  }
                },
                {
                  "condition": "minecraft:location_check",
                  "predicate": {
                    "biome": "minecraft:bamboo_jungle"
                  }
                },
                {
                  "condition": "minecraft:location_check",
                  "predicate": {
                    "biome": "minecraft:modified_jungle"
                  }
                },
                {
                  "condition": "minecraft:location_check",
                  "predicate": {
                    "biome": "minecraft:modified_jungle_edge"
                  }
                },
                {
                  "condition": "minecraft:location_check",
                  "predicate": {
                    "biome": "minecraft:bamboo_jungle_hills"
                  }
                }
              ]
            }
          ],
          "weight": 10,
          "name": "minecraft:bamboo"
        }
      ]
    }
  ]
}
and treasure.json:
{
  "type": "minecraft:fishing",
  "pools": [
    {
      "rolls": 1.0,
      "entries": [
        {
          "type": "minecraft:item",
          "name": "minecraft:lily_pad"
        },
        {
          "type": "minecraft:item",
          "name": "minecraft:name_tag"
        },
        {
          "type": "minecraft:item",
          "name": "minecraft:saddle"
        },
        {
          "type": "minecraft:item",
          "functions": [
            {
              "function": "minecraft:set_damage",
              "damage": {
                "min": 0.0,
                "max": 0.25
              }
            },
            {
              "function": "minecraft:enchant_with_levels",
              "levels": 30,
              "treasure": true
            }
          ],
          "name": "minecraft:bow"
        },
        {
          "type": "minecraft:item",
          "functions": [
            {
              "function": "minecraft:set_damage",
              "damage": {
                "min": 0.0,
                "max": 0.25
              }
            },
            {
              "function": "minecraft:enchant_with_levels",
              "levels": 30,
              "treasure": true
            }
          ],
          "name": "minecraft:fishing_rod"
        },
        {
          "type": "minecraft:item",
          "functions": [
            {
              "function": "minecraft:enchant_with_levels",
              "levels": 30,
              "treasure": true
            }
          ],
          "name": "minecraft:book"
        },
        {
          "type": "minecraft:item",
          "name": "minecraft:nautilus_shell"
        }
      ]
    }
  ]
}
5
  • Is there a way to attach files to an answer?
    – user232393
    Jun 5, 2019 at 19:34
  • No, only images. You can upload it somewhere else and then link to it. Jun 5, 2019 at 20:59
  • Do you have any suggestion where I can upload it to? Is it even nessessary in this case, or is it ok to do it the way I did in the answer?
    – user232393
    Jun 5, 2019 at 21:24
  • If it's just text, pasting is even better. Otherwise Google Drive and Dropbox are pretty good. Jun 5, 2019 at 22:15
  • Thank you, I will take that into consideration if nessessary.
    – user232393
    Jun 5, 2019 at 22:18

You must log in to answer this question.

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