how to make mob drop cooked version of food when mob on fire (using loot tables)

Started by KantroActual on Sun, 03/28/2021 - 10:46

Topic category: Help with MCreator software

Last seen on 09:47, 29. May 2022
Joined Dec 2019
Points:

User statistics:

  • Modifications:
  • Forum topics:
  • Wiki pages:
  • Tracker tickets:
  • MCreator plugins:
  • Comments:
how to make mob drop cooked version of food when mob on fire (using loot tables)
Sun, 03/28/2021 - 10:46

how to make mob drop cooked version of food when mob on fire (using loot tables)

like a cow normally drops raw beef , but when it is on fire and dies , it drops Steak instead

Last seen on 14:17, 24. May 2022
Joined Apr 2021
Points:

User statistics:

  • Modifications:
  • Forum topics:
  • Wiki pages:
  • Tracker tickets:
  • MCreator plugins:
  • Comments:
You don't necessarily need a…
Mon, 04/19/2021 - 19:03

You don't necessarily need a loot table to do this, but you need to disable custom drops in the mobs tab.

do on entity dies trigger: https://ibb.co/ygjXky4

Last seen on 18:50, 12. Dec 2021
Joined Sep 2021
Points:

User statistics:

  • Modifications:
  • Forum topics:
  • Wiki pages:
  • Tracker tickets:
  • MCreator plugins:
  • Comments:
For anyone who wants to do…
Wed, 09/29/2021 - 22:40

For anyone who wants to do it with a loot table, lock the entity's loot table and paste in this: 

This factors in looting and assumes that you have a furnace smelting recipe set up for the raw item.

Hope this helped someone!

{
  "type": "minecraft:entity",
  "pools": [
    {
      "rolls": 1,
      "entries": [
        {
          "type": "minecraft:item",
          "functions": [
            {
              "function": "minecraft:set_count",
              "count": {
                "min": 0.0,
                "max": 2.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": "modid:raw_item"
        }
      ]
    }
  ]
}