Jump to content

BlockItem.java:195


Anonomys

Recommended Posts

Heres my log: 

---- Minecraft Crash Report ----
// Uh... Did I do that?

Time: 12/1/19 4:00 PM
Description: Initializing game

java.lang.NullPointerException: Initializing game
	at net.minecraft.item.BlockItem.fillItemGroup(BlockItem.java:195) ~[forge-1.14.4-28.1.96_mapped_snapshot_20191130-1.14.3-recomp.jar:?] {re:classloading}
	at net.minecraft.client.Minecraft.populateSearchTreeManager(Minecraft.java:577) ~[forge-1.14.4-28.1.96_mapped_snapshot_20191130-1.14.3-recomp.jar:?] {re:classloading,pl:accesstransformer:B,pl:runtimedistcleaner:A}
	at net.minecraft.client.Minecraft.init(Minecraft.java:519) ~[forge-1.14.4-28.1.96_mapped_snapshot_20191130-1.14.3-recomp.jar:?] {re:classloading,pl:accesstransformer:B,pl:runtimedistcleaner:A}
	at net.minecraft.client.Minecraft.run(Minecraft.java:365) ~[forge-1.14.4-28.1.96_mapped_snapshot_20191130-1.14.3-recomp.jar:?] {re:classloading,pl:accesstransformer:B,pl:runtimedistcleaner:A}
	at net.minecraft.client.main.Main.main(Main.java:128) ~[forge-1.14.4-28.1.96_mapped_snapshot_20191130-1.14.3-recomp.jar:?] {re:classloading,pl:runtimedistcleaner:A}
	at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method) ~[?:1.8.0_211] {}
	at sun.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl.java:62) ~[?:1.8.0_211] {}
	at sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:43) ~[?:1.8.0_211] {}
	at java.lang.reflect.Method.invoke(Method.java:498) ~[?:1.8.0_211] {}
	at net.minecraftforge.userdev.FMLUserdevClientLaunchProvider.lambda$launchService$0(FMLUserdevClientLaunchProvider.java:55) ~[forge-1.14.4-28.1.96_mapped_snapshot_20191130-1.14.3-recomp.jar:?] {}
	at cpw.mods.modlauncher.LaunchServiceHandlerDecorator.launch(LaunchServiceHandlerDecorator.java:37) [modlauncher-4.1.0.jar:?] {}
	at cpw.mods.modlauncher.LaunchServiceHandler.launch(LaunchServiceHandler.java:54) [modlauncher-4.1.0.jar:?] {}
	at cpw.mods.modlauncher.LaunchServiceHandler.launch(LaunchServiceHandler.java:72) [modlauncher-4.1.0.jar:?] {}
	at cpw.mods.modlauncher.Launcher.run(Launcher.java:81) [modlauncher-4.1.0.jar:?] {}
	at cpw.mods.modlauncher.Launcher.main(Launcher.java:65) [modlauncher-4.1.0.jar:?] {}
	at net.minecraftforge.userdev.LaunchTesting.main(LaunchTesting.java:101) [forge-1.14.4-28.1.96_mapped_snapshot_20191130-1.14.3-recomp.jar:?] {}


A detailed walkthrough of the error, its code path and all known details is as follows:
---------------------------------------------------------------------------------------

-- Head --
Thread: Client thread
Stacktrace:
	at net.minecraft.item.BlockItem.fillItemGroup(BlockItem.java:195)
	at net.minecraft.client.Minecraft.populateSearchTreeManager(Minecraft.java:577)
	at net.minecraft.client.Minecraft.init(Minecraft.java:519)

