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

Hey Everyone,

I have run into some issues trying to replace a vanilla block. I am currently using the registry event to replace the block, and gotten so far as having the intended adjustments actively working in-game. However, I cannot place the block as a player, it only spawns naturally in the world. I'm not sure why this is the case. If it helps, the error when selecting a block (middle mouse click) is "[Render thread/WARN] [ne.mi.co.ForgeHooks/]: Picking on: [BLOCK] minecraft:deepslate gave null item".

Spoiler

I am attempting to change some of the properties of the block, would there also be a way in which they can be edited without requiring a registry replace event?

 

  • Author
Quote

You'll also have to replace its BlockItem I think.

Quote

When a block is registered, only a block is registered. The block does not automatically have an BlockItem. To create a basic BlockItem for a block, one should set the registry name of the BlockItem to that of its Block.

Would this be done during a BlockItem register event that handles specifically BlockItems, or during the Block register event?

  • Author
7 minutes ago, SY_Dev said:

Would this be done during a BlockItem register event that handles specifically BlockItems, or during the Block register event?

I believe I figured it out, swapped my Item registration to the BlockItem registration.

Spoiler

@SubscribeEvent public static void registerItems(RegistryEvent.Register<Item> event){

event.getRegistry().registerAll( new BlockItem(...) );

}

 

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.