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

Hello!

Today, I tried to make some blocks(with item blocks), but this time not with the

"old" way which would be to use a register event directly: I wanted to use the deferred registry.

But I couldn't get it working right: When I registered an item block (which would eventually call new Block().asItem()),

the game said that there would be an duplicate registry entry.

Also, I have no idea how to use asItem with an item group.

 

So, it would be great if you could help me.

-Budschie

  • Author

@diesieben07 Ah, ok, thanks.

Now I use this code:

	public static final RegistryObject<BlockItem> TEST_BLOCK = REGISTRY.register("test_block", () -> new BlockItem(BlockInit.TEST_BLOCK.get(), new Item.Properties().group(ItemGroup.COMBAT))); 

Is this how I should do this? Or should I avoid getting the test block with TEST_BLOCK.get()?

Edited by Budschie

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.