Jump to content

Recommended Posts

Posted

I have just added another custom rendered block to my mod but for some reason, the came seems to crash on launch. I am not sure why this is as I have already added many custom rendered blocks. One difference with this one is that it is larger than one block and has a large number of components, so I don't know how to (or if I need to) do something with custom block bounds??? This is the crash report, which I don't have a clue what it means:

 

---- Minecraft Crash Report ----

// This doesn't make any sense!

 

Time: 14/07/14 21:33

Description: Initializing game

 

java.lang.NullPointerException: Initializing game

at com.mottbro.coastercraftmod.model.ModelCoasterCar1.<init>(ModelCoasterCar1.java:779)

at com.mottbro.coastercraftmod.renderer.RenderCoasterCar1.<init>(RenderCoasterCar1.java:26)

at com.mottbro.coastercraftmod.lib.ProxyClient.registerRenderInformation(ProxyClient.java:26)

at com.mottbro.coastercraftmod.CoastercraftMod.load(CoastercraftMod.java:119)

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 cpw.mods.fml.common.FMLModContainer.handleModStateEvent(FMLModContainer.java:513)

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 com.google.common.eventbus.EventHandler.handleEvent(EventHandler.java:74)

at com.google.common.eventbus.SynchronizedEventHandler.handleEvent(SynchronizedEventHandler.java:47)

at com.google.common.eventbus.EventBus.dispatch(EventBus.java:314)

at com.google.common.eventbus.EventBus.dispatchQueuedEvents(EventBus.java:296)

at com.google.common.eventbus.EventBus.post(EventBus.java:267)

at cpw.mods.fml.common.LoadController.sendEventToModContainer(LoadController.java:208)

at cpw.mods.fml.common.LoadController.propogateStateMessage(LoadController.java:187)

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 com.google.common.eventbus.EventHandler.handleEvent(EventHandler.java:74)

at com.google.common.eventbus.SynchronizedEventHandler.handleEvent(SynchronizedEventHandler.java:47)

at com.google.common.eventbus.EventBus.dispatch(EventBus.java:314)

at com.google.common.eventbus.EventBus.dispatchQueuedEvents(EventBus.java:296)

at com.google.common.eventbus.EventBus.post(EventBus.java:267)

at cpw.mods.fml.common.LoadController.distributeStateMessage(LoadController.java:118)

at cpw.mods.fml.common.Loader.initializeMods(Loader.java:690)

at cpw.mods.fml.client.FMLClientHandler.finishMinecraftLoading(FMLClientHandler.java:288)

at net.minecraft.client.Minecraft.startGame(Minecraft.java:527)

at net.minecraft.client.Minecraft.run(Minecraft.java:815)

at net.minecraft.client.main.Main.main(SourceFile:103)

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:134)

at net.minecraft.launchwrapper.Launch.main(Launch.java:28)

 

 

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

---------------------------------------------------------------------------------------

 

-- Head --

Stacktrace:

at com.mottbro.coastercraftmod.model.ModelCoasterCar1.<init>(ModelCoasterCar1.java:779)

at com.mottbro.coastercraftmod.renderer.RenderCoasterCar1.<init>(RenderCoasterCar1.java:26)

at com.mottbro.coastercraftmod.lib.ProxyClient.registerRenderInformation(ProxyClient.java:26)

at com.mottbro.coastercraftmod.CoastercraftMod.load(CoastercraftMod.java:119)

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 cpw.mods.fml.common.FMLModContainer.handleModStateEvent(FMLModContainer.java:513)

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 com.google.common.eventbus.EventHandler.handleEvent(EventHandler.java:74)

at com.google.common.eventbus.SynchronizedEventHandler.handleEvent(SynchronizedEventHandler.java:47)

at com.google.common.eventbus.EventBus.dispatch(EventBus.java:314)

at com.google.common.eventbus.EventBus.dispatchQueuedEvents(EventBus.java:296)

at com.google.common.eventbus.EventBus.post(EventBus.java:267)

at cpw.mods.fml.common.LoadController.sendEventToModContainer(LoadController.java:208)

at cpw.mods.fml.common.LoadController.propogateStateMessage(LoadController.java:187)

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 com.google.common.eventbus.EventHandler.handleEvent(EventHandler.java:74)

