Jump to content

[1.10.2]Help with rendering projectiles.


Bluejet2000

Recommended Posts

Hello, I have just started to mod Minecraft in the past few weeks and I am running into troubles over rendering a projectile. Essentially, what keeps happening is that when I right click with my weapon to release a laser into the Minecraft World, the game screen turns sky blue and a few seconds later, it crashes. What makes this problematic is is that when I look at my crash-log, everything seems to work fine until I get to the very bottom, where it has information on the entity which makes no sense to me currently. here is the crash-log:

---- Minecraft Crash Report ----
// Don't do that.

Time: 6/20/17 4:26 PM
Description: Rendering entity in world

java.lang.NullPointerException: Rendering entity in world
	at net.minecraft.client.renderer.entity.RenderSnowball.doRender(RenderSnowball.java:35)
	at net.minecraft.client.renderer.entity.RenderManager.doRenderEntity(RenderManager.java:372)
	at net.minecraft.client.renderer.entity.RenderManager.renderEntityStatic(RenderManager.java:356)
	at net.minecraft.client.renderer.RenderGlobal.renderEntities(RenderGlobal.java:651)
	at net.minecraft.client.renderer.EntityRenderer.renderWorldPass(EntityRenderer.java:1368)
	at net.minecraft.client.renderer.EntityRenderer.renderWorld(EntityRenderer.java:1282)
	at net.minecraft.client.renderer.EntityRenderer.updateCameraAndRender(EntityRenderer.java:1091)
	at net.minecraft.client.Minecraft.runGameLoop(Minecraft.java:1139)
	at net.minecraft.client.Minecraft.run(Minecraft.java:406)
	at net.minecraft.client.main.Main.main(Main.java:118)
	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:497)
	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(NativeMethodAccessorImpl.java:62)
	at sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:43)
	at java.lang.reflect.Method.invoke(Method.java:497)
	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 --
Thread: Client thread
Stacktrace:
	at net.minecraft.client.renderer.entity.RenderSnowball.doRender(RenderSnowball.java:35)

-- Entity being rendered --
Details:
	Entity Type: craftistry.Laser (ca.universalred.craftistry.common.entities.EntityLaser)
	Entity ID: 10740
	Entity Name: entity.craftistry.Laser.name
	Entity's Exact location: -325.45, 5.52, 580.39
	Entity's Block location: World: (-326,5,580), Chunk: (at 10,0,4 in -21,36; contains blocks -336,0,576 to -321,255,591), Region: (-1,1; contains chunks -32,32 to -1,63, blocks -512,0,512 to -1,255,1023)
	Entity's Momentum: 0.00, 0.00, 0.00
	Entity's Passengers: []
	Entity's Vehicle: ~~ERROR~~ NullPointerException: null

-- Renderer details --
Details:
	Assigned renderer: net.minecraft.client.renderer.entity.RenderSnowball@601c5859
	Location: 0.00,1.52,0.00 - World: (0,1,0), Chunk: (at 0,0,0 in 0,0; contains blocks 0,0,0 to 15,255,15), Region: (0,0; contains chunks 0,0 to 31,31, blocks 0,0,0 to 511,255,511)
	Rotation: 0.0
	Delta: 0.043141365
Stacktrace:
	at net.minecraft.client.renderer.entity.RenderManager.doRenderEntity(RenderManager.java:372)
	at net.minecraft.client.renderer.entity.RenderManager.renderEntityStatic(RenderManager.java:356)
	at net.minecraft.client.renderer.RenderGlobal.renderEntities(RenderGlobal.java:651)
	at net.minecraft.client.renderer.EntityRenderer.renderWorldPass(EntityRenderer.java:1368)
	at net.minecraft.client.renderer.EntityRenderer.renderWorld(EntityRenderer.java:1282)