-- Initialization --
Details:
Stacktrace:
	at net.minecraft.client.Minecraft.run(Minecraft.java:365)
	at net.minecraft.client.main.Main.main(Main.java:128)
	at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method)
	at sun.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl.java:62)
	at sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:43)
	at java.lang.reflect.Method.invoke(Method.java:498)
	at net.minecraftforge.userdev.FMLUserdevClientLaunchProvider.lambda$launchService$0(FMLUserdevClientLaunchProvider.java:55)
	at cpw.mods.modlauncher.LaunchServiceHandlerDecorator.launch(LaunchServiceHandlerDecorator.java:37)
	at cpw.mods.modlauncher.LaunchServiceHandler.launch(LaunchServiceHandler.java:54)
	at cpw.mods.modlauncher.LaunchServiceHandler.launch(LaunchServiceHandler.java:72)
	at cpw.mods.modlauncher.Launcher.run(Launcher.java:81)
	at cpw.mods.modlauncher.Launcher.main(Launcher.java:65)
	at net.minecraftforge.userdev.LaunchTesting.main(LaunchTesting.java:101)

-- System Details --
Details:
	Minecraft Version: 1.14.4
	Minecraft Version ID: 1.14.4
	Operating System: Windows 10 (amd64) version 10.0
	Java Version: 1.8.0_211, Oracle Corporation
	Java VM Version: Java HotSpot(TM) 64-Bit Server VM (mixed mode), Oracle Corporation
	Memory: 257983208 bytes (246 MB) / 519045120 bytes (495 MB) up to 926941184 bytes (884 MB)
	CPUs: 2
	JVM Flags: 1 total; -XX:HeapDumpPath=MojangTricksIntelDriversForPerformance_javaw.exe_minecraft.exe.heapdump
	ModLauncher: 4.1.0+62+5bfa59b
	ModLauncher launch target: fmluserdevclient
	ModLauncher naming: mcp
	ModLauncher services: 
		/eventbus-1.0.0-service.jar eventbus PLUGINSERVICE 
		/forge-1.14.4-28.1.96_mapped_snapshot_20191130-1.14.3-launcher.jar object_holder_definalize PLUGINSERVICE 
		/forge-1.14.4-28.1.96_mapped_snapshot_20191130-1.14.3-launcher.jar runtime_enum_extender PLUGINSERVICE 
		/accesstransformers-1.0.1-milestone.0.1+94458e7-shadowed.jar accesstransformer PLUGINSERVICE 
		/forge-1.14.4-28.1.96_mapped_snapshot_20191130-1.14.3-launcher.jar capability_inject_definalize PLUGINSERVICE 
		/forge-1.14.4-28.1.96_mapped_snapshot_20191130-1.14.3-launcher.jar runtimedistcleaner PLUGINSERVICE 
		/forge-1.14.4-28.1.96_mapped_snapshot_20191130-1.14.3-launcher.jar fml TRANSFORMATIONSERVICE 
	FML: 28.1
	Forge: net.minecraftforge:28.1.96
	FML Language Providers: 
		javafml@28.1
		minecraft@1
	Mod List: 
		client-extra.jar Minecraft {minecraft@1.14.4 COMMON_SETUP}
		obfuscate-0.3.3-1.14.4-deobf.jar Obfuscate {obfuscate@0.3.3 COMMON_SETUP}
		main Hystel MC {hm@1.1 COMMON_SETUP}
		forge-1.14.4-28.1.96_mapped_snapshot_20191130-1.14.3-recomp.jar Forge {forge@28.1.96 COMMON_SETUP}
	Launched Version: MOD_DEV
	LWJGL: 3.2.2 build 10
	OpenGL: AMD Radeon HD 6670 GL version 4.5.13399 Compatibility Profile Context 15.201.1151.1008, ATI Technologies Inc.
	GL Caps: Using GL 1.3 multitexturing.
Using GL 1.3 texture combiners.
Using framebuffer objects because OpenGL 3.0 is supported and separate blending is supported.
Shaders are available because OpenGL 2.1 is supported.
VBOs are available because OpenGL 1.5 is supported.

	Using VBOs: Yes
	Is Modded: Definitely; Client brand changed to 'forge'
	Type: Client (map_client.txt)
	Resource Packs: 
	Current Language: English (US)
	CPU: 2x Intel(R) Celeron(R) CPU J1800 @ 2.41GHz

