• Recently Browsing

    No registered users viewing this page.

  • Posts

    • Yeah i know that's what im saying also that's why i said 1.7 cause you simply have to be a moron to make a mod for 1.7 these days xd but i told that solved topics also gets closed but they dont 
    • After I remade my registration system again (for causes see my comments at [1.16.1] The Book of Minecraft Modding - complete guide for beginners),  the game now crashes with the main problem: java.lang.NullPointerException: Registry Object not present: ores_cores:emoulrite_block   debug.log: debug.log   I cut out the imports in the source code   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, ItemGroup.BUILDING_BLOCKS), new SimpleBlockItem(Blocks.EMOULRITE_ORE, ItemGroup.BUILDING_BLOCKS), new SimpleBlockItem(Blocks.TELERITE_BLOCK, ItemGroup.BUILDING_BLOCKS), new SimpleBlockItem(Blocks.TELERITE_ORE, ItemGroup.BUILDING_BLOCKS) ); } }   SimpleBlock.java (SimpleOreBlock is similar): package maxi.ores_cores.blocks; public class SimpleBlock extends Block { public SimpleBlock(Properties properties) { super(properties); } public SimpleBlock(String modid, String name, Properties properties) { super(properties); this.setRegistryName(modid, name); } }   Blocks.java: package maxi.ores_cores.blocks; public class Blocks { public static final Block EMOULRITE_BLOCK = RegistryObject.of(new ResourceLocation(OresCores.MODID, "emoulrite_block"), ForgeRegistries.BLOCKS).get(); public static final Block EMOULRITE_ORE = RegistryObject.of(new ResourceLocation(OresCores.MODID, "emoulrite_ore"), ForgeRegistries.BLOCKS).get(); public static final Block TELERITE_BLOCK = RegistryObject.of(new ResourceLocation(OresCores.MODID, "telerite_block"), ForgeRegistries.BLOCKS).get(); public static final Block TELERITE_ORE = RegistryObject.of(new ResourceLocation(OresCores.MODID, "telerite_ore"), ForgeRegistries.BLOCKS).get(); }   SimpleBlockItem.java: package maxi.ores_cores.items; public class SimpleBlockItem extends BlockItem { public SimpleBlockItem(Block block, ItemGroup group) { super(block, new Properties().group(group)); this.setRegistryName(block.getRegistryName()); } }   My guess is that the static fields at Blocks.java are initialized before the block registry event is fired, therefore the blocks that I try to get doesn´t exist.
    • I installed forge from the forge website through the installer, I'm using just the regular Minecraft launcher
    • Create an item. In initCapabilities, create an ItemStackHandler capability. Done.
    • 1.7 isn't supported any more, thus against forum policy. Those threads are locked in order to prevent people from helping give support to an unsupported version. There's a green banner at the top of every page about it.
  • Topics

  • Who's Online (See full list)