-- Affected level --
Details:
	Level name: MpServer
	All players: 1 total; [EntityPlayerSP['Player556'/239, l='MpServer', x=-325.45, y=4.00, z=580.39]]
	Chunk stats: MultiplayerChunkCache: 599, 599
	Level seed: 0
	Level generator: ID 01 - flat, ver 0. Features enabled: false
	Level generator options: 
	Level spawn location: World: (-345,4,582), Chunk: (at 7,0,6 in -22,36; contains blocks -352,0,576 to -337,255,591), Region: (-1,1; contains chunks -32,32 to -1,63, blocks -512,0,512 to -1,255,1023)
	Level time: 6951 game time, 6951 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: 162 total; [EntitySlime['Slime'/28, l='MpServer', x=-401.00, y=4.00, z=551.94], EntitySlime['Slime'/30, l='MpServer', x=-397.39, y=4.00, z=598.85], EntitySlime['Slime'/32, l='MpServer', x=-402.86, y=4.28, z=620.90], EntitySlime['Slime'/33, l='MpServer', x=-393.17, y=4.28, z=532.69], EntitySlime['Slime'/34, l='MpServer', x=-395.14, y=5.00, z=586.61], EntitySlime['Slime'/35, l='MpServer', x=-395.03, y=4.00, z=591.41], EntitySlime['Slime'/36, l='MpServer', x=-392.57, y=5.04, z=600.82], EntitySlime['Slime'/37, l='MpServer', x=-388.18, y=4.92, z=610.98], EntitySlime['Slime'/38, l='MpServer', x=-396.43, y=4.63, z=619.60], EntitySlime['Slime'/39, l='MpServer', x=-381.74, y=4.18, z=624.02], EntitySlime['Slime'/40, l='MpServer', x=-403.44, y=4.92, z=632.33], EntitySlime['Slime'/41, l='MpServer', x=-377.92, y=4.00, z=638.67], EntitySlime['Slime'/42, l='MpServer', x=-390.47, y=4.48, z=643.38], EntitySlime['Slime'/44, l='MpServer', x=-361.40, y=4.03, z=561.14], EntitySlime['Slime'/45, l='MpServer', x=-372.24, y=4.00, z=591.03], EntitySlime['Slime'/46, l='MpServer', x=-374.85, y=4.48, z=636.15], EntitySlime['Slime'/47, l='MpServer', x=-389.56, y=5.04, z=653.42], EntitySlime['Slime'/50, l='MpServer', x=-385.63, y=4.18, z=654.51], EntitySlime['Slime'/52, l='MpServer', x=-356.67, y=4.00, z=541.81], EntitySlime['Slime'/53, l='MpServer', x=-366.13, y=4.48, z=560.80], EntityItem['item.tile.dirt.default'/54, l='MpServer', x=-352.39, y=1.00, z=586.13], EntityItem['item.tile.dirt.default'/55, l='MpServer', x=-354.94, y=1.00, z=590.97], EntityItem['item.tile.dirt.default'/56, l='MpServer', x=-356.48, y=1.00, z=590.00], EntityItem['item.tile.dirt.default'/57, l='MpServer', x=-358.75, y=1.00, z=591.39], EntityItem['item.tile.dirt.default'/58, l='MpServer', x=-360.44, y=1.00, z=590.88], EntityItem['item.tile.dirt.default'/59, l='MpServer', x=-356.57, y=1.00, z=590.91], EntityItem['item.tile.dirt.default'/60, l='MpServer', x=-355.75, y=1.00, z=588.20], EntityItem['item.tile.dirt.default'/61, l='MpServer', x=-354.95, y=1.00, z=591.89], EntityItem['item.tile.dirt.default'/62, l='MpServer', x=-353.65, y=1.00, z=588.13], EntityItem['item.tile.dirt.default'/63, l='MpServer', x=-358.02, y=1.00, z=597.07], EntityItem['item.tile.dirt.default'/64, l='MpServer', x=-356.54, y=1.00, z=598.66], EntityItem['item.tile.dirt.default'/65, l='MpServer', x=-360.88, y=3.00, z=597.70], EntityItem['item.tile.dirt.default'/66, l='MpServer', x=-357.10, y=1.00, z=599.64], EntityItem['item.tile.dirt.default'/67, l='MpServer', x=-354.41, y=1.00, z=598.60], EntityItem['item.tile.dirt.default'/68, l='MpServer', x=-358.02, y=1.00, z=599.34], EntityItem['item.tile.dirt.default'/69, l='MpServer', x=-355.88, y=1.00, z=601.38], EntityItem['item.tile.dirt.default'/70, l='MpServer', x=-355.24, y=1.00, z=599.76], EntityItem['item.tile.dirt.default'/71, l='MpServer', x=-353.88, y=1.00, z=601.88], EntityItem['item.tile.dirt.default'/72, l='MpServer', x=-360.01, y=1.00, z=594.54], EntityItem['item.tile.dirt.default'/73, l='MpServer', x=-357.61, y=1.00, z=593.28], EntityItem['item.tile.dirt.default'/74, l='MpServer', x=-354.94, y=1.00, z=594.11], EntityItem['item.tile.dirt.default'/75, l='MpServer', x=-354.52, y=1.00, z=596.76], EntityItem['item.tile.dirt.default'/76, l='MpServer', x=-361.88, y=1.00, z=597.88], EntityItem['item.tile.dirt.default'/77, l='MpServer', x=-358.91, y=2.00, z=596.62], EntityItem['item.tile.dirt.default'/78, l='MpServer', x=-354.41, y=1.00, z=595.83], EntityItem['item.tile.dirt.default'/79, l='MpServer', x=-353.16, y=1.00, z=600.88], EntityItem['item.tile.dirt.default'/80, l='MpServer', x=-352.81, y=1.00, z=598.32], EntityItem['item.tile.dirt.default'/81, l='MpServer', x=-352.60, y=1.00, z=602.88], EntitySlime['Slime'/82, l='MpServer', x=-355.76, y=4.95, z=616.06], EntitySlime['Slime'/83, l='MpServer', x=-355.30, y=4.92, z=608.82], EntitySlime['Slime'/84, l='MpServer', x=-359.80, y=4.00, z=625.85], EntitySlime['Slime'/85, l='MpServer', x=-347.93, y=4.00, z=641.52], EntityItem['item.tile.dirt.default'/87, l='MpServer', x=-345.88, y=3.00, z=574.45], EntityItem['item.tile.dirt.default'/88, l='MpServer', x=-343.13, y=1.00, z=575.13], EntityItem['item.tile.dirt.default'/89, l='MpServer', x=-349.66, y=1.00, z=575.27], EntitySlime['Slime'/90, l='MpServer', x=-347.11, y=1.18, z=578.38], EntityItem['item.tile.dirt.default'/91, l='MpServer', x=-338.17, y=1.00, z=591.13], EntityItem['item.tile.dirt.default'/92, l='MpServer', x=-339.41, y=1.00, z=589.56], EntityItem['item.tile.dirt.default'/93, l='MpServer', x=-344.44, y=1.00, z=589.72], EntityItem['item.tile.dirt.default'/94, l='MpServer', x=-350.88, y=1.00, z=585.16], EntityItem['item.tile.dirt.default'/95, l='MpServer', x=-343.81, y=1.00, z=582.38], EntityItem['item.tile.dirt.default'/96, l='MpServer', x=-340.04, y=1.00, z=585.13], EntityItem['item.tile.dirt.default'/97, l='MpServer', x=-345.62, y=1.00, z=583.67], EntityItem['item.tile.dirt.default'/98, l='MpServer', x=-348.29, y=1.00, z=583.48], EntityItem['item.tile.dirt.default'/99, l='MpServer', x=-351.48, y=1.00, z=586.65], EntityItem['item.tile.dirt.default'/100, l='MpServer', x=-347.40, y=1.00, z=586.78], EntityItem['item.tile.dirt.default'/101, l='MpServer', x=-342.31, y=1.00, z=584.93], EntityItem['item.tile.dirt.default'/102, l='MpServer', x=-339.15, y=1.00, z=586.92], EntityItem['item.tile.dirt.default'/103, l='MpServer', x=-345.21, y=1.00, z=587.16], EntityItem['item.tile.dirt.default'/104, l='MpServer', x=-347.00, y=1.00, z=578.67], EntityItem['item.tile.dirt.default'/105, l='MpServer', x=-342.49, y=1.00, z=577.35], EntityItem['item.tile.dirt.default'/106, l='MpServer', x=-340.96, y=1.00, z=578.53], EntityItem['item.tile.dirt.default'/107, l='MpServer', x=-347.94, y=1.00, z=578.13], EntityItem['item.tile.dirt.default'/108, l='MpServer', x=-345.59, y=1.00, z=580.31], EntityItem['item.tile.dirt.default'/109, l='MpServer', x=-339.82, y=1.00, z=580.13], EntityItem['item.tile.dirt.default'/110, l='MpServer', x=-341.00, y=1.00, z=579.57], EntityItem['item.tile.dirt.default'/111, l='MpServer', x=-346.59, y=1.00, z=580.23], EntityItem['item.tile.dirt.default'/112, l='MpServer', x=-349.30, y=1.00, z=580.80], EntityItem['item.tile.dirt.default'/113, l='MpServer', x=-345.89, y=1.00, z=576.13], EntityItem['item.tile.dirt.default'/114, l='MpServer', x=-347.33, y=1.00, z=576.13], EntityItem['item.tile.dirt.default'/115, l='MpServer', x=-344.93, y=1.00, z=576.12], EntityItem['item.tile.dirt.default'/116, l='MpServer', x=-338.93, y=1.00, z=586.13], EntityItem['item.tile.dirt.default'/117, l='MpServer', x=-350.90, y=1.00, z=576.13], EntityItem['item.tile.dirt.default'/118, l='MpServer', x=-344.18, y=1.00, z=577.65], EntityItem['item.tile.dirt.default'/119, l='MpServer', x=-341.67, y=1.00, z=576.53], EntityItem['item.tile.dirt.default'/120, l='MpServer', x=-348.92, y=1.00, z=590.02], EntityItem['item.tile.dirt.default'/121, l='MpServer', x=-336.88, y=1.00, z=591.13], EntityItem['item.tile.dirt.default'/122, l='MpServer', x=-347.60, y=1.00, z=591.37], EntityItem['item.tile.dirt.default'/123, l='MpServer', x=-339.45, y=1.00, z=591.41], EntityItem['item.tile.dirt.default'/124, l='MpServer', x=-340.71, y=1.00, z=601.88], EntityItem['item.tile.dirt.default'/125, l='MpServer', x=-341.74, y=1.00, z=604.88], EntityItem['item.tile.dirt.default'/126, l='MpServer', x=-347.80, y=1.00, z=604.88], EntityItem['item.tile.dirt.default'/127, l='MpServer', x=-340.69, y=1.00, z=595.10], EntityItem['item.tile.dirt.default'/128, l='MpServer', x=-342.88, y=1.00, z=602.88], EntityItem['item.tile.dirt.default'/129, l='MpServer', x=-342.57, y=1.00, z=605.88], EntityItem['item.tile.dirt.default'/130, l='MpServer', x=-340.35, y=1.00, z=604.88], EntityItem['item.tile.dirt.default'/131, l='MpServer', x=-349.77, y=1.00, z=605.88], EntityItem['item.tile.dirt.default'/132, l='MpServer', x=-345.88, y=1.00, z=605.88], EntityItem['item.tile.dirt.default'/133, l='MpServer', x=-338.79, y=1.00, z=599.92], EntityItem['item.tile.dirt.default'/134, l='MpServer', x=-351.88, y=1.00, z=599.66], EntityItem['item.tile.dirt.default'/135, l='MpServer', x=-349.50, y=1.00, z=603.52], EntityItem['item.tile.dirt.default'/136, l='MpServer', x=-344.50, y=1.00, z=603.20], EntityItem['item.tile.dirt.default'/137, l='MpServer', x=-351.22, y=1.00, z=592.77], EntityItem['item.tile.dirt.default'/138, l='MpServer', x=-346.77, y=1.00, z=594.70], EntityItem['item.tile.dirt.default'/139, l='MpServer', x=-341.62, y=1.00, z=592.52], EntityItem['item.tile.dirt.default'/140, l='MpServer', x=-336.88, y=1.00, z=600.80], EntityItem['item.tile.dirt.default'/141, l='MpServer', x=-338.46, y=1.00, z=602.66], EntityItem['item.tile.dirt.default'/142, l='MpServer', x=-337.44, y=1.00, z=595.99], EntityItem['item.tile.dirt.default'/143, l='MpServer', x=-336.55, y=1.00, z=598.72], EntityItem['item.tile.dirt.default'/144, l='MpServer', x=-337.04, y=1.00, z=592.20], EntityItem['item.tile.dirt.default'/145, l='MpServer', x=-336.96, y=1.00, z=599.55], EntitySlime['Slime'/146, l='MpServer', x=-351.55, y=1.95, z=593.99], EntitySlime['Slime'/147, l='MpServer', x=-362.18, y=4.00, z=619.77], EntitySlime['Slime'/148, l='MpServer', x=-349.88, y=4.77, z=636.92], EntitySlime['Slime'/150, l='MpServer', x=-336.88, y=4.00, z=510.12], EntityItem['item.tile.dirt.default'/151, l='MpServer', x=-335.32, y=2.00, z=589.48], EntityItem['item.tile.dirt.default'/152, l='MpServer', x=-330.22, y=1.00, z=590.59], EntityItem['item.tile.dirt.default'/153, l='MpServer', x=-330.11, y=3.00, z=590.62], EntityItem['item.tile.dirt.default'/154, l='MpServer', x=-331.40, y=1.00, z=591.13], EntityItem['item.tile.dirt.default'/156, l='MpServer', x=-327.13, y=2.00, z=597.88], EntityItem['item.tile.dirt.default'/157, l='MpServer', x=-329.97, y=1.00, z=597.49], EntityItem['item.tile.dirt.default'/158, l='MpServer', x=-329.12, y=1.00, z=599.75], EntityItem['item.tile.dirt.default'/159, l='MpServer', x=-327.69, y=1.00, z=599.27], EntityItem['item.tile.dirt.default'/160, l='MpServer', x=-333.90, y=1.00, z=600.71], EntityItem['item.tile.dirt.default'/161, l='MpServer', x=-330.26, y=1.00, z=599.54], EntityItem['item.tile.dirt.default'/162, l='MpServer', x=-331.88, y=1.00, z=599.23], EntityItem['item.tile.dirt.default'/163, l='MpServer', x=-329.24, y=1.00, z=601.78], EntityItem['item.tile.dirt.default'/164, l='MpServer', x=-335.55, y=1.00, z=602.52], EntityItem['item.tile.dirt.default'/165, l='MpServer', x=-331.43, y=1.00, z=592.81], EntityItem['item.tile.dirt.default'/166, l='MpServer', x=-331.22, y=1.00, z=602.75], EntityItem['item.tile.dirt.default'/167, l='MpServer', x=-327.19, y=1.00, z=595.13], EntityItem['item.tile.dirt.default'/168, l='MpServer', x=-330.89, y=1.00, z=595.65], EntityItem['item.tile.dirt.default'/169, l='MpServer', x=-328.13, y=3.00, z=594.19], EntityItem['item.tile.dirt.default'/170, l='MpServer', x=-328.66, y=1.00, z=596.32], EntityItem['item.tile.dirt.default'/171, l='MpServer', x=-332.40, y=1.00, z=597.53], EntityItem['item.tile.dirt.default'/172, l='MpServer', x=-328.74, y=1.00, z=597.86], EntityItem['item.tile.dirt.default'/173, l='MpServer', x=-334.90, y=1.00, z=597.41], EntityItem['item.tile.cloth.white'/174, l='MpServer', x=-320.03, y=4.00, z=601.67], EntityItem['item.tile.dirt.default'/175, l='MpServer', x=-335.73, y=1.00, z=592.71], EntitySheep['Sheep'/177, l='MpServer', x=-308.77, y=4.00, z=526.55], EntitySheep['Sheep'/178, l='MpServer', x=-317.93, y=4.00, z=525.69], EntityItem['item.item.muttonRaw'/179, l='MpServer', x=-319.61, y=4.00, z=602.01], EntityChicken['Chicken'/184, l='MpServer', x=-301.44, y=4.00, z=514.44], EntitySheep['Sheep'/185, l='MpServer', x=-292.02, y=4.00, z=518.55], EntitySheep['Sheep'/186, l='MpServer', x=-292.24, y=4.00, z=535.56], EntitySlime['Slime'/187, l='MpServer', x=-299.80, y=4.28, z=566.62], EntitySlime['Slime'/188, l='MpServer', x=-297.36, y=4.95, z=571.73], EntitySlime['Slime'/195, l='MpServer', x=-274.12, y=4.00, z=534.83], EntitySlime['Slime'/196, l='MpServer', x=-286.95, y=4.00, z=547.61], EntityChicken['Chicken'/197, l='MpServer', x=-278.66, y=4.00, z=594.05], EntitySlime['Slime'/198, l='MpServer', x=-293.04, y=6.04, z=649.73], EntityVillager['Villager'/201, l='MpServer', x=-283.70, y=3.94, z=658.64], EntitySlime['Slime'/212, l='MpServer', x=-268.17, y=4.00, z=566.92], EntityChicken['Chicken'/213, l='MpServer', x=-259.37, y=4.00, z=583.84], EntityChicken['Chicken'/214, l='MpServer', x=-269.16, y=4.00, z=577.88], EntitySlime['Slime'/215, l='MpServer', x=-260.29, y=4.48, z=622.63], EntitySlime['Slime'/227, l='MpServer', x=-252.15, y=4.78, z=573.89], EntitySlime['Slime'/229, l='MpServer', x=-248.66, y=4.95, z=578.10], EntitySlime['Slime'/230, l='MpServer', x=-250.52, y=5.04, z=608.07], EntityItem['item.item.seeds'/238, l='MpServer', x=-286.25, y=4.00, z=644.23], EntityLaser['entity.craftistry.Laser.name'/10740, l='MpServer', x=-325.45, y=5.52, z=580.39], EntityPlayerSP['Player556'/239, l='MpServer', x=-325.45, y=4.00, z=580.39]]
	Retry entities: 0 total; []
	Server brand: fml,forge
	Server type: Integrated singleplayer server