Here's my registry class:

package com.victor.HystelMC;

import com.victor.HystelMC.Blocks.*;
import com.victor.HystelMC.Init.BlockInit;
import com.victor.HystelMC.Init.ItemInit;
import com.victor.HystelMC.items.*;
import com.victor.HystelMC.materials.HystelMCArmorMaterials;
import com.victor.HystelMC.materials.HystelMCToolMaterials;
import net.minecraft.block.Block;
import net.minecraft.block.SoundType;
import net.minecraft.block.material.Material;
import net.minecraft.inventory.EquipmentSlotType;
import net.minecraft.item.*;
import net.minecraft.util.ResourceLocation;
import net.minecraftforge.event.RegistryEvent;
import net.minecraftforge.eventbus.api.SubscribeEvent;
import net.minecraftforge.fml.common.Mod;
import org.apache.logging.log4j.Logger;

import static com.victor.HystelMC.Init.ItemInit.CHEESEBURGER;
import static com.victor.HystelMC.Init.ItemInit.copper_boots;
import static net.minecraft.block.material.Material.*;

@Mod.EventBusSubscriber(bus= Mod.EventBusSubscriber.Bus.MOD)
public class HystelMCRegistries {

    public static final ItemGroup hysteltab = HystelMC.setup.itemGroup;

    public static final Logger LOGGER = HystelMC.LOGGER;

    public static final String MODID = HystelMC.MOD_ID;

    @SubscribeEvent
    public static void onBlocksRegistry(final RegistryEvent.Register<Block> event)
    {
        event.getRegistry().register(new Chairsy());
        event.getRegistry().register(new BlockResta());
        event.getRegistry().register(new BlockBluestone());
        event.getRegistry().register(new BlockRuby());
        event.getRegistry().register(new BlockCopper());
        event.getRegistry().register(new BlockBluestoneOre());
        event.getRegistry().register(new BlockRubyOre());
        event.getRegistry().register(new BlockCopperOre());
        event.getRegistry().register(new BlockRainbowOre());
        event.getRegistry().register(new BlockCGM());
        event.getRegistry().register(new BlockBC());
        event.getRegistry().register(new BlockHS());
        event.getRegistry().register(new BlockTA());
        event.getRegistry().register(new BlockSH());
        event.getRegistry().register(new BlockCB());
        event.getRegistry().register(new BlockSpeaker());


        LOGGER.info("Blocks registered.");
    }

