Jump to content
View in the app

A better way to browse. Learn more.

Forge Forums

A full-screen app on your home screen with push notifications, badges and more.

To install this app on iOS and iPadOS
  1. Tap the Share icon in Safari
  2. Scroll the menu and tap Add to Home Screen.
  3. Tap Add in the top-right corner.
To install this app on Android
  1. Tap the 3-dot menu (⋮) in the top-right corner of the browser.
  2. Tap Add to Home screen or Install app.
  3. Confirm by tapping Install.

Featured Replies

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 :)

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.

8 minutes ago, Xoayer said:

I looked for typos everywhere except in the packet structure. May thank yous, @vemerion. Works like a charm.

No problem, glad I could be of help!

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...

Important Information

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

Configure browser push notifications

Chrome (Android)
  1. Tap the lock icon next to the address bar.
  2. Tap Permissions → Notifications.
  3. Adjust your preference.
Chrome (Desktop)
  1. Click the padlock icon in the address bar.
  2. Select Site settings.
  3. Find Notifications and adjust your preference.