Posted June 1, 20205 yr Hello, I got back into modding and started from scratch today. So my question might be very stupid but bear with me. To get a feeling for forge i wanted to add a simple item and a simple block (plus blockitem) via DeferredRegistry. The item and the blockitem render fine, but the placed block neither renders correctly nor does it drop the item. I added a screenshot of the game. Thank you for your help. Here is the code that registers blocks and items: public class Blocks { public static final DeferredRegister<Block> BLOCKS = new DeferredRegister<Block>(ForgeRegistries.BLOCKS, Constants.MODID); //Simple Blocks public static final RegistryObject<Block> CORRUPTED_BRICK = BLOCKS.register("corrupted_brick", () -> new Block(Block.Properties.create(Material.ROCK).hardnessAndResistance(6f,1.5f).harvestTool(ToolType.PICKAXE).harvestLevel(1).sound(SoundType.STONE))); //Complex Blocks public static void registerBlocks(){ BLOCKS.register(FMLJavaModLoadingContext.get().getModEventBus()); } } public class Items { public static final DeferredRegister<Item> ITEMS = new DeferredRegister<Item>(ForgeRegistries.ITEMS, Constants.MODID); //BlockItem public static final RegistryObject<Item> CORRUPTED_BRICK = register("corrupted_brick", Blocks.CORRUPTED_BRICK); //Simple Item public static final RegistryObject<Item> CORRUPTED_DIAMOND = ITEMS.register("corrupted_diamond", () -> new Item( new Item.Properties().group(Constants.GROUP))); //Complex Item public static void registerItems(){ ITEMS.register(FMLJavaModLoadingContext.get().getModEventBus()); } private static RegistryObject register(String name, RegistryObject<Block> block){ return ITEMS.register(name, () -> new BlockItem(block.get(), new Item.Properties().group(Constants.GROUP))); } } @Mod(Constants.MODID) public class CallOfTheVoid { public CallOfTheVoid(){ Blocks.registerBlocks(); Items.registerItems(); } } EDIT: I forgot to add the Blockstates json file Edited June 2, 20205 yr by Mii1128
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.