Posted March 23, 20178 yr Hey, i created a mob model in techne and later put it into mccreator so i wouldnt have to code everything by hand (since i am making around 20 mobs for a modpack) first 2 were fine but the third first didnt work at all but when i later manually fixed the code by comparing it to working mobs tutorials ect. it worked! well, kind off... it now doenst crash straight away but it crashen when trying to render the model... idk how to fix this, help would be appriciated. mob+model: package mod.mcreator; import net.minecraftforge.fml.relauncher.SideOnly; import net.minecraftforge.fml.relauncher.Side; import net.minecraftforge.fml.common.registry.EntityRegistry; import net.minecraftforge.fml.common.event.FMLServerStartingEvent; import net.minecraftforge.fml.common.event.FMLPreInitializationEvent; import net.minecraftforge.fml.common.event.FMLInitializationEvent; import net.minecraftforge.fml.client.registry.RenderingRegistry; import net.minecraft.world.biome.Biome; import net.minecraft.world.World; import net.minecraft.util.math.MathHelper; import net.minecraft.util.ResourceLocation; import net.minecraft.util.EnumHand; import net.minecraft.util.DamageSource; import net.minecraft.item.ItemStack; import net.minecraft.item.Item; import net.minecraft.init.Items; import net.minecraft.entity.player.EntityPlayerMP; import net.minecraft.entity.player.EntityPlayer; import net.minecraft.entity.monster.EntityMob; import net.minecraft.entity.effect.EntityLightningBolt; import net.minecraft.entity.ai.EntityAIWander; import net.minecraft.entity.ai.EntityAISwimming; import net.minecraft.entity.ai.EntityAINearestAttackableTarget; import net.minecraft.entity.ai.EntityAILookIdle; import net.minecraft.entity.ai.EntityAIHurtByTarget; import net.minecraft.entity.ai.EntityAIAttackMelee; import net.minecraft.entity.SharedMonsterAttributes; import net.minecraft.entity.EnumCreatureType; import net.minecraft.entity.Entity; import net.minecraft.client.renderer.entity.RenderLiving; import net.minecraft.client.model.ModelRenderer; import net.minecraft.client.model.ModelBase; import net.minecraft.client.Minecraft; import java.util.Random; import java.util.Iterator; import java.util.ArrayList; @SuppressWarnings("unchecked") public class mcreator_anatomy { public int mobid = 0; public static Object instance; public void load(FMLInitializationEvent event) { } public void generateNether(World world, Random random, int chunkX, int chunkZ) { } public void generateSurface(World world, Random random, int chunkX, int chunkZ) { } public int addFuel(ItemStack fuel) { return 0; } @SideOnly(Side.CLIENT) public void registerRenderers() { RenderLiving customRender = new RenderLiving(Minecraft.getMinecraft().getRenderManager(), new mcreator_anatomy.ModelNew(), 0) { protected ResourceLocation getEntityTexture(Entity par1Entity) { return new ResourceLocation("anatomy.png"); } }; RenderingRegistry.registerEntityRenderingHandler(mcreator_anatomy.Entityanatomy.class, customRender); } public void serverLoad(FMLServerStartingEvent event) { } public void preInit(FMLPreInitializationEvent event) { int entityID = MathHelper.getRandomUUID().hashCode(); mobid = entityID; EntityRegistry.registerModEntity(new ResourceLocation("testenvironmentmod:anatomy"), mcreator_anatomy.Entityanatomy.class, "anatomy", entityID, instance, 64, 1, true, (255 << 16) + (255 << 8) + 255, (255 << 16) + (255 << 8) + 255); EntityRegistry.addSpawn(mcreator_anatomy.Entityanatomy.class, 12, 3, 15, EnumCreatureType.MONSTER, clean(Biome.REGISTRY)); } public static Biome[] clean(net.minecraft.util.registry.RegistryNamespaced<ResourceLocation, Biome> in) { Iterator<Biome> itr = in.iterator(); ArrayList<Biome> ls = new ArrayList<Biome>(); while (itr.hasNext()) { ls.add(itr.next()); } return ls.toArray(new Biome[ls.size()]); } public static class Entityanatomy extends EntityMob { World world = null; public Entityanatomy(World var1) { super(var1); world = var1; experienceValue = 5; this.isImmuneToFire = false; addRandomArmor(); setNoAI(!true); this.tasks.addTask(0, new EntityAISwimming(this)); this.tasks.addTask(6, new EntityAIWander(this, 1.0D)); this.tasks.addTask(8, new EntityAILookIdle(this)); this.targetTasks.addTask(20, new EntityAINearestAttackableTarget(this, EntityPlayer.class, true)); this.targetTasks.addTask(21, new EntityAIHurtByTarget(this, false)); this.targetTasks.addTask(20, new EntityAINearestAttackableTarget(this, EntityPlayerMP.class, true)); this.targetTasks.addTask(21, new EntityAIHurtByTarget(this, false)); this.tasks.addTask(9, new EntityAIAttackMelee(this, 1.0D, false)); } protected void applyEntityAttributes() { super.applyEntityAttributes(); this.getEntityAttribute(SharedMonsterAttributes.MOVEMENT_SPEED).setBaseValue(0.75D); this.getEntityAttribute(SharedMonsterAttributes.MAX_HEALTH).setBaseValue(10D); if (this.getEntityAttribute(SharedMonsterAttributes.ATTACK_DAMAGE) != null) this.getEntityAttribute(SharedMonsterAttributes.ATTACK_DAMAGE).setBaseValue(2D); } protected void addRandomArmor() { } @Override protected Item getDropItem() { return new ItemStack(Items.ROTTEN_FLESH).getItem(); } @Override protected net.minecraft.util.SoundEvent getAmbientSound() { return (net.minecraft.util.SoundEvent) net.minecraft.util.SoundEvent.REGISTRY.getObject(new ResourceLocation("entity.zombie.ambient")); } @Override protected net.minecraft.util.SoundEvent getHurtSound() { return (net.minecraft.util.SoundEvent) net.minecraft.util.SoundEvent.REGISTRY.getObject(new ResourceLocation("entity.zombie.hurt")); } @Override protected net.minecraft.util.SoundEvent getDeathSound() { return (net.minecraft.util.SoundEvent) net.minecraft.util.SoundEvent.REGISTRY.getObject(new ResourceLocation("entity.zombie.death")); } @Override public void onStruckByLightning(EntityLightningBolt entityLightningBolt) { super.onStruckByLightning(entityLightningBolt); int i = (int) this.posX; int j = (int) this.posY; int k = (int) this.posZ; Entity entity = this; } @Override public void fall(float l, float d) { super.fall(l, d); int i = (int) this.posX; int j = (int) this.posY; int k = (int) this.posZ; super.fall(l, d); Entity entity = this; } @Override public void onDeath(DamageSource source) { super.onDeath(source); int i = (int) this.posX; int j = (int) this.posY; int k = (int) this.posZ; Entity entity = this; } @Override public boolean processInteract(EntityPlayer entity, EnumHand hand) { super.processInteract(entity, hand); int i = (int) this.posX; int j = (int) this.posY; int k = (int) this.posZ; return true; } @Override protected float getSoundVolume() { return 1.0F; } } // Date: 23-3-2017 14:40:30 // Template version 1.1 // Java generated by Techne // Keep in mind that you still need to fill in some blanks // - ZeuX public static class ModelNew extends ModelBase { // fields ModelRenderer Shape1; ModelRenderer Shape12; ModelRenderer Shape2; ModelRenderer Shape10; ModelRenderer Shape3; ModelRenderer Shape14; ModelRenderer Shape4; ModelRenderer Shape19; ModelRenderer Shape6; ModelRenderer rightarm; ModelRenderer Shape5; ModelRenderer leftarm; ModelRenderer Shape8; ModelRenderer rightleg; ModelRenderer Shape7; ModelRenderer leftleg; ModelRenderer Shape9; ModelRenderer Shape29; ModelRenderer Shape27; ModelRenderer Shape28; ModelRenderer Shape25; ModelRenderer Shape24; ModelRenderer Shape23; ModelRenderer Shape26; ModelRenderer Shape11; ModelRenderer Shape21; ModelRenderer Shape13; ModelRenderer Shape20; ModelRenderer Shape18; ModelRenderer Shape22; ModelRenderer Shape15; ModelRenderer Shape17; ModelRenderer Shape16; public ModelNew() { textureWidth = 64; textureHeight = 32; Shape1 = new ModelRenderer(this, 0, 12); Shape1.addBox(0F, 0F, 0F, 8, 2, 4); Shape1.setRotationPoint(-4F, 11F, -2F); Shape1.setTextureSize(64, 32); Shape1.mirror = true; setRotation(Shape1, 0F, 0F, 0F); Shape12 = new ModelRenderer(this, 42, 22); Shape12.addBox(0F, 0F, 0F, 2, 1, 1); Shape12.setRotationPoint(-1F, 8F, -0.5F); Shape12.setTextureSize(64, 32); Shape12.mirror = true; setRotation(Shape12, 0F, 0F, 0F); Shape2 = new ModelRenderer(this, 14, 6); Shape2.addBox(0F, 0F, 0F, 5, 1, 4); Shape2.setRotationPoint(-4F, 10F, -2F); Shape2.setTextureSize(64, 32); Shape2.mirror = true; setRotation(Shape2, 0F, 0F, 0F); Shape10 = new ModelRenderer(this, 30, 0); Shape10.addBox(0F, 0F, 0F, 1, 1, 4); Shape10.setRotationPoint(-4F, 7F, -2F); Shape10.setTextureSize(64, 32); Shape10.mirror = true; setRotation(Shape10, 0F, 0F, 0F); Shape3 = new ModelRenderer(this, 16, 0); Shape3.addBox(0F, 0F, 0F, 3, 1, 4); Shape3.setRotationPoint(-4F, 9F, -2F); Shape3.setTextureSize(64, 32); Shape3.mirror = true; setRotation(Shape3, 0F, 0F, 0F); Shape14 = new ModelRenderer(this, 42, 26); Shape14.addBox(0F, 0F, 0F, 2, 1, 1); Shape14.setRotationPoint(-1F, 4F, -0.5F); Shape14.setTextureSize(64, 32); Shape14.mirror = true; setRotation(Shape14, 0F, 0F, 0F); Shape4 = new ModelRenderer(this, 16, 17); Shape4.addBox(0F, 0F, 0F, 2, 1, 4); Shape4.setRotationPoint(-4F, 8F, -2F); Shape4.setTextureSize(64, 32); Shape4.mirror = true; setRotation(Shape4, 0F, 0F, 0F); Shape19 = new ModelRenderer(this, 60, 4); Shape19.addBox(0F, 0F, 0F, 1, 1, 1); Shape19.setRotationPoint(6F, 5F, 0F); Shape19.setTextureSize(64, 32); Shape19.mirror = true; setRotation(Shape19, 0F, 0F, 0F); Shape6 = new ModelRenderer(this, 16, 21); Shape6.addBox(0F, 0F, 0F, 6, 1, 4); Shape6.setRotationPoint(-4F, 2F, -2F); Shape6.setTextureSize(64, 32); Shape6.mirror = true; setRotation(Shape6, 0F, 0F, 0F); rightarm = new ModelRenderer(this, 48, 17); rightarm.addBox(-3F, -2F, -2F, 4, 11, 4); rightarm.setRotationPoint(-5F, 2F, 0F); rightarm.setTextureSize(64, 32); rightarm.mirror = true; setRotation(rightarm, 0F, 0F, 0F); Shape5 = new ModelRenderer(this, 16, 26); Shape5.addBox(0F, 0F, 0F, 8, 2, 4); Shape5.setRotationPoint(-4F, 0F, -2F); Shape5.setTextureSize(64, 32); Shape5.mirror = true; setRotation(Shape5, 0F, 0F, 0F); leftarm = new ModelRenderer(this, 48, 17); leftarm.addBox(-1F, -2F, -2F, 4, 3, 4); leftarm.setRotationPoint(5F, 2F, 0F); leftarm.setTextureSize(64, 32); leftarm.mirror = true; setRotation(leftarm, 0F, 0F, 0F); Shape8 = new ModelRenderer(this, 0, 6); Shape8.addBox(0F, 0F, 0F, 3, 1, 4); Shape8.setRotationPoint(-4F, 4F, -2F); Shape8.setTextureSize(64, 32); Shape8.mirror = true; setRotation(Shape8, 0F, 0F, 0F); rightleg = new ModelRenderer(this, 0, 17); rightleg.addBox(-2F, 0F, -2F, 4, 11, 4); rightleg.setRotationPoint(-2F, 13F, 0F); rightleg.setTextureSize(64, 32); rightleg.mirror = true; setRotation(rightleg, 0F, 0F, 0F); Shape7 = new ModelRenderer(this, 28, 16); Shape7.addBox(0F, 0F, 0F, 4, 1, 4); Shape7.setRotationPoint(-4F, 3F, -2F); Shape7.setTextureSize(64, 32); Shape7.mirror = true; setRotation(Shape7, 0F, 0F, 0F); leftleg.mirror = true; leftleg = new ModelRenderer(this, 0, 17); leftleg.addBox(-2F, 0F, -2F, 4, 11, 4); leftleg.setRotationPoint(2F, 13F, 0F); leftleg.setTextureSize(64, 32); leftleg.mirror = true; setRotation(leftleg, 0F, 0F, 0F); leftleg.mirror = false; Shape9 = new ModelRenderer(this, 4, 0); Shape9.addBox(0F, 0F, 0F, 2, 2, 4); Shape9.setRotationPoint(-4F, 5F, -2F); Shape9.setTextureSize(64, 32); Shape9.mirror = true; setRotation(Shape9, 0F, 0F, 0F); Shape29 = new ModelRenderer(this, 0, 0); Shape29.addBox(0F, -1F, -2F, 1, 1, 1); Shape29.setRotationPoint(0F, 0F, 0F); Shape29.setTextureSize(64, 32); Shape29.mirror = true; setRotation(Shape29, 0F, 0F, 0F); Shape27 = new ModelRenderer(this, 0, 0); Shape27.addBox(0F, 0F, 0F, 1, 1, 1); Shape27.setRotationPoint(-2F, -1F, -1F); Shape27.setTextureSize(64, 32); Shape27.mirror = true; setRotation(Shape27, 0F, 0F, 0F); Shape28 = new ModelRenderer(this, 0, 14); Shape28.addBox(0F, 0F, 0F, 4, 1, 1); Shape28.setRotationPoint(-2F, -1F, 1F); Shape28.setTextureSize(64, 32); Shape28.mirror = true; setRotation(Shape28, 0F, 0F, 0F); Shape25 = new ModelRenderer(this, 0, 0); Shape25.addBox(0F, 0F, 0F, 1, 3, 1); Shape25.setRotationPoint(-2F, -3F, 0F); Shape25.setTextureSize(64, 32); Shape25.mirror = true; setRotation(Shape25, 0F, 0F, 0F); Shape24 = new ModelRenderer(this, 0, 0); Shape24.addBox(0F, 0F, 0F, 1, 2, 1); Shape24.setRotationPoint(1F, -2F, 0F); Shape24.setTextureSize(64, 32); Shape24.mirror = true; setRotation(Shape24, 0F, 0F, 0F); Shape23 = new ModelRenderer(this, 0, 0); Shape23.addBox(0F, 0F, 0F, 1, 1, 1); Shape23.setRotationPoint(1F, -1F, -1F); Shape23.setTextureSize(64, 32); Shape23.mirror = true; setRotation(Shape23, 0F, 0F, 0F); Shape26 = new ModelRenderer(this, 0, 0); Shape26.addBox(0F, 0F, 0F, 1, 1, 1); Shape26.setRotationPoint(0F, 0F, 0F); Shape26.setTextureSize(64, 32); Shape26.mirror = true; setRotation(Shape26, 0F, 0F, 0F); Shape11 = new ModelRenderer(this, 56, 0); Shape11.addBox(0F, 0F, 0F, 1, 7, 1); Shape11.setRotationPoint(-0.5F, 3F, -0.5F); Shape11.setTextureSize(64, 32); Shape11.mirror = true; setRotation(Shape11, 0F, 0F, 0F); Shape21 = new ModelRenderer(this, 0, 0); Shape21.addBox(0F, 0F, 0F, 1, 2, 1); Shape21.setRotationPoint(7F, 3F, 1F); Shape21.setTextureSize(64, 32); Shape21.mirror = true; setRotation(Shape21, 0F, 0F, 0F); Shape13 = new ModelRenderer(this, 42, 24); Shape13.addBox(0F, 0F, 0F, 2, 1, 1); Shape13.setRotationPoint(-1F, 6F, -0.5F); Shape13.setTextureSize(64, 32); Shape13.mirror = true; setRotation(Shape13, 0F, 0F, 0F); Shape20 = new ModelRenderer(this, 0, 4); Shape20.addBox(0F, 0F, 0F, 1, 1, 1); Shape20.setRotationPoint(5F, 3F, 1F); Shape20.setTextureSize(64, 32); Shape20.mirror = true; setRotation(Shape20, 0F, 0F, 0F); Shape18 = new ModelRenderer(this, 36, 22); Shape18.addBox(0F, 0F, 0F, 1, 2, 2); Shape18.setRotationPoint(6F, 3F, -1F); Shape18.setTextureSize(64, 32); Shape18.mirror = true; setRotation(Shape18, 0F, 0F, 0F); Shape22 = new ModelRenderer(this, 0, 0); Shape22.addBox(0F, 0F, 0F, 1, 1, 1); Shape22.setRotationPoint(0F, -1F, 0F); Shape22.setTextureSize(64, 32); Shape22.mirror = true; setRotation(Shape22, 0F, 0F, 0F); Shape15 = new ModelRenderer(this, 40, 29); Shape15.addBox(0F, 0F, 0F, 2, 1, 2); Shape15.setRotationPoint(4F, 3F, -2F); Shape15.setTextureSize(64, 32); Shape15.mirror = true; setRotation(Shape15, 0F, 0F, 0F); Shape17 = new ModelRenderer(this, 60, 2); Shape17.addBox(0F, 0F, 0F, 1, 1, 1); Shape17.setRotationPoint(7F, 3F, -2F); Shape17.setTextureSize(64, 32); Shape17.mirror = true; setRotation(Shape17, 0F, 0F, 0F); Shape16 = new ModelRenderer(this, 60, 0); Shape16.addBox(0F, 0F, 0F, 1, 1, 1); Shape16.setRotationPoint(5F, 4F, -2F); Shape16.setTextureSize(64, 32); Shape16.mirror = true; setRotation(Shape16, 0F, 0F, 0F); } public void render(Entity entity, float f, float f1, float f2, float f3, float f4, float f5) { super.render(entity, f, f1, f2, f3, f4, f5); setRotationAngles(f, f1, f2, f3, f4, f5, entity); Shape1.render(f5); Shape12.render(f5); Shape2.render(f5); Shape10.render(f5); Shape3.render(f5); Shape14.render(f5); Shape4.render(f5); Shape19.render(f5); Shape6.render(f5); rightarm.render(f5); Shape5.render(f5); leftarm.render(f5); Shape8.render(f5); rightleg.render(f5); Shape7.render(f5); leftleg.render(f5); Shape9.render(f5); Shape29.render(f5); Shape27.render(f5); Shape28.render(f5); Shape25.render(f5); Shape24.render(f5); Shape23.render(f5); Shape26.render(f5); Shape11.render(f5); Shape21.render(f5); Shape13.render(f5); Shape20.render(f5); Shape18.render(f5); Shape22.render(f5); Shape15.render(f5); Shape17.render(f5); Shape16.render(f5); } private void setRotation(ModelRenderer model, float x, float y, float z) { model.rotateAngleX = x; model.rotateAngleY = y; model.rotateAngleZ = z; } public void setRotationAngles(float f, float f1, float f2, float f3, float f4, float f5, Entity e) { super.setRotationAngles(f, f1, f2, f3, f4, f5, e); this.leftleg.rotateAngleX = MathHelper.cos(f * 1.0F) * -1.0F * f1; this.rightleg.rotateAngleX = MathHelper.cos(f * 1.0F) * 1.0F * f1; this.rightarm.rotateAngleX = MathHelper.cos(f * 0.6662F + (float) Math.PI) * 2.0F * f1 * 0.5F; } } } error: Spoiler [14:53:32] [Client thread/ERROR] [FML]: Caught exception from testenvironmentmod (testenvironmentmod) java.lang.NullPointerException at mod.mcreator.mcreator_anatomy$ModelNew.(mcreator_anatomy.java:330) ~[modid-1.0.jar:?] at mod.mcreator.mcreator_anatomy.registerRenderers(mcreator_anatomy.java:63) ~[modid-1.0.jar:?] at mod.mcreator.ClientProxyTestEnvironmentMod.registerRenderers(ClientProxyTestEnvironmentMod.java:10) ~[modid-1.0.jar:?] at mod.mcreator.TestEnvironmentMod.load(TestEnvironmentMod.java:95) ~[modid-1.0.jar:?] at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method) ~[?:1.8.0_101] at sun.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl.java:62) ~[?:1.8.0_101] at sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:43) ~[?:1.8.0_101] at java.lang.reflect.Method.invoke(Method.java:498) ~[?:1.8.0_101] at net.minecraftforge.fml.common.FMLModContainer.handleModStateEvent(FMLModContainer.java:643) ~[forgeSrc-1.11.2-13.20.0.2228.jar:?] at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method) ~[?:1.8.0_101] at sun.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl.java:62) ~[?:1.8.0_101] at sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:43) ~[?:1.8.0_101] at java.lang.reflect.Method.invoke(Method.java:498) ~[?:1.8.0_101] at com.google.common.eventbus.EventSubscriber.handleEvent(EventSubscriber.java:74) ~[guava-17.0.jar:?] at com.google.common.eventbus.SynchronizedEventSubscriber.handleEvent(SynchronizedEventSubscriber.java:47) ~[guava-17.0.jar:?] at com.google.common.eventbus.EventBus.dispatch(EventBus.java:322) ~[guava-17.0.jar:?] at com.google.common.eventbus.EventBus.dispatchQueuedEvents(EventBus.java:304) ~[guava-17.0.jar:?] at com.google.common.eventbus.EventBus.post(EventBus.java:275) ~[guava-17.0.jar:?] at net.minecraftforge.fml.common.LoadController.sendEventToModContainer(LoadController.java:246) ~[forgeSrc-1.11.2-13.20.0.2228.jar:?] at net.minecraftforge.fml.common.LoadController.propogateStateMessage(LoadController.java:224) ~[forgeSrc-1.11.2-13.20.0.2228.jar:?] at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method) ~[?:1.8.0_101] at sun.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl.java:62) ~[?:1.8.0_101] at sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:43) ~[?:1.8.0_101] at java.lang.reflect.Method.invoke(Method.java:498) ~[?:1.8.0_101] at com.google.common.eventbus.EventSubscriber.handleEvent(EventSubscriber.java:74) ~[guava-17.0.jar:?] at com.google.common.eventbus.SynchronizedEventSubscriber.handleEvent(SynchronizedEventSubscriber.java:47) ~[guava-17.0.jar:?] at com.google.common.eventbus.EventBus.dispatch(EventBus.java:322) ~[guava-17.0.jar:?] at com.google.common.eventbus.EventBus.dispatchQueuedEvents(EventBus.java:304) ~[guava-17.0.jar:?] at com.google.common.eventbus.EventBus.post(EventBus.java:275) ~[guava-17.0.jar:?] at net.minecraftforge.fml.common.LoadController.distributeStateMessage(LoadController.java:147) [LoadController.class:?] at net.minecraftforge.fml.common.Loader.initializeMods(Loader.java:809) [Loader.class:?] at net.minecraftforge.fml.client.FMLClientHandler.finishMinecraftLoading(FMLClientHandler.java:343) [FMLClientHandler.class:?] at net.minecraft.client.Minecraft.init(Minecraft.java:562) [Minecraft.class:?] at net.minecraft.client.Minecraft.run(Minecraft.java:387) [Minecraft.class:?] at net.minecraft.client.main.Main.main(Main.java:118) [Main.class:?] at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method) ~[?:1.8.0_101] at sun.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl.java:62) ~[?:1.8.0_101] at sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:43) ~[?:1.8.0_101] at java.lang.reflect.Method.invoke(Method.java:498) ~[?:1.8.0_101] at net.minecraft.launchwrapper.Launch.launch(Launch.java:135) [launchwrapper-1.12.jar:?] at net.minecraft.launchwrapper.Launch.main(Launch.java:28) [launchwrapper-1.12.jar:?] at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method) ~[?:1.8.0_101] at sun.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl.java:62) ~[?:1.8.0_101] at sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:43) ~[?:1.8.0_101] at java.lang.reflect.Method.invoke(Method.java:498) ~[?:1.8.0_101] at net.minecraftforge.gradle.GradleStartCommon.launch(GradleStartCommon.java:97) [start/:?] at GradleStart.main(GradleStart.java:26) [start/:?] [14:53:32] [Client thread/INFO] [STDOUT]: [net.minecraft.init.Bootstrap:printToSYSOUT:600 // Ouch. That hurt :( Time: 3/23/17 2:53 PM Description: There was a severe problem during mod loading that has caused the game to fail net.minecraftforge.fml.common.LoaderExceptionModCrash: Caught exception from testenvironmentmod (testenvironmentmod) Caused by: java.lang.NullPointerException at mod.mcreator.mcreator_anatomy$ModelNew.(mcreator_anatomy.java:330) at mod.mcreator.mcreator_anatomy.registerRenderers(mcreator_anatomy.java:63) at mod.mcreator.ClientProxyTestEnvironmentMod.registerRenderers(ClientProxyTestEnvironmentMod.java:10) at mod.mcreator.TestEnvironmentMod.load(TestEnvironmentMod.java:95) 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:498) at net.minecraftforge.fml.common.FMLModContainer.handleModStateEvent(FMLModContainer.java:643) 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:498) at com.google.common.eventbus.EventSubscriber.handleEvent(EventSubscriber.java:74) at com.google.common.eventbus.SynchronizedEventSubscriber.handleEvent(SynchronizedEventSubscriber.java:47) at com.google.common.eventbus.EventBus.dispatch(EventBus.java:322) at com.google.common.eventbus.EventBus.dispatchQueuedEvents(EventBus.java:304) at com.google.common.eventbus.EventBus.post(EventBus.java:275) at net.minecraftforge.fml.common.LoadController.sendEventToModContainer(LoadController.java:246) at net.minecraftforge.fml.common.LoadController.propogateStateMessage(LoadController.java:224) 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:498) at com.google.common.eventbus.EventSubscriber.handleEvent(EventSubscriber.java:74) at com.google.common.eventbus.SynchronizedEventSubscriber.handleEvent(SynchronizedEventSubscriber.java:47) at com.google.common.eventbus.EventBus.dispatch(EventBus.java:322) at com.google.common.eventbus.EventBus.dispatchQueuedEvents(EventBus.java:304) at com.google.common.eventbus.EventBus.post(EventBus.java:275) at net.minecraftforge.fml.common.LoadController.distributeStateMessage(LoadController.java:147) at net.minecraftforge.fml.common.Loader.initializeMods(Loader.java:809) at net.minecraftforge.fml.client.FMLClientHandler.finishMinecraftLoading(FMLClientHandler.java:343) at net.minecraft.client.Minecraft.init(Minecraft.java:562) at net.minecraft.client.Minecraft.run(Minecraft.java:387) 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:498) 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:498) 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: --------------------------------------------------------------------------------------- main mod class: package mod.mcreator; import net.minecraftforge.fml.relauncher.Side; import net.minecraftforge.fml.common.registry.GameRegistry; import net.minecraftforge.fml.common.network.NetworkRegistry; import net.minecraftforge.fml.common.network.IGuiHandler; import net.minecraftforge.fml.common.event.FMLServerStartingEvent; import net.minecraftforge.fml.common.event.FMLPreInitializationEvent; import net.minecraftforge.fml.common.event.FMLInitializationEvent; import net.minecraftforge.fml.common.SidedProxy; import net.minecraftforge.fml.common.Mod; import net.minecraftforge.fml.common.Mod.Instance; import net.minecraftforge.fml.common.Mod.EventHandler; import net.minecraftforge.fml.common.IWorldGenerator; import net.minecraftforge.fml.common.IFuelHandler; import net.minecraftforge.common.MinecraftForge; import net.minecraftforge.client.model.obj.OBJLoader; import net.minecraft.world.chunk.IChunkProvider; import net.minecraft.world.chunk.IChunkGenerator; import net.minecraft.world.World; import net.minecraft.item.ItemStack; import net.minecraft.entity.player.EntityPlayer; import java.util.Random; @Mod(modid = TestEnvironmentMod.MODID, version = TestEnvironmentMod.VERSION) public class TestEnvironmentMod implements IFuelHandler, IWorldGenerator { public static final String MODID = "testenvironmentmod"; public static final String VERSION = "1.0"; @SidedProxy(clientSide = "mod.mcreator.ClientProxyTestEnvironmentMod", serverSide = "mod.mcreator.CommonProxyTestEnvironmentMod") public static CommonProxyTestEnvironmentMod proxy; @Instance(MODID) public static TestEnvironmentMod instance; mcreator_crawler mcreator_0 = new mcreator_crawler(); mcreator_runner mcreator_1 = new mcreator_runner(); mcreator_lucille mcreator_2 = new mcreator_lucille(); mcreator_anatomy mcreator_3 = new mcreator_anatomy(); @Override public int getBurnTime(ItemStack fuel) { if (mcreator_0.addFuel(fuel) != 0) return mcreator_0.addFuel(fuel); if (mcreator_1.addFuel(fuel) != 0) return mcreator_1.addFuel(fuel); if (mcreator_2.addFuel(fuel) != 0) return mcreator_2.addFuel(fuel); if (mcreator_3.addFuel(fuel) != 0) return mcreator_3.addFuel(fuel); return 0; } @Override public void generate(Random random, int chunkX, int chunkZ, World world, IChunkGenerator chunkGenerator, IChunkProvider chunkProvider) { chunkX = chunkX * 16; chunkZ = chunkZ * 16; if (world.provider.getDimension() == -1) mcreator_0.generateNether(world, random, chunkX, chunkZ); if (world.provider.getDimension() == 0) mcreator_0.generateSurface(world, random, chunkX, chunkZ); if (world.provider.getDimension() == -1) mcreator_1.generateNether(world, random, chunkX, chunkZ); if (world.provider.getDimension() == 0) mcreator_1.generateSurface(world, random, chunkX, chunkZ); if (world.provider.getDimension() == -1) mcreator_2.generateNether(world, random, chunkX, chunkZ); if (world.provider.getDimension() == 0) mcreator_2.generateSurface(world, random, chunkX, chunkZ); if (world.provider.getDimension() == -1) mcreator_3.generateNether(world, random, chunkX, chunkZ); if (world.provider.getDimension() == 0) mcreator_3.generateSurface(world, random, chunkX, chunkZ); } @EventHandler public void load(FMLInitializationEvent event) { GameRegistry.registerFuelHandler(this); GameRegistry.registerWorldGenerator(this, 1); if (event.getSide() == Side.CLIENT) { OBJLoader.INSTANCE.addDomain("testenvironmentmod"); } MinecraftForge.EVENT_BUS.register(new mcreator_GlobalEventsTestEnvironmentMod()); NetworkRegistry.INSTANCE.registerGuiHandler(this, new GuiHandler()); mcreator_0.load(event); mcreator_1.load(event); mcreator_2.load(event); mcreator_3.load(event); proxy.registerRenderers(this); } @EventHandler public void serverLoad(FMLServerStartingEvent event) { mcreator_0.serverLoad(event); mcreator_1.serverLoad(event); mcreator_2.serverLoad(event); mcreator_3.serverLoad(event); } @EventHandler public void preInit(FMLPreInitializationEvent event) { mcreator_0.instance = this.instance; mcreator_1.instance = this.instance; mcreator_2.instance = this.instance; mcreator_3.instance = this.instance; mcreator_0.preInit(event); mcreator_1.preInit(event); mcreator_2.preInit(event); mcreator_3.preInit(event); } public static class GuiHandler implements IGuiHandler { @Override public Object getServerGuiElement(int id, EntityPlayer player, World world, int x, int y, int z) { return null; } @Override public Object getClientGuiElement(int id, EntityPlayer player, World world, int x, int y, int z) { return null; } } } Çlient proxy: package mod.mcreator; public class ClientProxyTestEnvironmentMod extends CommonProxyTestEnvironmentMod { @Override public void registerRenderers(TestEnvironmentMod ins) { ins.mcreator_0.registerRenderers(); ins.mcreator_1.registerRenderers(); ins.mcreator_2.registerRenderers(); ins.mcreator_3.registerRenderers(); } } Edited March 23, 20178 yr by alexschopbarteld
March 23, 20178 yr 7 minutes ago, alexschopbarteld said: java.lang.NullPointerException at mod.mcreator.mcreator_anatomy$ModelNew.(mcreator_anatomy.java:330) What is at line 330 of the mcreator_anatomy class?
March 23, 20178 yr Author Wait, i think i know what happened, leftleg.mirror=true; then leftleg.mirror=false; then Leftleg.mirror=true; caused the render to freak out... works fine when i deleted 2 Thanks!
March 23, 20178 yr 15 minutes ago, alexschopbarteld said: Wait, i think i know what happened, leftleg.mirror=true; then leftleg.mirror=false; then Leftleg.mirror=true; caused the render to freak out... works fine when i deleted 2 Thanks! That wasn't the problem at all. The problem is this: leftleg.mirror = true; leftleg = new ModelRenderer(this, 0, 17); Notice how it sets the property on the variable before the variable has been defined and given a value. 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.
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.