Stacktrace:
	at net.minecraft.client.multiplayer.WorldClient.addWorldInfoToCrashReport(WorldClient.java:456)
	at net.minecraft.client.Minecraft.addGraphicsAndWorldToCrashReport(Minecraft.java:2779)
	at net.minecraft.client.Minecraft.run(Minecraft.java:427)
	at net.minecraft.client.main.Main.main(Main.java:118)
	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:497)
	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(NativeMethodAccessorImpl.java:62)
	at sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:43)
	at java.lang.reflect.Method.invoke(Method.java:497)
	at net.minecraftforge.gradle.GradleStartCommon.launch(GradleStartCommon.java:97)
	at GradleStart.main(GradleStart.java:26)

-- System Details --
Details:
	Minecraft Version: 1.10.2
	Operating System: Windows 10 (amd64) version 10.0
	Java Version: 1.8.0_71, Oracle Corporation
	Java VM Version: Java HotSpot(TM) 64-Bit Server VM (mixed mode), Oracle Corporation
	Memory: 568117856 bytes (541 MB) / 1054343168 bytes (1005 MB) up to 1908932608 bytes (1820 MB)
	JVM Flags: 1 total; -Xmx2g
	IntCache: cache: 0, tcache: 0, allocated: 0, tallocated: 0
	FML: MCP 9.32 Powered by Forge 12.18.3.2316 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.10.2-12.18.3.2316.jar) 
	UCHIJAAAA	Forge{12.18.3.2316} [Minecraft Forge] (forgeSrc-1.10.2-12.18.3.2316.jar) 
	UCHIJAAAA	craftistry{0.0.1a} [Craftistry] (MC 1.10.2) 
	Loaded coremods (and transformers): 
	GL info: ' Vendor: 'NVIDIA Corporation' Version: '4.5.0 NVIDIA 382.33' Renderer: 'GeForce GTX 660/PCIe/SSE2'
	Launched Version: 1.10.2
	LWJGL: 2.9.4
	OpenGL: GeForce GTX 660/PCIe/SSE2 GL version 4.5.0 NVIDIA 382.33, NVIDIA Corporation
	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 '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-4770 CPU @ 3.40GHz

 

