Help with loot tables

Started by BrownBear85 on

Topic category: Help with Minecraft modding (Java Edition)

Joined Sep 2021
Points:

User statistics:

  • Modifications:
  • Forum topics:
  • Wiki pages:
  • MCreator plugins:
  • Comments:
Help with loot tables

I am trying to replace the polar bear loot table along with a bunch of other mobs. I've gotten all the other mobs to work but not the polar bear. The loot table doesn't show up in-game and polar bears don't drop anything. Here is my code: 

{
  "type": "minecraft:entity",
  "pools": [
    {
      "rolls": 1,
      "entries": [
        {
          "type": "minecraft:item",
          "weight": 3,
          "functions": [
            {
              "function": "minecraft:set_count",
              "count": {
                "min": 0.0,
                "max": 2.0,
                "type": "minecraft:uniform"
              }
            },
            {
              "function": "minecraft:looting_enchant",
              "count": {
                "min": 0.0,
                "max": 1.0
              }
            }
          ],
          "name": "minecraft:cod"
        },
        {
          "type": "minecraft:item",
          "functions": [
            {
              "function": "minecraft:set_count",
              "count": {
                "min": 0.0,
                "max": 2.0,
                "type": "minecraft:uniform"
              }
            },
            {
              "function": "minecraft:looting_enchant",
              "count": {
                "min": 0.0,
                "max": 1.0
              }
            }
          ],
          "name": "minecraft:salmon"
        }
      ]
    },
    {
        {
      "rolls": 1,
      "entries": [
        {
          "type": "minecraft:item",
          "functions": [
            {
              "function": "minecraft:set_count",
              "count": {
                "min": 2.0,
                "max": 4.0,
                "type": "minecraft:uniform"
              }
            },
            {
              "function": "minecraft:furnace_smelt",
              "conditions": [
                {
                  "condition": "minecraft:entity_properties",
                  "predicate": {
                    "flags": {
                      "is_on_fire": true
                    }
                  },
                  "entity": "this"
                }
              ]
            },
            {
              "function": "minecraft:looting_enchant",
              "count": {
                "min": 0.0,
                "max": 1.0
              }
            }
          ],
          "name": "monkeychow:raw_bear"
        }
      ]
    }
  ]
}

 

Joined Oct 2020
Points:

User statistics:

  • Modifications:
  • Forum topics:
  • Wiki pages:
  • MCreator plugins:
  • Comments:
make sure to name your loot…
Sat, 09/25/2021 - 01:31

make sure to name your loot table entity/polar_bear

and make it an entity type loot table

Joined Oct 2020
Points:

User statistics:

  • Modifications:
  • Forum topics:
  • Wiki pages:
  • MCreator plugins:
  • Comments:
also make it a Minecraft…
Sat, 09/25/2021 - 01:31

also make it a Minecraft Loot Table if you want to replace vanilla loot tables

Joined Sep 2021
Points:

User statistics:

  • Modifications:
  • Forum topics:
  • Wiki pages:
  • MCreator plugins:
  • Comments:
Yeah I did that. The name is…
Sat, 09/25/2021 - 13:52

Yeah I did that. The name is definitely correct because when I run the game polar bears don't drop anything and doing /loot can't find the loot table for polar bears. I had that problem with squids but found that "ink_sac" was spelled "inc_sac" causing the loot table to error. My guess is that there is a syntax or some other error in the json.