1

Rendering Entity causes Crash?

SirBlobman's Avatar SirBlobman10/23/15 7:52 pm
1 emeralds 1.4k 7
10/31/2015 6:42 pm
SirBlobman's Avatar SirBlobman
I am trying to register a BlueSlime, and it worked fine before, but now it crashes with a Sky Blue screen.
Forge Version: 11.14.3.1518 (1.8)
Java Version: JDK 8u60
I am in a Dev environment and using Eclipse
If you solve this problem for me, you are awesome
Crash Report
---- Minecraft Crash Report ----
// Oh - I know what I did wrong!

Time: 10/23/15 7:25 PM
Description: Unexpected error

java.lang.NullPointerException: Unexpected error
at net.minecraft.crash.CrashReportCategory.firstTwoElementsOfStackTraceMatch(Unknown Source)
at net.minecraft.crash.CrashReport.makeCategoryDepth(Unknown Source)
at net.minecraft.crash.CrashReport.makeCategory(Unknown Source)
at net.minecraft.client.renderer.entity.RenderManager.doRenderEntity(Unknown Source)
at net.minecraft.client.renderer.entity.RenderManager.renderEntityStatic(Unknown Source)
at net.minecraft.client.renderer.entity.RenderManager.renderEntitySimple(Unknown Source)
at net.minecraft.client.renderer.RenderGlobal.renderEntities(Unknown Source)
at net.minecraft.client.renderer.EntityRenderer.renderWorldPass(Unknown Source)
at net.minecraft.client.renderer.EntityRenderer.renderWorld(Unknown Source)
at net.minecraft.client.renderer.EntityRenderer.updateCameraAndRender(Unknown Source)
at net.minecraft.client.Minecraft.runGameLoop(Unknown Source)
at net.minecraft.client.Minecraft.run(Unknown Source)
at net.minecraft.client.main.Main.main(Unknown Source)
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(Unknown Source)
at GradleStart.main(Unknown Source)


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

-- Head --
Stacktrace:
at net.minecraft.crash.CrashReportCategory.firstTwoElementsOfStackTraceMatch(Unknown Source)
at net.minecraft.crash.CrashReport.makeCategoryDepth(Unknown Source)
at net.minecraft.crash.CrashReport.makeCategory(Unknown Source)
at net.minecraft.client.renderer.entity.RenderManager.doRenderEntity(Unknown Source)
at net.minecraft.client.renderer.entity.RenderManager.renderEntityStatic(Unknown Source)
at net.minecraft.client.renderer.entity.RenderManager.renderEntitySimple(Unknown Source)
at net.minecraft.client.renderer.RenderGlobal.renderEntities(Unknown Source)
at net.minecraft.client.renderer.EntityRenderer.renderWorldPass(Unknown Source)
at net.minecraft.client.renderer.EntityRenderer.renderWorld(Unknown Source)

-- Affected level --
Details:
Level name: MpServer
All players: 1 total; [EntityPlayerSP['Player305'/2, l='MpServer', x=1265.55, y=5.37, z=-1237.35]]
Chunk stats: MultiplayerChunkCache: 81, 81
Level seed: 0
Level generator: ID 01 - flat, ver 0. Features enabled: false
Level generator options:
Level spawn location: 1272.00,4.00,-1232.00 - World: (1272,4,-1232), Chunk: (at 8,0,0 in 79,-77; contains blocks 1264,0,-1232 to 1279,255,-1217), Region: (2,-3; contains chunks 64,-96 to 95,-65, blocks 1024,0,-1536 to 1535,255,-1025)
Level time: 1043796 game time, 6000 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: 3 total; [BlueSlime['§1§lBlue§f Slime'/0, l='MpServer', x=1262.00, y=4.00, z=-1243.69], EntityItem['item.item.blue_slimeball'/1, l='MpServer', x=1265.06, y=4.00, z=-1236.66], EntityPlayerSP['Player305'/2, l='MpServer', x=1265.55, y=5.37, z=-1237.35]]
Retry entities: 0 total; []
Server brand: fml,forge
Server type: Integrated singleplayer server
Stacktrace:
at net.minecraft.client.multiplayer.WorldClient.addWorldInfoToCrashReport(Unknown Source)
at net.minecraft.client.Minecraft.addGraphicsAndWorldToCrashReport(Unknown Source)
at net.minecraft.client.Minecraft.run(Unknown Source)
at net.minecraft.client.main.Main.main(Unknown Source)
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(Unknown Source)
at GradleStart.main(Unknown Source)