Here are the classes relating to the entity:

 

Mod Class:

@Mod(modid = ModLibs.MODID, name = ModLibs.MODNAME, version = ModLibs.VERSION, acceptedMinecraftVersions = "[1.10.2]")
public class ModCraftistry {

    @SidedProxy(serverSide = "ca.universalred.craftistry.CommonProxy", clientSide = "ca.universalred.craftistry.ClientProxy")
    public static CommonProxy PROXY;

    @Mod.Instance(ModLibs.MODID)
    public static ModCraftistry INSTANCE;

    @Mod.EventHandler
    public void preInit(FMLPreInitializationEvent event) {
        ModItems.preInit();
        ModEntities.preInit();
        PROXY.renderObjects();
    }

    @Mod.EventHandler
    public void init(FMLInitializationEvent event) {
        ModItems.init();
        ModEntities.init();
    }

    @Mod.EventHandler
    public void postInit(FMLPostInitializationEvent event) {
        ModItems.postInit();
        ModEntities.postInit();
    }

}

 

Laser Gun:

public class ItemLaserGun extends ItemFluxBase {

    public ItemLaserGun(String name, int maxRF, int maxTransfer) {
        super(name, maxRF, maxTransfer);
        this.setMaxStackSize(1);
        this.setFull3D();
    }

    @Override
    public EnumActionResult onItemUse(ItemStack stack, EntityPlayer playerIn, World worldIn, BlockPos pos, EnumHand hand, EnumFacing facing, float hitX, float hitY, float hitZ) {

        if (currentRF > maxTransfer) {

            worldIn.spawnEntityInWorld(new EntityLaser(worldIn, playerIn));

            //EntityLaser entitylaser = new EntityLaser (worldIn, playerIn);
            currentRF -= maxTransfer;
        }

        return super.onItemUse(stack, playerIn, worldIn, pos, hand, facing, hitX, hitY, hitZ);
    }

    @Override
    public void onUpdate(ItemStack stack, World worldIn, Entity entityIn, int itemSlot, boolean isSelected) {
        super.onUpdate(stack, worldIn, entityIn, itemSlot, isSelected);
    }
}

 

Laser Entity:

public class EntityLaser extends EntityThrowable {

    public static final float explosionPower = 0.75F;
    public static final int radius = 4;

    public EntityLaser(World worldIn) {
        super(worldIn);
    }

    public EntityLaser(World worldIn, double x, double y, double z) {
        super(worldIn, x, y, z);
    }

    public EntityLaser(World worldIn, EntityLivingBase throwerIn) {
        super(worldIn, throwerIn);
    }

    @Override
    protected void onImpact(RayTraceResult result) {

        explode ();
    }

    @Override
    protected float getGravityVelocity()
    {
        return 0.005F;
    }

    @Override
    public void onUpdate()
    {
        //super.onUpdate();
        if (ticksExisted > 20)
        {
            explode();
        }
    }

    private void explode()
    {
        //worldObj.createExplosion(this, posX, posY, posZ, explosionPower, true);
        System.out.println("Hello World");

        if (!worldObj.isRemote) {
            setDead();
        }
    }


}

 

ModEntities Class:

public class ModEntities {

    public static void preInit () {
        registerEntities();
    }

    public static void init () {

    }

    public static void postInit () {

    }

