Jump to content

[1.14.4] Can't get loot table to drop my block


poison64

Recommended Posts

Hi,

 

i've created a custom block like this:

    @Mod.EventBusSubscriber(bus=Mod.EventBusSubscriber.Bus.MOD)
    public static class RegistryEvents {
        @SubscribeEvent
        public static void onBlocksRegistry(final RegistryEvent.Register<Block> event) {
        	schodyBlock = new Block(Block.Properties.create(Material.ROCK).hardnessAndResistance(5)).setRegistryName("poc", "schody"); 
        	event.getRegistry().register(schodyBlock);
        }

        @SubscribeEvent
        public static void onItemRegistry(final RegistryEvent.Register<Item> event) {
        	schodyItem = new BlockItem(schodyBlock, new BlockItem.Properties().group(ItemGroup.MISC)).setRegistryName("poc", "schody");
        	event.getRegistry().register(schodyItem);
        }
    }

 

and added a loot table in \assets\poc\loot_tables\blocks\schody.json in  like this:

{
  "type": "minecraft:block",
  "pools": [
    {
      "rolls": 1,
      "entries": [
        {
          "type": "minecraft:item",
          "name": "poc:schody"
        }
      ]
    }
  ]
}

 

and i've expected for the block to drop an item of this block when i destroy it, but unfortunatelly it doesn't :(

Any ideas would be much appreciated. I've already went through a couple of videos and tutorials but can't pin the problem..

Link to comment
Share on other sites

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.