Jump to content

Modded blocks won't place in worldspace


SY_Dev

Recommended Posts

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?

 

Link to comment
Share on other sites

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?

Link to comment
Share on other sites

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(...) );

}

 

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.