    private static void registerEntities () {
        EntityRegistry.registerModEntity(EntityLaser.class, "Laser", ++ModLibs.modEntityID, ModCraftistry.INSTANCE, 64, 1, true);
    }
}

 

ClientProxy:

public class ClientProxy extends CommonProxy {

    @Override
    public void renderObjects () {
        RenderingRegistry.registerEntityRenderingHandler(EntityLaser.class, new RenderSnowball<EntityLaser>(Minecraft.getMinecraft().getRenderManager(), ModItems.itemLaser, Minecraft.getMinecraft().getRenderItem()));
    }

    @Override
    public void registerItemRenderer(Item item, int meta, String id) {
        ModelLoader.setCustomModelResourceLocation(item, meta, new ModelResourceLocation(ModLibs.MODID + ":" + id, "inventory"));
    }
}

 

Link to comment
Share on other sites

RenderingRegistry.registerEntityRenderingHandler is overloaded with two versions that take different arguments. The version you are using takes a Class and a Render as parameters. This version is deprecated and due to be removed in a later version, and it's not recommended. But if you do use it, it must be in init, not preInit - that's the actual cause of your current issue.

 

The recommended version of that method to use takes a Class and an IRenderFactory as parameters. An IRenderFactory is a functional interface with one method which simply returns a new instance of the entity Render. That version should be called in preInit.

 

Your IDE should show you this information - the methods have doc comments explaining how and when to use them, and the old version is annotated with @Deprecated.

IDE.thumb.png.6e0293db1c5bade2cbb0d0255d61313f.png

 

 

 

Edited by Jay Avery
Link to comment
Share on other sites

I've done what both of you have said and I switched to the non-deprecated method, however when I now launch the game and launch the laser from my weapon, I still get the sky blue game screen, here is the new crash report and new code:

---- Minecraft Crash Report ----
// Who set us up the TNT?

Time: 6/20/17 5:31 PM
Description: Rendering entity in world

java.lang.NullPointerException: Rendering entity in world
	at net.minecraft.client.renderer.entity.RenderSnowball.doRender(RenderSnowball.java:35)
	at net.minecraft.client.renderer.entity.RenderManager.doRenderEntity(RenderManager.java:372)
	at net.minecraft.client.renderer.entity.RenderManager.renderEntityStatic(RenderManager.java:356)
	at net.minecraft.client.renderer.RenderGlobal.renderEntities(RenderGlobal.java:651)
	at net.minecraft.client.renderer.EntityRenderer.renderWorldPass(EntityRenderer.java:1368)
	at net.minecraft.client.renderer.EntityRenderer.renderWorld(EntityRenderer.java:1282)
	at net.minecraft.client.renderer.EntityRenderer.updateCameraAndRender(EntityRenderer.java:1091)
	at net.minecraft.client.Minecraft.runGameLoop(Minecraft.java:1139)
	at net.minecraft.client.Minecraft.run(Minecraft.java:406)
	at net.minecraft.client.main.Main.main(Main.java:118)
	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:497)
	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(NativeMethodAccessorImpl.java:62)
	at sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:43)
	at java.lang.reflect.Method.invoke(Method.java:497)
	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 --
Thread: Client thread
Stacktrace:
	at net.minecraft.client.renderer.entity.RenderSnowball.doRender(RenderSnowball.java:35)

-- Entity being rendered --
Details:
	Entity Type: craftistry.Laser (ca.universalred.craftistry.common.entities.EntityLaser)
	Entity ID: 5952
	Entity Name: entity.craftistry.Laser.name
	Entity's Exact location: -327.48, 5.52, 579.82
	Entity's Block location: World: (-328,5,579), Chunk: (at 8,0,3 in -21,36; contains blocks -336,0,576 to -321,255,591), Region: (-1,1; contains chunks -32,32 to -1,63, blocks -512,0,512 to -1,255,1023)
	Entity's Momentum: 0.00, 0.00, 0.00
	Entity's Passengers: []
	Entity's Vehicle: ~~ERROR~~ NullPointerException: null

-- Renderer details --
Details:
	Assigned renderer: net.minecraft.client.renderer.entity.RenderSnowball@4290a321
	Location: 0.00,1.52,0.00 - World: (0,1,0), Chunk: (at 0,0,0 in 0,0; contains blocks 0,0,0 to 15,255,15), Region: (0,0; contains chunks 0,0 to 31,31, blocks 0,0,0 to 511,255,511)
	Rotation: 0.0
	Delta: 0.029903173
Stacktrace:
	at net.minecraft.client.renderer.entity.RenderManager.doRenderEntity(RenderManager.java:372)
	at net.minecraft.client.renderer.entity.RenderManager.renderEntityStatic(RenderManager.java:356)
	at net.minecraft.client.renderer.RenderGlobal.renderEntities(RenderGlobal.java:651)
	at net.minecraft.client.renderer.EntityRenderer.renderWorldPass(EntityRenderer.java:1368)
	at net.minecraft.client.renderer.EntityRenderer.renderWorld(EntityRenderer.java:1282)