-- System Details --
Details:
Minecraft Version: 1.8
Operating System: Windows 10 (amd64) version 10.0
Java Version: 1.8.0_65, Oracle Corporation
Java VM Version: Java HotSpot(TM) 64-Bit Server VM (mixed mode), Oracle Corporation
Memory: 798729664 bytes (761 MB) / 1056309248 bytes (1007 MB) up to 1056309248 bytes (1007 MB)
JVM Flags: 3 total; -Xincgc -Xmx1024M -Xms1024M
IntCache: cache: 0, tcache: 0, allocated: 0, tallocated: 0
FML: MCP v9.10 FML v8.0.99.99 Minecraft Forge 11.14.3.1518 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.05} [Minecraft Coder Pack] (minecraft.jar)
UCHIJAAAA FML{8.0.99.99} [Forge Mod Loader] (forgeSrc-1.8-11.14.3.1518.jar)
UCHIJAAAA Forge{11.14.3.1518} [Minecraft Forge] (forgeSrc-1.8-11.14.3.1518.jar)
UCHIJAAAA RandomItems{0.0.6} [SirBlobman's Random Stuff] (bin)
Loaded coremods (and transformers):
GL info: ' Vendor: 'ATI Technologies Inc.' Version: '4.5.13399 Compatibility Profile Context 15.201.1151.0' Renderer: 'AMD Radeon R5 200 Series'
Launched Version: 1.8
LWJGL: 2.9.1
OpenGL: AMD Radeon R5 200 Series GL version 4.5.13399 Compatibility Profile Context 15.201.1151.0, ATI Technologies Inc.
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)

ModelBlueSlime.java

package com.SirBlobman.RandomItems.client.render.entities;

import net.minecraft.client.model.ModelBase;
import net.minecraft.client.model.ModelRenderer;
import net.minecraft.entity.Entity;
import net.minecraftforge.fml.relauncher.Side;
import net.minecraftforge.fml.relauncher.SideOnly;

@SideOnly(Side.CLIENT)
public class ModelBlueSlime extends ModelBase
{
/** The slime's bodies, both the inside box and the outside box */
ModelRenderer slimeBodies;
/** The slime's right eye */
ModelRenderer slimeRightEye;
/** The slime's left eye */
ModelRenderer slimeLeftEye;
/** The slime's mouth */
ModelRenderer slimeMouth;

public ModelBlueSlime(int modelBlueSlime)
{
this.slimeBodies = new ModelRenderer(this, 0, modelBlueSlime);
this.slimeBodies.addBox(-4.0F, 16.0F, -4.0F, 8, 8, 8);

if (modelBlueSlime > 0)
{
this.slimeBodies = new ModelRenderer(this, 0, modelBlueSlime);
this.slimeBodies.addBox(-3.0F, 17.0F, -3.0F, 6, 6, 6);
this.slimeRightEye = new ModelRenderer(this, 32, 0);
this.slimeRightEye.addBox(-3.25F, 18.0F, -3.5F, 2, 2, 2);
this.slimeLeftEye = new ModelRenderer(this, 32, 4);
this.slimeLeftEye.addBox(1.25F, 18.0F, -3.5F, 2, 2, 2);
this.slimeMouth = new ModelRenderer(this, 32, 8);
this.slimeMouth.addBox(0.0F, 21.0F, -3.5F, 1, 1, 1);
}
}

/**
* Sets the models various rotation angles then renders the model.
*/
public void render(Entity p_78088_1_, float p_78088_2_, float p_78088_3_, float p_78088_4_, float p_78088_5_, float p_78088_6_, float p_78088_7_)
{
this.setRotationAngles(p_78088_2_, p_78088_3_, p_78088_4_, p_78088_5_, p_78088_6_, p_78088_7_, p_78088_1_);
this.slimeBodies.render(p_78088_7_);

if (this.slimeRightEye != null)
{
this.slimeRightEye.render(p_78088_7_);
this.slimeLeftEye.render(p_78088_7_);
this.slimeMouth.render(p_78088_7_);
}
}
}