    @SubscribeEvent
    public static void onItemsRegistry(final RegistryEvent.Register<Item> event)
    {
        Item.Properties properties = new Item.Properties().group(hysteltab);
        event.getRegistry().register(new BlockItem(BlockInit.CHAIRSY, properties).setRegistryName("chairsy"));
        event.getRegistry().register(new BlockItem(BlockInit.CUSTOM_RESTA, properties).setRegistryName("custom_resta"));
        event.getRegistry().register(new BlockItem(BlockInit.BLUESTONE_BLOCK, properties).setRegistryName("bluestone_block"));
        event.getRegistry().register(new BlockItem(BlockInit.RUBY_BLOCK, properties).setRegistryName("ruby_block"));
        event.getRegistry().register(new BlockItem(BlockInit.COPPER_BLOCK, properties).setRegistryName("copper_block"));
        event.getRegistry().register(new BlockItem(BlockInit.bluestone_ore, properties).setRegistryName("bluestone_ore"));
        event.getRegistry().register(new BlockItem(BlockInit.ruby_ore, properties).setRegistryName("ruby_ore"));
        event.getRegistry().register(new BlockItem(BlockInit.copper_ore, properties).setRegistryName("copper_ore"));
        event.getRegistry().register(new BlockItem(BlockInit.rainbow_ore, properties).setRegistryName("rainbow_ore"));
        event.getRegistry().register(new BlockItem(BlockInit.CUSTOM_GLASSY_MOBBLE, properties).setRegistryName("custom_glassy_mobble"));
        event.getRegistry().register(new BlockItem(BlockInit.BETTER_CAULDRON, properties).setRegistryName("better_cauldron"));
        event.getRegistry().register(new BlockItem(BlockInit.HYSTEL_SOMETHING, properties).setRegistryName("hystel_something"));
        event.getRegistry().register(new BlockItem(BlockInit.TOKEN_ATM, properties).setRegistryName("token_atm"));
        event.getRegistry().register(new BlockItem(BlockInit.SANTA_HAT, properties).setRegistryName("santa_hat"));
        event.getRegistry().register(new BlockItem(BlockInit.CUSTOMIZED_BOBBLE, properties).setRegistryName("customized_bobble"));
        event.getRegistry().register(new BlockItem(BlockInit.SPEAKER, properties).setRegistryName("speakers"));
        event.getRegistry().register(new BluestoneIngot());
        event.getRegistry().register(new Ruby());
        event.getRegistry().register(new CopperIngoty());
        event.getRegistry().register(new RainbowGem());
        event.getRegistry().registerAll
                (
                        //Bluestone
                        ItemInit.bluestone_helmet = new ArmorItem(HystelMCArmorMaterials.bluestone, EquipmentSlotType.HEAD, new Item.Properties().group(hysteltab)).setRegistryName("bluestone_helmet"),
                        ItemInit.bluestone_chestplate = new ArmorItem(HystelMCArmorMaterials.bluestone, EquipmentSlotType.CHEST, new Item.Properties().group(hysteltab)).setRegistryName("bluestone_chestplate"),
                        ItemInit.bluestone_leggings = new ArmorItem(HystelMCArmorMaterials.bluestone, EquipmentSlotType.LEGS, new Item.Properties().group(hysteltab)).setRegistryName("bluestone_leggings"),
                        ItemInit.bluestone_boots = new ArmorItem(HystelMCArmorMaterials.bluestone, EquipmentSlotType.FEET, new Item.Properties().group(hysteltab)).setRegistryName("bluestone_boots"),
                        //Tools
                        ItemInit.bluestone_axe = new CustomAxeItem(HystelMCToolMaterials.bluestone, -1.0f, 6.0f, new Item.Properties().group(hysteltab)).setRegistryName(location("bluestone_axe")),
                        ItemInit.bluestone_hoe = new HoeItem(HystelMCToolMaterials.bluestone, 6.0f, new Item.Properties().group(hysteltab)).setRegistryName(location("bluestone_hoe")),
                        ItemInit.bluestone_pickaxe = new CustomPickaxeItem(HystelMCToolMaterials.bluestone, -2, 6.0f, new Item.Properties().group(hysteltab)).setRegistryName(location("bluestone_pickaxe")),
                        ItemInit.bluestone_shovel = new ShovelItem(HystelMCToolMaterials.bluestone, -3.0f, 6.0f, new Item.Properties().group(hysteltab)).setRegistryName(location("bluestone_shovel")),
                        ItemInit.bluestone_sword = new SwordItem(HystelMCToolMaterials.bluestone, 0, 6.0f, new Item.Properties().group(hysteltab)).setRegistryName(location("bluestone_sword")),
                        //Ruby
                        ItemInit.ruby_helmet = new ArmorItem(HystelMCArmorMaterials.ruby, EquipmentSlotType.HEAD, new Item.Properties().group(hysteltab)).setRegistryName("ruby_helmet"),
                        ItemInit.ruby_chestplate = new ArmorItem(HystelMCArmorMaterials.ruby, EquipmentSlotType.CHEST, new Item.Properties().group(hysteltab)).setRegistryName("ruby_chestplate"),
                        ItemInit.ruby_leggings = new ArmorItem(HystelMCArmorMaterials.ruby, EquipmentSlotType.LEGS, new Item.Properties().group(hysteltab)).setRegistryName("ruby_leggings"),
                        ItemInit.ruby_boots = new ArmorItem(HystelMCArmorMaterials.ruby, EquipmentSlotType.FEET, new Item.Properties().group(hysteltab)).setRegistryName("ruby_boots"),
                        //Tools
                        ItemInit.ruby_axe = new CustomAxeItem(HystelMCToolMaterials.ruby, -1.0f, 6.0f, new Item.Properties().group(hysteltab)).setRegistryName(location("ruby_axe")),
                        ItemInit.ruby_hoe = new HoeItem(HystelMCToolMaterials.ruby, 6.0f, new Item.Properties().group(hysteltab)).setRegistryName(location("ruby_hoe")),
                        ItemInit.ruby_pickaxe = new CustomPickaxeItem(HystelMCToolMaterials.ruby, -2, 6.0f, new Item.Properties().group(hysteltab)).setRegistryName(location("ruby_pickaxe")),
                        ItemInit.ruby_shovel = new ShovelItem(HystelMCToolMaterials.ruby, -3.0f, 6.0f, new Item.Properties().group(hysteltab)).setRegistryName(location("ruby_shovel")),
                        ItemInit.ruby_sword = new SwordItem(HystelMCToolMaterials.ruby, 0, 6.0f, new Item.Properties().group(hysteltab)).setRegistryName(location("ruby_sword")),
                        //Copper
                        ItemInit.copper_helmet = new ArmorItem(HystelMCArmorMaterials.copper, EquipmentSlotType.HEAD, new Item.Properties().group(hysteltab)).setRegistryName("copper_helmet"),
                        ItemInit.copper_chestplate = new ArmorItem(HystelMCArmorMaterials.copper, EquipmentSlotType.CHEST, new Item.Properties().group(hysteltab)).setRegistryName("copper_chestplate"),
                        ItemInit.copper_leggings = new ArmorItem(HystelMCArmorMaterials.copper, EquipmentSlotType.LEGS, new Item.Properties().group(hysteltab)).setRegistryName("copper_leggings"),
                        ItemInit.copper_boots = new ArmorItem(HystelMCArmorMaterials.copper, EquipmentSlotType.FEET, new Item.Properties().group(hysteltab)).setRegistryName("copper_boots"),
                        //Tools
                        ItemInit.copper_axe = new CustomAxeItem(HystelMCToolMaterials.ruby, -1.0f, 6.0f, new Item.Properties().group(hysteltab)).setRegistryName(location("copper_axe")),
                        ItemInit.copper_hoe = new HoeItem(HystelMCToolMaterials.ruby, 6.0f, new Item.Properties().group(hysteltab)).setRegistryName(location("copper_hoe")),
                        ItemInit.copper_pickaxe = new CustomPickaxeItem(HystelMCToolMaterials.ruby, -2, 6.0f, new Item.Properties().group(hysteltab)).setRegistryName(location("copper_pickaxe")),
                        ItemInit.copper_shovel = new ShovelItem(HystelMCToolMaterials.ruby, -3.0f, 6.0f, new Item.Properties().group(hysteltab)).setRegistryName(location("copper_shovel")),
                        ItemInit.copper_sword = new SwordItem(HystelMCToolMaterials.ruby, 0, 6.0f, new Item.Properties().group(hysteltab)).setRegistryName(location("copper_sword")),
                        //Rainbow
                        ItemInit.rainbow_helmet = new ArmorItem(HystelMCArmorMaterials.rainbow, EquipmentSlotType.HEAD, new Item.Properties().group(hysteltab)).setRegistryName("rainbow_helmet"),
                        ItemInit.rainbow_chestplate = new ArmorItem(HystelMCArmorMaterials.rainbow, EquipmentSlotType.CHEST, new Item.Properties().group(hysteltab)).setRegistryName("rainbow_chestplate"),
                        ItemInit.rainbow_leggings = new ArmorItem(HystelMCArmorMaterials.rainbow, EquipmentSlotType.LEGS, new Item.Properties().group(hysteltab)).setRegistryName("rainbow_leggings"),
                        ItemInit.rainbow_boots = new ArmorItem(HystelMCArmorMaterials.rainbow, EquipmentSlotType.FEET, properties).setRegistryName("rainbow_boots"),
                        //Tools
                        ItemInit.rainbow_axe = new CustomAxeItem(HystelMCToolMaterials.ruby, -1.0f, 6.0f, new Item.Properties().group(hysteltab)).setRegistryName(location("rainbow_axe")),
                        ItemInit.rainbow_hoe = new HoeItem(HystelMCToolMaterials.ruby, 6.0f, new Item.Properties().group(hysteltab)).setRegistryName(location("rainbow_hoe")),
                        ItemInit.rainbow_pickaxe = new CustomPickaxeItem(HystelMCToolMaterials.ruby, -2, 6.0f, new Item.Properties().group(hysteltab)).setRegistryName(location("rainbow_pickaxe")),
                        ItemInit.rainbow_shovel = new ShovelItem(HystelMCToolMaterials.ruby, -3.0f, 6.0f, new Item.Properties().group(hysteltab)).setRegistryName(location("rainbow_shovel")),
                        ItemInit.rainbow_sword = new SwordItem(HystelMCToolMaterials.ruby, 0, 6.0f, new Item.Properties().group(hysteltab)).setRegistryName(location("rainbow_sword"))
                );

        LOGGER.info("Items registered.");
    }