-- Affected level --
Details:
	Level name: MpServer
	All players: 1 total; [EntityPlayerSP['Player172'/240, l='MpServer', x=-327.48, y=4.00, z=579.82]]
	Chunk stats: MultiplayerChunkCache: 599, 599
	Level seed: 0
	Level generator: ID 01 - flat, ver 0. Features enabled: false
	Level generator options: 
	Level spawn location: World: (-345,4,582), Chunk: (at 7,0,6 in -22,36; contains blocks -352,0,576 to -337,255,591), Region: (-1,1; contains chunks -32,32 to -1,63, blocks -512,0,512 to -1,255,1023)
	Level time: 7280 game time, 7280 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: 164 total; [EntityPlayerSP['Player172'/240, l='MpServer', x=-327.48, y=4.00, z=579.82], EntitySlime['Slime'/25, l='MpServer', x=-406.72, y=4.00, z=539.84], EntitySlime['Slime'/26, l='MpServer', x=-402.96, y=4.28, z=546.63], EntitySlime['Slime'/29, l='MpServer', x=-404.12, y=4.28, z=619.51], EntitySlime['Slime'/33, l='MpServer', x=-401.57, y=4.42, z=543.55], EntitySlime['Slime'/34, l='MpServer', x=-394.65, y=4.95, z=584.99], EntitySlime['Slime'/35, l='MpServer', x=-390.68, y=4.28, z=601.87], EntitySlime['Slime'/36, l='MpServer', x=-391.98, y=4.00, z=597.70], EntitySlime['Slime'/37, l='MpServer', x=-392.87, y=4.00, z=591.09], EntitySlime['Slime'/38, l='MpServer', x=-395.10, y=4.17, z=593.73], EntitySlime['Slime'/39, l='MpServer', x=-394.58, y=4.14, z=629.05], EntitySlime['Slime'/40, l='MpServer', x=-397.85, y=4.00, z=641.92], EntitySlime['Slime'/41, l='MpServer', x=-383.83, y=4.00, z=545.97], EntitySlime['Slime'/42, l='MpServer', x=-371.27, y=4.95, z=586.90], EntitySlime['Slime'/43, l='MpServer', x=-372.43, y=4.00, z=621.39], EntitySlime['Slime'/44, l='MpServer', x=-383.72, y=4.00, z=616.64], EntitySlime['Slime'/45, l='MpServer', x=-378.69, y=4.00, z=631.95], EntitySlime['Slime'/46, l='MpServer', x=-379.51, y=5.17, z=646.02], EntitySlime['Slime'/47, l='MpServer', x=-377.14, y=4.76, z=651.34], EntitySlime['Slime'/51, l='MpServer', x=-371.29, y=4.95, z=549.97], EntitySlime['Slime'/52, l='MpServer', x=-367.23, y=4.00, z=560.28], EntityItem['item.tile.dirt.default'/53, l='MpServer', x=-352.39, y=1.00, z=586.13], EntityItem['item.tile.dirt.default'/54, l='MpServer', x=-354.94, y=1.00, z=590.97], EntityItem['item.tile.dirt.default'/55, l='MpServer', x=-356.48, y=1.00, z=590.00], EntityItem['item.tile.dirt.default'/56, l='MpServer', x=-358.75, y=1.00, z=591.39], EntityItem['item.tile.dirt.default'/57, l='MpServer', x=-360.44, y=1.00, z=590.88], EntityItem['item.tile.dirt.default'/58, l='MpServer', x=-356.57, y=1.00, z=590.91], EntityItem['item.tile.dirt.default'/59, l='MpServer', x=-355.75, y=1.00, z=588.20], EntityItem['item.tile.dirt.default'/60, l='MpServer', x=-354.96, y=1.00, z=591.89], EntityItem['item.tile.dirt.default'/61, l='MpServer', x=-353.65, y=1.00, z=588.13], EntityItem['item.tile.dirt.default'/62, l='MpServer', x=-358.02, y=1.00, z=597.07], EntityItem['item.tile.dirt.default'/63, l='MpServer', x=-356.54, y=1.00, z=598.66], EntityItem['item.tile.dirt.default'/64, l='MpServer', x=-360.88, y=3.00, z=597.70], EntityLaser['entity.craftistry.Laser.name'/5952, l='MpServer', x=-327.48, y=5.52, z=579.82], EntityItem['item.tile.dirt.default'/65, l='MpServer', x=-357.10, y=1.00, z=599.64], EntityItem['item.tile.dirt.default'/66, l='MpServer', x=-354.41, y=1.00, z=598.60], EntityItem['item.tile.dirt.default'/67, l='MpServer', x=-358.02, y=1.00, z=599.34], EntityItem['item.tile.dirt.default'/68, l='MpServer', x=-355.88, y=1.00, z=601.38], EntityItem['item.tile.dirt.default'/69, l='MpServer', x=-355.24, y=1.00, z=599.76], EntityItem['item.tile.dirt.default'/70, l='MpServer', x=-353.88, y=1.00, z=601.88], EntityItem['item.tile.dirt.default'/71, l='MpServer', x=-360.01, y=1.00, z=594.54], EntityItem['item.tile.dirt.default'/72, l='MpServer', x=-357.61, y=1.00, z=593.28], EntityItem['item.tile.dirt.default'/73, l='MpServer', x=-354.94, y=1.00, z=594.11], EntityItem['item.tile.dirt.default'/74, l='MpServer', x=-354.52, y=1.00, z=596.76], EntityItem['item.tile.dirt.default'/75, l='MpServer', x=-361.88, y=1.00, z=597.88], EntityItem['item.tile.dirt.default'/76, l='MpServer', x=-358.91, y=2.00, z=596.62], EntityItem['item.tile.dirt.default'/77, l='MpServer', x=-354.41, y=1.00, z=595.83], EntityItem['item.tile.dirt.default'/78, l='MpServer', x=-353.16, y=1.00, z=600.88], EntityItem['item.tile.dirt.default'/79, l='MpServer', x=-352.81, y=1.00, z=598.32], EntityItem['item.tile.dirt.default'/80, l='MpServer', x=-352.60, y=1.00, z=602.88], EntitySlime['Slime'/81, l='MpServer', x=-358.68, y=2.28, z=597.98], EntitySlime['Slime'/82, l='MpServer', x=-354.68, y=4.28, z=607.81], EntitySlime['Slime'/83, l='MpServer', x=-358.89, y=4.00, z=629.07], EntitySlime['Slime'/84, l='MpServer', x=-360.96, y=4.95, z=623.59], EntitySlime['Slime'/85, l='MpServer', x=-360.99, y=4.00, z=624.99], EntitySlime['Slime'/86, l='MpServer', x=-350.11, y=4.00, z=639.01], EntitySlime['Slime'/87, l='MpServer', x=-357.97, y=4.00, z=633.01], EntitySlime['Slime'/88, l='MpServer', x=-357.03, y=4.00, z=651.71], EntitySlime['Slime'/89, l='MpServer', x=-339.31, y=4.55, z=509.38], EntitySlime['Slime'/90, l='MpServer', x=-352.53, y=4.76, z=535.61], EntityItem['item.tile.dirt.default'/91, l='MpServer', x=-345.88, y=3.00, z=574.45], EntityItem['item.tile.dirt.default'/92, l='MpServer', x=-343.13, y=1.00, z=575.13], EntityItem['item.tile.dirt.default'/93, l='MpServer', x=-349.66, y=1.00, z=575.27], EntityItem['item.tile.dirt.default'/94, l='MpServer', x=-338.17, y=1.00, z=591.13], EntityItem['item.tile.dirt.default'/95, l='MpServer', x=-339.41, y=1.00, z=589.56], EntityItem['item.tile.dirt.default'/96, l='MpServer', x=-344.44, y=1.00, z=589.72], EntityItem['item.tile.dirt.default'/97, l='MpServer', x=-350.88, y=1.00, z=585.16], EntityItem['item.tile.dirt.default'/98, l='MpServer', x=-343.81, y=1.00, z=582.38], EntityItem['item.tile.dirt.default'/99, l='MpServer', x=-340.04, y=1.00, z=585.13], EntityItem['item.tile.dirt.default'/100, l='MpServer', x=-345.62, y=1.00, z=583.67], EntityItem['item.tile.dirt.default'/101, l='MpServer', x=-348.29, y=1.00, z=583.48], EntityItem['item.tile.dirt.default'/102, l='MpServer', x=-351.48, y=1.00, z=586.65], EntityItem['item.tile.dirt.default'/103, l='MpServer', x=-347.40, y=1.00, z=586.78], EntityItem['item.tile.dirt.default'/104, l='MpServer', x=-342.31, y=1.00, z=584.93], EntityItem['item.tile.dirt.default'/105, l='MpServer', x=-339.15, y=1.00, z=586.92], EntityItem['item.tile.dirt.default'/106, l='MpServer', x=-345.21, y=1.00, z=587.16], EntityItem['item.tile.dirt.default'/107, l='MpServer', x=-347.00, y=1.00, z=578.67], EntityItem['item.tile.dirt.default'/108, l='MpServer', x=-342.49, y=1.00, z=577.35], EntityItem['item.tile.dirt.default'/109, l='MpServer', x=-340.96, y=1.00, z=578.53], EntityItem['item.tile.dirt.default'/110, l='MpServer', x=-347.94, y=1.00, z=578.13], EntityItem['item.tile.dirt.default'/111, l='MpServer', x=-345.59, y=1.00, z=580.31], EntityItem['item.tile.dirt.default'/112, l='MpServer', x=-339.82, y=1.00, z=580.13], EntityItem['item.tile.dirt.default'/113, l='MpServer', x=-341.00, y=1.00, z=579.56], EntityItem['item.tile.dirt.default'/114, l='MpServer', x=-346.59, y=1.00, z=580.23], EntityItem['item.tile.dirt.default'/115, l='MpServer', x=-349.30, y=1.00, z=580.80], EntityItem['item.tile.dirt.default'/116, l='MpServer', x=-345.89, y=1.00, z=576.13], EntityItem['item.tile.dirt.default'/117, l='MpServer', x=-347.33, y=1.00, z=576.13], EntityItem['item.tile.dirt.default'/118, l='MpServer', x=-344.93, y=1.00, z=576.12], EntityItem['item.tile.dirt.default'/119, l='MpServer', x=-338.93, y=1.00, z=586.13], EntityItem['item.tile.dirt.default'/120, l='MpServer', x=-350.90, y=1.00, z=576.13], EntityItem['item.tile.dirt.default'/121, l='MpServer', x=-344.18, y=1.00, z=577.65], EntityItem['item.tile.dirt.default'/122, l='MpServer', x=-341.67, y=1.00, z=576.53], EntityItem['item.tile.dirt.default'/123, l='MpServer', x=-348.92, y=1.00, z=590.02], EntityItem['item.tile.dirt.default'/124, l='MpServer', x=-336.88, y=1.00, z=591.13], EntityItem['item.tile.dirt.default'/125, l='MpServer', x=-347.60, y=1.00, z=591.37], EntityItem['item.tile.dirt.default'/126, l='MpServer', x=-339.45, y=1.00, z=591.41], EntitySlime['Slime'/127, l='MpServer', x=-341.25, y=1.00, z=579.95], EntityItem['item.tile.dirt.default'/128, l='MpServer', x=-340.71, y=1.00, z=601.88], EntityItem['item.tile.dirt.default'/129, l='MpServer', x=-341.74, y=1.00, z=604.88], EntityItem['item.tile.dirt.default'/130, l='MpServer', x=-347.80, y=1.00, z=604.88], EntityItem['item.tile.dirt.default'/131, l='MpServer', x=-340.69, y=1.00, z=595.10], EntityItem['item.tile.dirt.default'/132, l='MpServer', x=-342.88, y=1.00, z=602.88], EntityItem['item.tile.dirt.default'/133, l='MpServer', x=-342.57, y=1.00, z=605.88], EntityItem['item.tile.dirt.default'/134, l='MpServer', x=-340.35, y=1.00, z=604.88], EntityItem['item.tile.dirt.default'/135, l='MpServer', x=-349.78, y=1.00, z=605.88], EntityItem['item.tile.dirt.default'/136, l='MpServer', x=-345.88, y=1.00, z=605.88], EntityItem['item.tile.dirt.default'/137, l='MpServer', x=-338.79, y=1.00, z=599.92], EntityItem['item.tile.dirt.default'/138, l='MpServer', x=-351.88, y=1.00, z=599.66], EntityItem['item.tile.dirt.default'/139, l='MpServer', x=-349.50, y=1.00, z=603.52], EntityItem['item.tile.dirt.default'/140, l='MpServer', x=-344.50, y=1.00, z=603.20], EntityItem['item.tile.dirt.default'/141, l='MpServer', x=-351.22, y=1.00, z=592.77], EntityItem['item.tile.dirt.default'/142, l='MpServer', x=-346.77, y=1.00, z=594.70], EntityItem['item.tile.dirt.default'/143, l='MpServer', x=-341.62, y=1.00, z=592.52], EntityItem['item.tile.dirt.default'/144, l='MpServer', x=-336.88, y=1.00, z=600.80], EntityItem['item.tile.dirt.default'/145, l='MpServer', x=-338.46, y=1.00, z=602.66], EntityItem['item.tile.dirt.default'/146, l='MpServer', x=-337.44, y=1.00, z=595.99], EntityItem['item.tile.dirt.default'/147, l='MpServer', x=-336.55, y=1.00, z=598.72], EntityItem['item.tile.dirt.default'/148, l='MpServer', x=-337.04, y=1.00, z=592.20], EntityItem['item.tile.dirt.default'/149, l='MpServer', x=-336.96, y=1.00, z=599.55], EntitySlime['Slime'/150, l='MpServer', x=-351.58, y=4.00, z=614.53], EntityItem['item.tile.dirt.default'/153, l='MpServer', x=-335.32, y=2.00, z=589.48], EntityItem['item.tile.dirt.default'/154, l='MpServer', x=-330.22, y=1.00, z=590.59], EntityItem['item.tile.dirt.default'/155, l='MpServer', x=-330.11, y=3.00, z=590.62], EntityItem['item.tile.dirt.default'/156, l='MpServer', x=-331.40, y=1.00, z=591.13], EntityItem['item.tile.dirt.default'/158, l='MpServer', x=-327.13, y=2.00, z=597.88], EntityItem['item.tile.dirt.default'/159, l='MpServer', x=-329.97, y=1.00, z=597.49], EntityItem['item.tile.dirt.default'/160, l='MpServer', x=-329.12, y=1.00, z=599.75], EntityItem['item.tile.dirt.default'/161, l='MpServer', x=-327.69, y=1.00, z=599.27], EntityItem['item.tile.dirt.default'/162, l='MpServer', x=-333.90, y=1.00, z=600.71], EntityItem['item.tile.dirt.default'/163, l='MpServer', x=-330.26, y=1.00, z=599.54], EntityItem['item.tile.dirt.default'/164, l='MpServer', x=-331.88, y=1.00, z=599.23], EntityItem['item.tile.dirt.default'/165, l='MpServer', x=-329.24, y=1.00, z=601.78], EntityItem['item.tile.dirt.default'/166, l='MpServer', x=-335.55, y=1.00, z=602.52], EntityItem['item.tile.dirt.default'/167, l='MpServer', x=-331.43, y=1.00, z=592.81], EntityItem['item.tile.dirt.default'/168, l='MpServer', x=-331.22, y=1.00, z=602.75], EntityItem['item.tile.dirt.default'/169, l='MpServer', x=-327.19, y=1.00, z=595.13], EntityItem['item.tile.dirt.default'/170, l='MpServer', x=-330.89, y=1.00, z=595.65], EntityItem['item.tile.dirt.default'/171, l='MpServer', x=-328.13, y=3.00, z=594.19], EntityItem['item.tile.dirt.default'/172, l='MpServer', x=-328.66, y=1.00, z=596.32], EntityItem['item.tile.dirt.default'/173, l='MpServer', x=-332.40, y=1.00, z=597.53], EntityItem['item.tile.dirt.default'/174, l='MpServer', x=-328.74, y=1.00, z=597.86], EntityItem['item.tile.dirt.default'/175, l='MpServer', x=-334.90, y=1.00, z=597.41], EntityItem['item.tile.cloth.white'/176, l='MpServer', x=-320.03, y=4.00, z=601.67], EntityItem['item.tile.dirt.default'/177, l='MpServer', x=-335.73, y=1.00, z=592.71], EntitySheep['Sheep'/178, l='MpServer', x=-317.93, y=4.00, z=525.69], EntitySlime['Slime'/179, l='MpServer', x=-298.64, y=4.00, z=561.34], EntityItem['item.item.muttonRaw'/180, l='MpServer', x=-319.61, y=4.00, z=602.01], EntitySlime['Slime'/181, l='MpServer', x=-319.08, y=4.72, z=648.32], EntityChicken['Chicken'/185, l='MpServer', x=-300.76, y=4.00, z=515.88], EntitySheep['Sheep'/186, l='MpServer', x=-301.59, y=4.00, z=519.70], EntitySheep['Sheep'/187, l='MpServer', x=-292.24, y=4.00, z=535.56], EntitySlime['Slime'/188, l='MpServer', x=-297.73, y=4.00, z=567.82], EntitySheep['Sheep'/196, l='MpServer', x=-284.75, y=4.00, z=522.37], EntitySlime['Slime'/197, l='MpServer', x=-274.33, y=4.76, z=537.13], EntitySlime['Slime'/198, l='MpServer', x=-287.43, y=4.00, z=547.40], EntityChicken['Chicken'/199, l='MpServer', x=-276.08, y=4.00, z=585.06], EntityChicken['Chicken'/200, l='MpServer', x=-278.66, y=4.00, z=594.05], EntityVillager['Villager'/203, l='MpServer', x=-283.70, y=3.94, z=658.64], EntitySlime['Slime'/214, l='MpServer', x=-264.90, y=4.00, z=567.01], EntityChicken['Chicken'/215, l='MpServer', x=-259.37, y=4.00, z=583.84], EntitySlime['Slime'/216, l='MpServer', x=-262.71, y=4.00, z=619.82], EntitySlime['Slime'/228, l='MpServer', x=-249.53, y=4.00, z=568.56], EntitySlime['Slime'/229, l='MpServer', x=-248.16, y=4.28, z=570.33], EntitySlime['Slime'/231, l='MpServer', x=-260.98, y=4.04, z=600.83]]
	Retry entities: 0 total; []
	Server brand: fml,forge
	Server type: Integrated singleplayer server
