Posted June 10, 20223 yr 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?
June 10, 20223 yr 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?
June 10, 20223 yr 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.