    public static ResourceLocation location(String name)
    {
        return new ResourceLocation(MODID, name);
    }

}

Do ya need anything more?

This is my signature. I don't really too much know about java but i try to help and i try to get help from others too. Thank you!

Link to comment
Share on other sites

11 minutes ago, diesieben07 said:

How / Where do you initialize the values in this class?

BlockInit Is Block list more like "TutorialBlocks"

This is my signature. I don't really too much know about java but i try to help and i try to get help from others too. Thank you!

Link to comment
Share on other sites

3 hours ago, diesieben07 said:

You didn't answer my question.

Heres the BlockInit:

package com.victor.HystelMC.Init;

import com.victor.HystelMC.Blocks.*;

import net.minecraftforge.registries.ObjectHolder;

public class BlockInit {

	@ObjectHolder("hm:chairsy")
    public static Chairsy CHAIRSY;
	
	@ObjectHolder("hm:custom_resta")
    public static BlockResta CUSTOM_RESTA;
	
	@ObjectHolder("hm:bluestone_block")
	public static BlockBluestone BLUESTONE_BLOCK;
	
	@ObjectHolder("hm:ruby_block")
	public static BlockRuby RUBY_BLOCK;
	
	@ObjectHolder("hm:copper_block")
	public static BlockCopper COPPER_BLOCK;

