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

I have a problem with a loot table. I am creating a redstone mod and it is complete, except that the custom redstone that I have created does not drop when the redstone wire block is destroyed by the player.

 

I have registered the item from the block, and the item places the wire block correctly.

 

the block and item registry are as follows:

 

@SubscribeEvent
public static void onBlocksRegistry(final RegistryEvent.Register<Block> event) {
    event.getRegistry().register(new BluestoneWireBlock(Block.Properties.create(Material.ROCK, DyeColor.BLUE).hardnessAndResistance(0f, 0f).sound(SoundType.STONE).doesNotBlockMovement()).setRegistryName("bluestone"));
}

 

@SubscribeEvent
public static void onItemsRegistry(final RegistryEvent.Register<Item> event) {
    Item.Properties properties = new Item.Properties()
            .group(setup.itemGroup);
    event.getRegistry().register(createItemBlockForBlock(ModBlocks.BLUESTONE_WIRE, new Item.Properties().group(setup.itemGroup).maxStackSize(64)));
}

private static BlockItem createItemBlockForBlock(Block block, Item.Properties properties) {
    return (BlockItem) new BlockItem(block, properties).setRegistryName(block.getRegistryName());
}

 

and the loot table is as follows:

 

{
  "type": "minecraft:block",
  "pools": [
    {
      "name": "bluestone",
      "rolls": 1,
      "entries": [
        {
          "type": "minecraft:item",
          "name": "rgbstone:bluestone"
        }
      ],
      "conditions": [
        {
          "condition": "minecraft:survives_explosion"
        }
      ]
    }
  ]
}

 

Any help would be greatly appreciated.

 

Thanks in advance!

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.