RenderBlueSlime.java

package com.SirBlobman.RandomItems.client.render.entities;

import org.lwjgl.opengl.GL11;

import com.SirBlobman.RandomItems.entities.BlueSlime;

import net.minecraft.client.Minecraft;
import net.minecraft.client.model.ModelBase;
import net.minecraft.client.model.ModelSlime;
import net.minecraft.client.renderer.GlStateManager;
import net.minecraft.client.renderer.entity.RenderLiving;
import net.minecraft.client.renderer.entity.RenderManager;
import net.minecraft.client.renderer.entity.layers.LayerSlimeGel;
import net.minecraft.entity.Entity;
import net.minecraft.entity.EntityLiving;
import net.minecraft.entity.EntityLivingBase;
import net.minecraft.entity.monster.EntitySlime;
import net.minecraft.util.ResourceLocation;
import net.minecraftforge.fml.relauncher.Side;
import net.minecraftforge.fml.relauncher.SideOnly;

@SideOnly(Side.CLIENT)
public class RenderBlueSlime extends RenderLiving
{
private static final ResourceLocation slimeTextures = new ResourceLocation("textures/entity/slime/slime.png");

public RenderBlueSlime(RenderManager p_i46141_1_, ModelBase p_i46141_2_, float p_i46141_3_)
{
super(p_i46141_1_, p_i46141_2_, p_i46141_3_);
this.addLayer(new LayerBlueSlimeGel(this));
}

public void doRender(EntitySlime p_177124_1_, double p_177124_2_, double p_177124_4_, double p_177124_6_, float p_177124_8_, float p_177124_9_)
{
this.shadowSize = 0.25F * (float)p_177124_1_.getSlimeSize();
super.doRender((EntityLiving)p_177124_1_, p_177124_2_, p_177124_4_, p_177124_6_, p_177124_8_, p_177124_9_);
}

/**
* Allows the render to do any OpenGL state modifications necessary before the model is rendered. Args:
* entityLiving, partialTickTime
*/
protected void preRenderCallback(EntitySlime p_77041_1_, float p_77041_2_)
{
float f1 = (float)p_77041_1_.getSlimeSize();
float f2 = (p_77041_1_.prevSquishFactor + (p_77041_1_.squishFactor - p_77041_1_.prevSquishFactor) * p_77041_2_) / (f1 * 0.5F + 1.0F);
float f3 = 1.0F / (f2 + 1.0F);
GlStateManager.scale(f3 * f1, 1.0F / f3 * f1, f3 * f1);
}

/**
* Returns the location of an entity's texture. Doesn't seem to be called unless you call Render.bindEntityTexture.
*/
protected ResourceLocation getEntityTexture(EntitySlime entity)
{
return slimeTextures;
}

/**
* Actually renders the given argument. This is a synthetic bridge method, always casting down its argument and then
* handing it off to a worker function which does the actual work. In all probabilty, the class Render is generic
* (Render<T extends Entity>) and this method has signature public void func_76986_a(T entity, double d, double d1,
* double d2, float f, float f1). But JAD is pre 1.5 so doe
*/
public void doRender(EntityLiving entity, double x, double y, double z, float p_76986_8_, float partialTicks)
{
this.doRender((EntitySlime)entity, x, y, z, p_76986_8_, partialTicks);
}

/**
* Allows the render to do any OpenGL state modifications necessary before the model is rendered. Args:
* entityLiving, partialTickTime
*/
protected void preRenderCallback(EntityLivingBase p_77041_1_, float p_77041_2_)
{
this.preRenderCallback((EntitySlime)p_77041_1_, p_77041_2_);
}

/**
* Actually renders the given argument. This is a synthetic bridge method, always casting down its argument and then
* handing it off to a worker function which does the actual work. In all probabilty, the class Render is generic
* (Render<T extends Entity>) and this method has signature public void func_76986_a(T entity, double d, double d1,
* double d2, float f, float f1). But JAD is pre 1.5 so doe
*/
public void doRender(EntityLivingBase entity, double x, double y, double z, float p_76986_8_, float partialTicks)
{
this.doRender((EntitySlime)entity, x, y, z, p_76986_8_, partialTicks);
}

/**
* Returns the location of an entity's texture. Doesn't seem to be called unless you call Render.bindEntityTexture.
*/
protected ResourceLocation getEntityTexture(Entity entity)
{
return this.getEntityTexture((EntitySlime)entity);
}

/**
* Actually renders the given argument. This is a synthetic bridge method, always casting down its argument and then
* handing it off to a worker function which does the actual work. In all probabilty, the class Render is generic
* (Render<T extends Entity>) and this method has signature public void func_76986_a(T entity, double d, double d1,
* double d2, float f, float f1). But JAD is pre 1.5 so doe
*/
public void doRender(Entity entity, double x, double y, double z, float p_76986_8_, float partialTicks)
{
this.doRender((EntitySlime)entity, x, y, z, p_76986_8_, partialTicks);
}
}