Stacktrace:
	at net.minecraft.client.multiplayer.WorldClient.addWorldInfoToCrashReport(WorldClient.java:456)
	at net.minecraft.client.Minecraft.addGraphicsAndWorldToCrashReport(Minecraft.java:2779)
	at net.minecraft.client.Minecraft.run(Minecraft.java:427)
	at net.minecraft.client.main.Main.main(Main.java:118)
	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:497)
	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(NativeMethodAccessorImpl.java:62)
	at sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:43)
	at java.lang.reflect.Method.invoke(Method.java:497)
	at net.minecraftforge.gradle.GradleStartCommon.launch(GradleStartCommon.java:97)
	at GradleStart.main(GradleStart.java:26)

-- System Details --
Details:
	Minecraft Version: 1.10.2
	Operating System: Windows 10 (amd64) version 10.0
	Java Version: 1.8.0_71, Oracle Corporation
	Java VM Version: Java HotSpot(TM) 64-Bit Server VM (mixed mode), Oracle Corporation
	Memory: 526027448 bytes (501 MB) / 1006108672 bytes (959 MB) up to 1908932608 bytes (1820 MB)
	JVM Flags: 1 total; -Xmx2g
	IntCache: cache: 0, tcache: 0, allocated: 0, tallocated: 0
	FML: MCP 9.32 Powered by Forge 12.18.3.2316 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.10.2-12.18.3.2316.jar) 
	UCHIJAAAA	Forge{12.18.3.2316} [Minecraft Forge] (forgeSrc-1.10.2-12.18.3.2316.jar) 
	UCHIJAAAA	craftistry{0.0.1a} [Craftistry] (MC 1.10.2) 
	Loaded coremods (and transformers): 
	GL info: ' Vendor: 'NVIDIA Corporation' Version: '4.5.0 NVIDIA 382.33' Renderer: 'GeForce GTX 660/PCIe/SSE2'
	Launched Version: 1.10.2
	LWJGL: 2.9.4
	OpenGL: GeForce GTX 660/PCIe/SSE2 GL version 4.5.0 NVIDIA 382.33, NVIDIA Corporation
	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 '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-4770 CPU @ 3.40GHz

 New code:

public class ClientProxy extends CommonProxy {

    @Override
    public void renderObjects () {
        //RenderingRegistry.registerEntityRenderingHandler(EntityLaser.class, new RenderSnowball<EntityLaser>(Minecraft.getMinecraft().getRenderManager(), ModItems.itemLaser, Minecraft.getMinecraft().getRenderItem()));
        RenderingRegistry.registerEntityRenderingHandler(EntityLaser.class, new IRenderFactory<EntityLaser>() {
            @Override
            public Render<? super EntityLaser> createRenderFor(RenderManager manager) {
                return new RenderSnowball<EntityLaser>(Minecraft.getMinecraft().getRenderManager(), Items.ARROW, Minecraft.getMinecraft().getRenderItem());
            }
        });
    }

    @Override
    public void registerItemRenderer(Item item, int meta, String id) {
        ModelLoader.setCustomModelResourceLocation(item, meta, new ModelResourceLocation(ModLibs.MODID + ":" + id, "inventory"));
    }
}

 

The proxy registers the renders in the main mod class already in the Pre-Init., I never changed the code in it.

Edited by Bluejet2000
Link to comment
Share on other sites

You shouldn't use Minecraft.getMinecraft().getRenderManager() - the createRenderFor method has a RenderManager parameter for you to use.

 

(The render factory methods are called in the constructor for Minecraft's RenderManager, so it's null at the time you call it.)

Edited by Jay Avery
Link to comment
Share on other sites

5 minutes ago, Jay Avery said:

You shouldn't use Minecraft.getMinecraft().getRenderManager() - the createRenderFor method has a RenderManager parameter for you to use.

 

(The render factory methods are called in the constructor for Minecraft's RenderManager, so it's null at the time you call it.)

Ah, I see, I switched it to the render manager parameter and now it seems to generate the entity in the world without crashing, thanks for the help!

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.