Jump to content

Recommended Posts

Posted

I need to make a loot table that drops 2 items but still works with silk touch. I tried adding another item to the loot table and the loot table stopped working. Can someone please help, here's the loot table:

{
  "type": "minecraft:block",
  "pools": [
    {
      "rolls": 1,
      "entries": [
        {
          "type": "minecraft:alternatives",
          "children": [
            {
              "type": "minecraft:item",
              "conditions": [
                {
                  "condition": "minecraft:match_tool",
                  "predicate": {
                    "enchantments": [
                      {
                        "enchantment": "minecraft:silk_touch",
                        "levels": {
                          "min": 1
                        }
                      }
                    ]
                  }
                }
              ],
              "name": "coolores:cool_ore"
            },
            {
              "type": "minecraft:item",
              "functions": [
                {
                  "function": "minecraft:set_count",
                  "count": {
                    "min": 3.0,
                    "max": 5.0,
                    "type": "minecraft:uniform"
                  }
                },
                {
                  "function": "minecraft:apply_bonus",
                  "enchantment": "minecraft:fortune",
                  "formula": "minecraft:uniform_bonus_count",
                  "parameters": {
                    "bonusMultiplier": 1
                  }
                },
                {
                  "function": "minecraft:explosion_decay"
                }
              ],
              "name": "coolores:cool_dust"
            },
            {
              "type": "minecraft:item",
              "name": "coolores:cool_essence"
            }
          ]
        }
      ]
    }
  ]
}

Thanks in advance!

Posted

I wrapped them in a group entry but now nothing drops in game. Here is the new loot table:

{
  "type": "minecraft:block",
  "pools": [
    {
      "rolls": 1,
      "entries": [
        {
          "type": "minecraft:alternatives",
          "children": [
            {
              "type": "minecraft:item",
              "conditions": [
                {
                  "condition": "minecraft:match_tool",
                  "predicate": {
                    "enchantments": [
                      {
                        "enchantment": "minecraft:silk_touch",
                        "levels": {
                          "min": 1
                        }
                      }
                    ]
                  }
                }
              ],
              "name": "coolores:cool_ore"
            },
            {
              "type": "minecraft:group",
              "children": [
                {
                  "type": "minecraft:item",
                  "functions": [
                    {
                      "function": "minecraft:set_count",
                      "count": {
                        "min": 3.0,
                        "max": 5.0,
                        "type": "minecraft:uniform"
                      }
                    },
                    {
                      "function": "minecraft:apply_bonus",
                      "enchantment": "minecraft:fortune",
                      "formula": "minecraft:uniform_bonus_count",
                      "parameters": {
                        "bonusMultiplier": 1
                      }
                    },
                    {
                      "function": "minecraft:explosion_decay"
                    }
                  ],
                  "name": "coolores:cool_dust"
                },
                {
                  "type": "minecraft:item",
                  "name": "coolores:cool_essence"
                }
              ]
            }
          ]
        }
      ]
    }
  ]
}
Posted

I'm an idiot. I originally registered the item in the 1.16 build of my mod and then I was working on the loot tables in my 1.15.2 build and it wasn't working because the item wasn't registered in the 1.15.2 build. Now the loot table is working with silk touch but when using regular pick it only drops one or the other of the items?

Posted
24 minutes ago, Ron_Parker said:

Is there a way I could hardcode the second drop in the java class?

 

No. and don't try.

Apparently I'm a complete and utter jerk and come to this forum just like to make fun of people, be confrontational, and make your personal life miserable.  If you think this is the case, JUST REPORT ME.  Otherwise you're just going to get reported when you reply to my posts and point it out, because odds are, I was trying to be nice.

 

Exception: If you do not understand Java, I WILL NOT HELP YOU and your thread will get locked.

 

DO NOT PM ME WITH PROBLEMS. No help will be given.

Join the conversation

You can post now and register later. If you have an account, sign in now to post with your account.
Note: Your post will require moderator approval before it will be visible.

Guest
Unfortunately, your content contains terms that we do not allow. Please edit your content to remove the highlighted words below.
Reply to this topic...

×   Pasted as rich text.   Restore formatting

  Only 75 emoji are allowed.

×   Your link has been automatically embedded.   Display as a link instead

×   Your previous content has been restored.   Clear editor

×   You cannot paste images directly. Upload or insert images from URL.

Announcements



×
×
  • Create New...

Important Information

By using this site, you agree to our Terms of Use.