Jump to content
View in the app

A better way to browse. Learn more.

Forge Forums

A full-screen app on your home screen with push notifications, badges and more.

To install this app on iOS and iPadOS
  1. Tap the Share icon in Safari
  2. Scroll the menu and tap Add to Home Screen.
  3. Tap Add in the top-right corner.
To install this app on Android
  1. Tap the 3-dot menu (⋮) in the top-right corner of the browser.
  2. Tap Add to Home screen or Install app.
  3. Confirm by tapping Install.

Featured Replies

Posted

To be more specific, NullPointerException strikes again:

Spoiler

 



// I bet Cylons wouldn't have this problem.

Time: 7/5/17 9:57 PM
Description: Initializing game

java.lang.NullPointerException: Initializing game
	at com.random.stuff.ModItems.initModels(ModItems.java:16)
	at com.random.utils.ClientProxy.registerModels(ClientProxy.java:29)
	at net.minecraftforge.fml.common.eventhandler.ASMEventHandler_4_ClientProxy_registerModels_ModelRegistryEvent.invoke(.dynamic)
	at net.minecraftforge.fml.common.eventhandler.ASMEventHandler.invoke(ASMEventHandler.java:90)
	at net.minecraftforge.fml.common.eventhandler.EventBus$1.invoke(EventBus.java:145)
	at net.minecraftforge.fml.common.eventhandler.EventBus.post(EventBus.java:186)
	at net.minecraftforge.fml.client.FMLClientHandler.fireSidedRegistryEvents(FMLClientHandler.java:1085)
	at net.minecraftforge.fml.common.FMLCommonHandler.fireSidedRegistryEvents(FMLCommonHandler.java:765)
	at net.minecraftforge.fml.common.Loader.preinitializeMods(Loader.java:619)
	at net.minecraftforge.fml.client.FMLClientHandler.beginMinecraftLoading(FMLClientHandler.java:267)
	at net.minecraft.client.Minecraft.init(Minecraft.java:508)
	at net.minecraft.client.Minecraft.run(Minecraft.java:416)
	at net.minecraft.client.main.Main.main(Main.java:118)
	at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method)
	at sun.reflect.NativeMethodAccessorImpl.invoke(Unknown Source)
	at sun.reflect.DelegatingMethodAccessorImpl.invoke(Unknown Source)
	at java.lang.reflect.Method.invoke(Unknown Source)
	at net.minecraft.launchwrapper.Launch.launch(Launch.java:135)
	at net.minecraft.launchwrapper.Launch.main(Launch.java:28)
	at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method)
	at sun.reflect.NativeMethodAccessorImpl.invoke(Unknown Source)
	at sun.reflect.DelegatingMethodAccessorImpl.invoke(Unknown Source)
	at java.lang.reflect.Method.invoke(Unknown Source)
	at net.minecraftforge.gradle.GradleStartCommon.launch(GradleStartCommon.java:97)
	at GradleStart.main(GradleStart.java:26)

 

 

ItemGoldShotbow.class:

https://hastebin.com/javogozixe.class

 

ModItems.class:

https://hastebin.com/ifetuxokud.class

 

I probaby missed something really obvious here, but it would help out tons if someone else helped.  If you need to see anymore classes, feel free to let me know. 

 

[move]Insert generic signature here Insert generic signature here Insert generic signature here Insert generic signature here Insert generic signature here Insert generic signature here Insert generic signature here Insert generic signature here Insert generic signature here Insert generic signature here Insert generic signature here Insert generic signature here Insert generic signature here Insert generic signature here Insert generic signature here Insert generic signature here[/move]

Show where you call new ItemGoldShotbow()

Apparently I'm a complete and utter jerk and come to this forum just like to make fun of people, be confrontational, and make your personal life miserable.  If you think this is the case, JUST REPORT ME.  Otherwise you're just going to get reported when you reply to my posts and point it out, because odds are, I was trying to be nice.

 

Exception: If you do not understand Java, I WILL NOT HELP YOU and your thread will get locked.

 

DO NOT PM ME WITH PROBLEMS. No help will be given.

It looks like ModItems.goldshotbow was null when ModelRegistryEvent was fired, which likely means that no Item was registered for the name unnamedmod:goldshotbow at that time (either because it's the wrong name or the Item was registered later).

 

Where are you registering these Items?

Please don't PM me to ask for help. Asking your question in a public thread preserves it for people who are having the same problem in the future.

  • Author
1 minute ago, Draco18s said:

Show where you call new ItemGoldShotbow()

 

Just now, Choonster said:

It looks like ModItems.goldshotbow was null when ModelRegistryEvent was fired, which likely means that no Item was registered for the name unnamedmod:goldshotbow at that time (either because it's the wrong name or the Item was registered later).

 

Where are you registering these Items?

 

Oh, I see what I did wrong here, I forgot to call that in the CommonProxy.  I told you it was probably something really obvious.  Thanks for reminding me. 

[move]Insert generic signature here Insert generic signature here Insert generic signature here Insert generic signature here Insert generic signature here Insert generic signature here Insert generic signature here Insert generic signature here Insert generic signature here Insert generic signature here Insert generic signature here Insert generic signature here Insert generic signature here Insert generic signature here Insert generic signature here Insert generic signature here[/move]

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...

Important Information

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

Configure browser push notifications

Chrome (Android)
  1. Tap the lock icon next to the address bar.
  2. Tap Permissions → Notifications.
  3. Adjust your preference.
Chrome (Desktop)
  1. Click the padlock icon in the address bar.
  2. Select Site settings.
  3. Find Notifications and adjust your preference.