Jump to content

Recommended Posts

Posted

Good night, this is my first post in a forum of any kind, do excuse if it's in the wrong section or any like problems. 

I am building a mod for MC 1.16.5 with forge version 36.1.18 following a tutorial by TurtyWurty, as it was pretty basic (I am completely new to forge modding). The Git to the mod can be found here.

I added a loot table to the directory modexample/src/main/resources/data/thestoreofneedfulthings/loot_tables/blocks/

{
  "type": "minecraft:block",
  "pools": [
    {
      "name": "storeofneedfulthings:test_block",
      "rolls": 1,
      "entries": [
        {
          "type": "minecraft:alternatives",
          "children": [
            {
              "type": "minecraft:item",
              "name": "storeofneedfulthings:test_block",
              "conditions": [
                {
                  "condition": "minecraft:match_tool",
                  "predicate": {
                    "enchantments": [
                      {
                        "enchantment": "minecraft:silk_touch",
                        "levels": {
                          "min": 1
                        }
                      }
                    ]
                  }
                }
              ]
            },
            {
              "type": "minecraft:item",
              "name": "storeofneedfulthings:test_item",
              "functions": [
                {
                  "function": "minecraft:apply_bonus",
                  "enchantment": "minecraft:fortune",
                  "formula": "minecraft:ore_drops"
                },
                {
                  "function": "minecraft:explosion_decay"
                }
              ]
            }
          ]
        }
      ]
    }
  ]
}

test_block is registered properly as a Block and as a BlockItem, and test_item is registered properly as an Item

When I go in game and break the block with the appropriate pick level, it drops nothing. Even enchanted with silk touch. 

I was hoping to get some headers, I've probably made a really obvious mistake somewhere but after a few days of trying to figure it out on my on I came to shout for help. Much appreciated if you've read this far :)

Posted
2 hours ago, Xoayer said:

I added a loot table to the directory modexample/src/main/resources/data/thestoreofneedfulthings/loot_tables/blocks/

You have to remove the "the" in "thestoreofneedfulthings", since that is not part of the modid.

  • Like 1

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.