Jump to content

[1.8.9] Game Crashes when trying to spawn custom particle


Spyeedy

Recommended Posts

My game crashes when it tries to spawn my custom particle. From what I can tell of my crash reports, the crashing has got something to do with my rendering of my particle. What I am trying to render is lines like Flash's lightning trail.

 

Crash report:

 

 

---- Minecraft Crash Report ----
// This doesn't make any sense!

Time: 11/20/16 12:00 PM
Description: Rendering Particle

java.lang.NullPointerException: Rendering Particle
at net.minecraft.client.renderer.WorldRenderer.pos(WorldRenderer.java:441)
at com.spyeedy.play.entity.EntitySpeedFX.renderParticle(EntitySpeedFX.java:80)
at net.minecraft.client.particle.EffectRenderer.renderParticles(EffectRenderer.java:285)
at net.minecraft.client.renderer.EntityRenderer.renderWorldPass(EntityRenderer.java:1417)
at net.minecraft.client.renderer.EntityRenderer.renderWorld(EntityRenderer.java:1283)
at net.minecraft.client.renderer.EntityRenderer.updateCameraAndRender(EntityRenderer.java:1111)
at net.minecraft.client.Minecraft.runGameLoop(Minecraft.java:1107)
at net.minecraft.client.Minecraft.run(Minecraft.java:380)
at net.minecraft.client.main.Main.main(Main.java:116)
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)


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

-- Head --
Stacktrace:
at net.minecraft.client.renderer.WorldRenderer.pos(WorldRenderer.java:441)
at com.spyeedy.play.entity.EntitySpeedFX.renderParticle(EntitySpeedFX.java:80)

-- Particle being rendered --
Details:
Particle: EntitySpeedFX, Pos (-1.5608244602035655,4.113023219504369,0.1656671694611595), RGBA (0.9356516,0.0,0.0,1.0), Age 1
Particle Type: MISC_TEXTURE
Stacktrace:
at net.minecraft.client.particle.EffectRenderer.renderParticles(EffectRenderer.java:285)
at net.minecraft.client.renderer.EntityRenderer.renderWorldPass(EntityRenderer.java:1417)
at net.minecraft.client.renderer.EntityRenderer.renderWorld(EntityRenderer.java:1283)

-- Affected level --
Details:
Level name: MpServer
All players: 1 total; [EntityPlayerSP['Player333'/22, l='MpServer', x=-2.21, y=4.00, z=-0.17]]
Chunk stats: MultiplayerChunkCache: 625, 625
Level seed: 0
Level generator: ID 01 - flat, ver 0. Features enabled: false
Level generator options: 
Level spawn location: -1161.00,4.00,967.00 - World: (-1161,4,967), Chunk: (at 7,0,7 in -73,60; contains blocks -1168,0,960 to -1153,255,975), Region: (-3,1; contains chunks -96,32 to -65,63, blocks -1536,0,512 to -1025,255,1023)
Level time: 134072 game time, 1 day time
Level dimension: 0
Level storage version: 0x00000 - Unknown?
Level weather: Rain time: 0 (now: false), thunder time: 0 (now: false)
Level game mode: Game mode: creative (ID 1). Hardcore: false. Cheats: false
Forced entities: 1 total; [EntityPlayerSP['Player333'/22, l='MpServer', x=-2.21, y=4.00, z=-0.17]]
Retry entities: 0 total; []
Server brand: fml,forge
Server type: Integrated singleplayer server
Stacktrace:
at net.minecraft.client.multiplayer.WorldClient.addWorldInfoToCrashReport(WorldClient.java:383)
at net.minecraft.client.Minecraft.addGraphicsAndWorldToCrashReport(Minecraft.java:2645)
at net.minecraft.client.Minecraft.run(Minecraft.java:401)
at net.minecraft.client.main.Main.main(Main.java:116)
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)

-- System Details --
Details:
Minecraft Version: 1.8.9
Operating System: Windows 10 (amd64) version 10.0
Java Version: 1.8.0_111, Oracle Corporation
Java VM Version: Java HotSpot(TM) 64-Bit Server VM (mixed mode), Oracle Corporation
Memory: 741994184 bytes (707 MB) / 1037959168 bytes (989 MB) up to 1037959168 bytes (989 MB)
JVM Flags: 3 total; -Xincgc -Xmx1024M -Xms1024M
IntCache: cache: 0, tcache: 0, allocated: 0, tallocated: 0
FML: MCP 9.19 Powered by Forge 11.15.1.1902 4 mods loaded, 4 mods active
States: 'U' = Unloaded 'L' = Loaded 'C' = Constructed 'H' = Pre-initialized 'I' = Initialized 'J' = Post-initialized 'A' = Available 'D' = Disabled 'E' = Errored
UCHIJAAAA	mcp{9.19} [Minecraft Coder Pack] (minecraft.jar) 
UCHIJAAAA	FML{8.0.99.99} [Forge Mod Loader] (forgeSrc-1.8.9-11.15.1.1902-1.8.9.jar) 
UCHIJAAAA	Forge{11.15.1.1902} [Minecraft Forge] (forgeSrc-1.8.9-11.15.1.1902-1.8.9.jar) 
UCHIJAAAA	play{1.0} [Play Mod] (bin) 
Loaded coremods (and transformers): 
GL info: ' Vendor: 'Intel' Version: '4.3.0 - Build 20.19.15.4444' Renderer: 'Intel(R) HD Graphics 4600'
Launched Version: 1.8.9
LWJGL: 2.9.4
OpenGL: Intel(R) HD Graphics 4600 GL version 4.3.0 - Build 20.19.15.4444, Intel
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: No
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)
CPU: 8x Intel(R) Core(TM) i7-4720HQ CPU @ 2.60GHz

 

 

Class here.

width=620 height=260http://www.startrek.com/uploads/assets/articles/61c89a9d73c284bda486afaeaf01cdb27180359b.jpg[/img]

Till next time. Thank you for delivering funny scenes to Star Trek as Chekov :) . Will always remember you

Link to comment
Share on other sites

Hi

 

That crash usually happens when you've tried to use WorldRenderer before .begin().

 

I'm not sure why that's happening in your case because I thought that EntityFX are always called with .begin() already set.

 

It might be because you are calling tes.draw(), which EntityFX normally don't do in their render.

 

-TGG

 

PS an example of a custom EntityFX renderer is here; it might help to understand what the parameters for renderParticle mean.

 

https://github.com/TheGreyGhost/MinecraftByExample/tree/1-8-9final

Look at the "FlameFX" class in mbe50 package

 

 

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.