EntityRenderRegister.java

package com.SirBlobman.RandomItems.client.render.entities;

import com.SirBlobman.RandomItems.entities.BlueSlime;
import com.SirBlobman.RandomItems.entities.ModEntities;

import net.minecraft.client.Minecraft;
import net.minecraft.client.model.ModelSlime;
import net.minecraft.client.renderer.entity.Render;
import net.minecraftforge.fml.client.registry.RenderingRegistry;

public final class EntityRenderRegister
{
private static final Render RenderBlueSlime = null;

public static void registerEntityRenderer()
{
float shadowSize = 0.5F;
RenderingRegistry.registerEntityRenderingHandler(BlueSlime.class, new RenderBlueSlime(Minecraft.getMinecraft().getRenderManager(), null, shadowSize));
}
}
Posted by SirBlobman's Avatar
SirBlobman
Level 23 : Expert Modder
8

Create an account or sign in to comment.

7

1
10/31/2015 6:42 pm
Level 23 : Expert Modder
SirBlobman
SirBlobman's Avatar
Still, Nobody knows.
At least someone should try!!!!
1
10/28/2015 6:33 pm
Level 40 : Master Warrior
Stack Man
Stack Man's Avatar
It seems to be a problem with your .fml client. You need the mod to be Cut B compliant.
1
10/28/2015 6:43 pm
Level 23 : Expert Modder
SirBlobman
SirBlobman's Avatar
How would I do that?
1
10/28/2015 9:47 pm
Level 40 : Master Warrior
Stack Man
Stack Man's Avatar
Wait this is java, Cut B compliancy is C++; ignore what I said.
1
10/29/2015 2:59 pm
Level 23 : Expert Modder
SirBlobman
SirBlobman's Avatar
lol.

Anyone else have any idea whats going on?
1
10/28/2015 5:57 pm
Level 23 : Expert Modder
SirBlobman
SirBlobman's Avatar
Really? 73 views and no one knows?
1
10/26/2015 4:21 pm
Level 23 : Expert Modder
SirBlobman
SirBlobman's Avatar
Bump! I need help so I can release this mod
Planet Minecraft

Website

© 2010 - 2024
www.planetminecraft.com

Welcome