at com.google.common.eventbus.SynchronizedEventHandler.handleEvent(SynchronizedEventHandler.java:47)

at com.google.common.eventbus.EventBus.dispatch(EventBus.java:314)

at com.google.common.eventbus.EventBus.dispatchQueuedEvents(EventBus.java:296)

at com.google.common.eventbus.EventBus.post(EventBus.java:267)

at cpw.mods.fml.common.LoadController.distributeStateMessage(LoadController.java:118)

at cpw.mods.fml.common.Loader.initializeMods(Loader.java:690)

at cpw.mods.fml.client.FMLClientHandler.finishMinecraftLoading(FMLClientHandler.java:288)

at net.minecraft.client.Minecraft.startGame(Minecraft.java:527)

 

-- Initialization --

Details:

Stacktrace:

at net.minecraft.client.Minecraft.run(Minecraft.java:815)

at net.minecraft.client.main.Main.main(SourceFile:103)

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:134)

at net.minecraft.launchwrapper.Launch.main(Launch.java:28)

 

-- System Details --

Details:

Minecraft Version: 1.7.2

Operating System: Windows 7 (amd64) version 6.1

Java Version: 1.8.0_05, Oracle Corporation

Java VM Version: Java HotSpot 64-Bit Server VM (mixed mode), Oracle Corporation

Memory: 857006728 bytes (817 MB) / 1038876672 bytes (990 MB) up to 1038876672 bytes (990 MB)

JVM Flags: 3 total; -Xincgc -Xmx1024M -Xms1024M

AABB Pool Size: 0 (0 bytes; 0 MB) allocated, 0 (0 bytes; 0 MB) used

IntCache: cache: 0, tcache: 0, allocated: 0, tallocated: 0

FML: MCP v9.03 FML v7.2.211.1121 Minecraft Forge 10.12.2.1121 4 mods loaded, 4 mods active

mcp{9.03} [Minecraft Coder Pack] (minecraft.jar) Unloaded->Constructed->Pre-initialized->Initialized

FML{7.2.211.1121} [Forge Mod Loader] (forgeBin-1.7.2-10.12.2.1121.jar) Unloaded->Constructed->Pre-initialized->Initialized

Forge{10.12.2.1121} [Minecraft Forge] (forgeBin-1.7.2-10.12.2.1121.jar) Unloaded->Constructed->Pre-initialized->Initialized

coastercraftmod{1.0} [Coastercraft Mod] (bin) Unloaded->Constructed->Pre-initialized->Errored

Launched Version: 1.6

LWJGL: 2.9.0

OpenGL: ATI Mobility Radeon HD 5650                                      GL version 3.2.9712 Compatibility Profile Context, ATI Technologies Inc.

Is Modded: Definitely; Client brand changed to 'fml,forge'

Type: Client (map_client.txt)

Resource Packs: []

Current Language: English (US)

Profiler Position: N/A (disabled)

Vec3 Pool Size: ~~ERROR~~ NullPointerException: null

Anisotropic Filtering: Off (1)

Posted

java.lang.NullPointerException: Initializing game
   at com.mottbro.coastercraftmod.model.ModelCoasterCar1.<init>(ModelCoasterCar1.java:779)

 

Post your ModelCoasterCar1.java file, preferably as a gist :)

Posted

Hi

 

Thanks for replying :)

 

Here is the code from the modelcoastercar1 you asked for.

 

https://gist.github.com/anonymous/3e6994de402e790fc596

 

 

 

  Reveal hidden contents

 

Posted

 a77.mirror = true;
a77 = new ModelRenderer(this, 103, 34);

 

You access the

mirror

field before the object has been instantiated. This issue exists for other uninstantiated ModelRenderers, as well.

 

Remove line 779, it is a duplicate of 784.

Posted

I just corrected that, but it still crashes.

 

 

  Reveal hidden contents

 

Posted

java.lang.NullPointerException: Initializing game
   at com.mottbro.coastercraftmod.model.ModelCoasterCar1.<init>(ModelCoasterCar1.java:1595)

 

What is line 1595 (plus ~5-10 lines of context)?

Posted

Hi

 

Thanks to everyone who replied to me! I have found that the problem was caused by me using mirrored textures in Techne and once I removed those parts it worked fine. Just seems to be a problem with Techne exporting the java code.  :)

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.