	@ObjectHolder("hm:bluestone_ore")
	public static BlockBluestoneOre bluestone_ore;

	@ObjectHolder("hm:ruby_ore")
	public static BlockRubyOre ruby_ore;

	@ObjectHolder("hm:copper_ore")
	public static BlockCopperOre copper_ore;

	@ObjectHolder("hm:rainbow_ore")
	public static BlockRainbowOre rainbow_ore;

	@ObjectHolder("hm:custom_glassy_mobble")
	public static BlockCGM CUSTOM_GLASSY_MOBBLE;

	@ObjectHolder("hm:better_cauldron")
	public static BlockBC BETTER_CAULDRON;

	@ObjectHolder("hm:hystel_something")
	public static BlockHS HYSTEL_SOMETHING;

	@ObjectHolder("hm:token_atm")
	public static BlockTA TOKEN_ATM;

	@ObjectHolder("hm:santa_hat")
	public static BlockSH SANTA_HAT;

	@ObjectHolder("hm:customized_bobble")
	public static BlockCB CUSTOMIZED_BOBBLE;

	@ObjectHolder("hm:speakers")
	public static BlockSpeaker SPEAKER;


	
}

 

This is my signature. I don't really too much know about java but i try to help and i try to get help from others too. Thank you!

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.



×
×
  • Create New...

Important Information

By using this site, you agree to our Terms of Use.