• Recently Browsing

    No registered users viewing this page.

  • Posts

    • Now it is crashing again, but a bit differently: debug.log   RegisterBlocks.java: package maxi.ores_cores.init; @EventBusSubscriber(modid = OresCores.MODID, bus = Bus.MOD) public class RegisterBlocks { @SubscribeEvent public static void registerBlock(Register<Block> event) { event.getRegistry().registerAll( new SimpleBlock(OresCores.MODID, "emoulrite_block", Properties.create(Material.IRON, MaterialColor.GOLD).sound(SoundType.METAL).hardnessAndResistance(5f, 6f).harvestTool(ToolType.PICKAXE).harvestLevel(2)), new SimpleOreBlock(OresCores.MODID, "emoulrite_ore", Properties.create(Material.ROCK, MaterialColor.STONE).sound(SoundType.STONE).hardnessAndResistance(3f, 3f).harvestTool(ToolType.PICKAXE).harvestLevel(2)), new SimpleBlock(OresCores.MODID, "telerite_block", Properties.create(Material.IRON, MaterialColor.PURPLE).sound(SoundType.METAL).hardnessAndResistance(5f, 6f).harvestTool(ToolType.PICKAXE).harvestLevel(2)), new SimpleOreBlock(OresCores.MODID, "telerite_ore", Properties.create(Material.ROCK, MaterialColor.SAND).sound(SoundType.STONE).hardnessAndResistance(4f, 9f).harvestTool(ToolType.PICKAXE).harvestLevel(2)) ); } @SubscribeEvent public static void registerItem(Register<Item> event) { event.getRegistry().registerAll( new SimpleBlockItem(Blocks.EMOULRITE_BLOCK.get(), ItemGroup.BUILDING_BLOCKS), new SimpleBlockItem(Blocks.EMOULRITE_ORE.get(), ItemGroup.BUILDING_BLOCKS), new SimpleBlockItem(Blocks.TELERITE_BLOCK.get(), ItemGroup.BUILDING_BLOCKS), new SimpleBlockItem(Blocks.TELERITE_ORE.get(), ItemGroup.BUILDING_BLOCKS) ); } }   Blocks.java: package maxi.ores_cores.blocks; public class Blocks { public static final RegistryObject<Block> EMOULRITE_BLOCK = RegistryObject.of(new ResourceLocation(OresCores.MODID, "emoulrite_block"), ForgeRegistries.BLOCKS); public static final RegistryObject<Block> EMOULRITE_ORE = RegistryObject.of(new ResourceLocation(OresCores.MODID, "emoulrite_ore"), ForgeRegistries.BLOCKS); public static final RegistryObject<Block> TELERITE_BLOCK = RegistryObject.of(new ResourceLocation(OresCores.MODID, "telerite_block"), ForgeRegistries.BLOCKS); public static final RegistryObject<Block> TELERITE_ORE = RegistryObject.of(new ResourceLocation(OresCores.MODID, "telerite_ore"), ForgeRegistries.BLOCKS); }  
    • Then you cannot reliably know. You can check for BlockItem and get the contained block. Then you could in theory call getPlantType, but that requires the block to be placed in the world.
  • Topics

  • Who's Online (See full list)