Jump to content

Trouble with Registering a few Items; null error


DiamondMiner88

Recommended Posts

I get an error whenever i try to modelRegister a certain item. Can't figure out what the Problem is. If i don't call

	registerItemModel(CUTTER_GLASS_DIAMOND);
        registerItemModel(CUTTER_GLASS_GOLD);
        registerItemModel(CUTTER_GLASS_IRON);

The item is still in the game, you can hold it in the inventory, The name in the lang file works, but in recipes it doesen't, whenever i try to register it for the OreDictionary i get an error that it stopped trying to registering it. What?

ItemClass is called ItemGlassCutter

Error:

Spoiler

[15:50:56] [main/ERROR] [FML]: Exception caught during firing event net.minecraftforge.client.event.ModelRegistryEvent@4615c513:
java.lang.NullPointerException: Item cannot be null!
	at com.google.common.base.Preconditions.checkNotNull(Preconditions.java:787) ~[guava-21.0.jar:?]
	at tk.diamondbuildz.mod.character.client.ClientEventSubscriber.registerItemModel(ClientEventSubscriber.java:80) ~[ClientEventSubscriber.class:?]
	at tk.diamondbuildz.mod.character.client.ClientEventSubscriber.onRegisterModelsEvent(ClientEventSubscriber.java:68) ~[ClientEventSubscriber.class:?]
	at net.minecraftforge.fml.common.eventhandler.ASMEventHandler_6_ClientEventSubscriber_onRegisterModelsEvent_ModelRegistryEvent.invoke(.dynamic) ~[?:?]
	at net.minecraftforge.fml.common.eventhandler.ASMEventHandler.invoke(ASMEventHandler.java:90) ~[ASMEventHandler.class:?]
	at net.minecraftforge.fml.common.eventhandler.EventBus$1.invoke(EventBus.java:144) ~[EventBus$1.class:?]
	at net.minecraftforge.fml.common.eventhandler.EventBus.post(EventBus.java:182) [EventBus.class:?]
	at net.minecraftforge.fml.client.FMLClientHandler.fireSidedRegistryEvents(FMLClientHandler.java:1062) [FMLClientHandler.class:?]
	at net.minecraftforge.fml.common.FMLCommonHandler.fireSidedRegistryEvents(FMLCommonHandler.java:764) [FMLCommonHandler.class:?]
	at net.minecraftforge.fml.common.Loader.preinitializeMods(Loader.java:629) [Loader.class:?]
	at net.minecraftforge.fml.client.FMLClientHandler.beginMinecraftLoading(FMLClientHandler.java:252) [FMLClientHandler.class:?]
	at net.minecraft.client.Minecraft.init(Minecraft.java:513) [Minecraft.class:?]
	at net.minecraft.client.Minecraft.run(Minecraft.java:421) [Minecraft.class:?]
	at net.minecraft.client.main.Main.main(Main.java:118) [Main.class:?]
	at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method) ~[?:1.8.0_202]
	at sun.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl.java:62) ~[?:1.8.0_202]
	at sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:43) ~[?:1.8.0_202]
	at java.lang.reflect.Method.invoke(Method.java:498) ~[?:1.8.0_202]
	at net.minecraft.launchwrapper.Launch.launch(Launch.java:135) [launchwrapper-1.12.jar:?]
	at net.minecraft.launchwrapper.Launch.main(Launch.java:28) [launchwrapper-1.12.jar:?]
	at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method) ~[?:1.8.0_202]
	at sun.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl.java:62) ~[?:1.8.0_202]
	at sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:43) ~[?:1.8.0_202]
	at java.lang.reflect.Method.invoke(Method.java:498) ~[?:1.8.0_202]
	at net.minecraftforge.gradle.GradleStartCommon.launch(GradleStartCommon.java:97) [start/:?]
	at GradleStart.main(GradleStart.java:25) [start/:?]
[15:50:56] [main/ERROR] [FML]: Index: 1 Listeners:
[15:50:56] [main/ERROR] [FML]: 0: NORMAL
[15:50:56] [main/ERROR] [FML]: 1: net.minecraftforge.fml.common.eventhandler.EventBus$1@5d131f37
[15:50:56] [main/ERROR] [FML]: 2: net.minecraftforge.fml.common.eventhandler.EventBus$1@5d5d8ca6

 

GITHUB

Edited by DiamondMiner88
oops link for class
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.

Announcements



×
×
  • Create New...

Important Information

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