For some reason all of a sudden my mod doesn't work anymore, I didn't change the code but when I start it gives me this crash error report.
27 achievements
182 recipes
LWJGL Version: 2.4.2
ModLoader 1.2.5 Initializing...
Exception in thread "Minecraft main thread" java.lang.ExceptionInInitializerError
at net.minecraft.client.Minecraft.startGame(Minecraft.java:424)
at net.minecraft.client.Minecraft.run(Minecraft.java:786)
at java.lang.Thread.run(Unknown Source)
Caused by: java.lang.RuntimeException: java.lang.IllegalArgumentException: URI has an authority component
at net.minecraft.src.ModLoader.init(ModLoader.java:891)
at net.minecraft.src.ModLoader.addAllRenderers(ModLoader.java:157)
at net.minecraft.src.RenderManager.<init>(RenderManager.java:85)
at net.minecraft.src.RenderManager.<clinit>(RenderManager.java:12)
... 3 more
Caused by: java.lang.IllegalArgumentException: URI has an authority component
at java.io.File.<init>(Unknown Source)
at net.minecraft.src.ModLoader.init(ModLoader.java:847)
... 6 more
Im trying to make an item that when used in a crafting recipe is not used up but is just damaged, Is this possible and if so please could you help me.
The item is a grinder to make coal into coal powder
I'm sorry, but I don't think that there is a way to do this. (At least not an easy way.) My advice would be to make a custom crafting table that is required to make coal powder. I am trying to learn how to do that now, but it should be very similar to making a custom furnace.
For some reason all of a sudden my mod doesn't work anymore, I didn't change the code but when I start it gives me this crash error report.
27 achievements
182 recipes
LWJGL Version: 2.4.2
ModLoader 1.2.5 Initializing...
Exception in thread "Minecraft main thread" java.lang.ExceptionInInitializerError
at net.minecraft.client.Minecraft.startGame(Minecraft.java:424)
at net.minecraft.client.Minecraft.run(Minecraft.java:786)
at java.lang.Thread.run(Unknown Source)
Caused by: java.lang.RuntimeException: java.lang.IllegalArgumentException: URI has an authority component
at net.minecraft.src.ModLoader.init(ModLoader.java:891)
at net.minecraft.src.ModLoader.addAllRenderers(ModLoader.java:157)
at net.minecraft.src.RenderManager.<init>(RenderManager.java:85)
at net.minecraft.src.RenderManager.<clinit>(RenderManager.java:12)
... 3 more
Caused by: java.lang.IllegalArgumentException: URI has an authority component
at java.io.File.<init>(Unknown Source)
at net.minecraft.src.ModLoader.init(ModLoader.java:847)
... 6 more
Try reinstalling modloader in a fresh minecraft.jar. That might help. Also, please post your code.
I'm getting this error when trying to test the custom mob.
From the Minecraft launcher, it just whitescreens. When trying from Eclipse it whitescreens and gives me this error.
Exception in thread "Minecraft main thread" java.lang.ExceptionInInitializerError
at net.minecraft.client.Minecraft.startGame(Minecraft.java:424)
at net.minecraft.client.Minecraft.run(Minecraft.java:786)
at java.lang.Thread.run(Unknown Source)
Caused by: java.lang.NullPointerException
at net.minecraft.src.ModelEnderghost.<init>(ModelEnderghost.java:53)
at net.minecraft.src.mod_Void.addRenderer(mod_Void.java:16)
at net.minecraft.src.ModLoader.addAllRenderers(ModLoader.java:163)
at net.minecraft.src.RenderManager.<init>(RenderManager.java:85)
at net.minecraft.src.RenderManager.<clinit>(RenderManager.java:12)
... 3 more
I'm getting this error when trying to test the custom mob.
From the Minecraft launcher, it just whitescreens. When trying from Eclipse it whitescreens and gives me this error.
Exception in thread "Minecraft main thread" java.lang.ExceptionInInitializerError
at net.minecraft.client.Minecraft.startGame(Minecraft.java:424)
at net.minecraft.client.Minecraft.run(Minecraft.java:786)
at java.lang.Thread.run(Unknown Source)
Caused by: java.lang.NullPointerException
at net.minecraft.src.ModelEnderghost.<init>(ModelEnderghost.java:53)
at net.minecraft.src.mod_Void.addRenderer(mod_Void.java:16)
at net.minecraft.src.ModLoader.addAllRenderers(ModLoader.java:163)
at net.minecraft.src.RenderManager.<init>(RenderManager.java:85)
at net.minecraft.src.RenderManager.<clinit>(RenderManager.java:12)
... 3 more
Exception in thread "Minecraft main thread" java.lang.ExceptionInInitializerError
at net.minecraft.client.Minecraft.startGame(Minecraft.java:424)
at net.minecraft.client.Minecraft.run(Minecraft.java:786)
at java.lang.Thread.run(Unknown Source)
Caused by: java.lang.NullPointerException
at net.minecraft.src.ModelEnderghost.<init>(ModelEnderghost.java:53)
at net.minecraft.src.mod_Void.addRenderer(mod_Void.java:16)
at net.minecraft.src.ModLoader.addAllRenderers(ModLoader.java:163)
at net.minecraft.src.RenderManager.<init>(RenderManager.java:85)
at net.minecraft.src.RenderManager.<clinit>(RenderManager.java:12)
... 3 more
mod_Void
package net.minecraft.src;
import java.util.Map;
public class mod_Void extends BaseMod
{
public void load()
{
ModLoader.registerEntityID(EntityEnderghost.class, "Enderghost", ModLoader.getUniqueEntityId());
ModLoader.addSpawn(EntityEnderghost.class, 12, 14, 18, EnumCreatureType.creature);
}
public void addRenderer(Map map)
{
map.put(EntityEnderghost.class, new RenderEnderghost(new ModelEnderghost(), 0.5F));
}
public String getVersion()
{
return "1.2.5";
}
}
EntitiyEnderghost
package net.minecraft.src;
import java.util.Random;
public class EntityEnderghost extends EntityMob
{
public EntityEnderghost(World world)
{
super(world);
texture = "/Enderghost.png";
moveSpeed = 0.5F;
attackStrength = 4; //take this line out if this class doesn't extend EntityMob.
}
public int getMaxHealth()
{
return 20;
}
protected String getLivingSound()
{
return "mob.villager.default";
}
protected String getHurtSound()
{
return "mob.villager.defaulthurt";
}
protected String getDeathSound()
{
return "mob.villager.defaultdeath";
}
protected int getDropItemId()
{
return Item.ingotIron.shiftedIndex;
}
protected boolean canDespawn()
{
return false;
}
}
Exception in thread "Minecraft main thread" java.lang.ExceptionInInitializerError
at net.minecraft.client.Minecraft.startGame(Minecraft.java:424)
at net.minecraft.client.Minecraft.run(Minecraft.java:786)
at java.lang.Thread.run(Unknown Source)
Caused by: java.lang.NullPointerException
at net.minecraft.src.ModelEnderghost.<init>(ModelEnderghost.java:53)
at net.minecraft.src.mod_Void.addRenderer(mod_Void.java:16)
at net.minecraft.src.ModLoader.addAllRenderers(ModLoader.java:163)
at net.minecraft.src.RenderManager.<init>(RenderManager.java:85)
at net.minecraft.src.RenderManager.<clinit>(RenderManager.java:12)
... 3 more
mod_Void
package net.minecraft.src;
import java.util.Map;
public class mod_Void extends BaseMod
{
public void load()
{
ModLoader.registerEntityID(EntityEnderghost.class, "Enderghost", ModLoader.getUniqueEntityId());
ModLoader.addSpawn(EntityEnderghost.class, 12, 14, 18, EnumCreatureType.creature);
}
public void addRenderer(Map map)
{
map.put(EntityEnderghost.class, new RenderEnderghost(new ModelEnderghost(), 0.5F));
}
public String getVersion()
{
return "1.2.5";
}
}
EntitiyEnderghost
package net.minecraft.src;
import java.util.Random;
public class EntityEnderghost extends EntityMob
{
public EntityEnderghost(World world)
{
super(world);
texture = "/Enderghost.png";
moveSpeed = 0.5F;
attackStrength = 4; //take this line out if this class doesn't extend EntityMob.
}
public int getMaxHealth()
{
return 20;
}
protected String getLivingSound()
{
return "mob.villager.default";
}
protected String getHurtSound()
{
return "mob.villager.defaulthurt";
}
protected String getDeathSound()
{
return "mob.villager.defaultdeath";
}
protected int getDropItemId()
{
return Item.ingotIron.shiftedIndex;
}
protected boolean canDespawn()
{
return false;
}
}
I'm sorry, but I can't figure out what's wrong with it! :-( You can wait for TechGuy to post a response, or, make a thread in the Mod Development forum. You stand a relatively good chance of getting help over there. My apologies again.
I'm sorry, but I don't think that there is a way to do this. (At least not an easy way.) My advice would be to make a custom crafting table that is required to make coal powder. I am trying to learn how to do that now, but it should be very similar to making a custom furnace.
Try reinstalling modloader in a fresh minecraft.jar. That might help. Also, please post your code.
When making a new mod, you should always make a new file and name it mod_yourmodnamehere.java and save it in your src folder. I hope this helps.
Thanks i should try that! i was trying to make a mob and i named it mod_WitchMob.java and did the entity, model, and rendering but i went to test it and it was a white floating box (i put modloader in my bin file but did not delete meta-inf) should i delete meta-inf?
Thanks i should try that! i was trying to make a mob and i named it mod_WitchMob.java and did the entity, model, and rendering but i went to test it and it was a white floating box (i put modloader in my bin file but did not delete meta-inf) should i delete meta-inf?
Yes, always delete Meta-INF. As for your mob, the only advice I can give you would be to double-check your code with TechGuy's tutorial, and make sure your textures are in the proper location. If you want more precise help, post your code, and someone who specializes in mobs can help you. (Not me, I don't do mobs.)
You can also make a thread with your code in the mod development forum.
Yes, always delete Meta-INF. As for your mob, the only advice I can give you would be to double-check your code with TechGuy's tutorial, and make sure your textures are in the proper location. If you want more precise help, post your code, and someone who specializes in mobs can help you. (Not me, I don't do mobs.)
You can also make a thread with your code in the mod development forum.
Thanks i should try that! i was trying to make a mob and i named it mod_WitchMob.java and did the entity, model, and rendering but i went to test it and it was a white floating box (i put modloader in my bin file but did not delete meta-inf) should i delete meta-inf?
If it's for source code don't, if it's in game then yes delete it. I had a similar problem, the way I fixed it was go to rendermanager and add my new mob into there, try that.
If it's for source code don't, if it's in game then yes delete it. I had a similar problem, the way I fixed it was go to rendermanager and add my new mob into there, try that.
Exception in thread "Minecraft main thread" java.lang.ExceptionInInitializerError
at net.minecraft.client.Minecraft.startGame(Minecraft.java:424)
at net.minecraft.client.Minecraft.run(Minecraft.java:786)
at java.lang.Thread.run(Unknown Source)
Caused by: java.lang.NullPointerException
at net.minecraft.src.ModelEnderghost.<init>(ModelEnderghost.java:53)
at net.minecraft.src.mod_Void.addRenderer(mod_Void.java:16)
at net.minecraft.src.ModLoader.addAllRenderers(ModLoader.java:163)
at net.minecraft.src.RenderManager.<init>(RenderManager.java:85)
at net.minecraft.src.RenderManager.<clinit>(RenderManager.java:12)
... 3 more
mod_Void
package net.minecraft.src;
import java.util.Map;
public class mod_Void extends BaseMod
{
public void load()
{
ModLoader.registerEntityID(EntityEnderghost.class, "Enderghost", ModLoader.getUniqueEntityId());
ModLoader.addSpawn(EntityEnderghost.class, 12, 14, 18, EnumCreatureType.creature);
}
public void addRenderer(Map map)
{
map.put(EntityEnderghost.class, new RenderEnderghost(new ModelEnderghost(), 0.5F));
}
public String getVersion()
{
return "1.2.5";
}
}
EntitiyEnderghost
package net.minecraft.src;
import java.util.Random;
public class EntityEnderghost extends EntityMob
{
public EntityEnderghost(World world)
{
super(world);
texture = "/Enderghost.png";
moveSpeed = 0.5F;
attackStrength = 4; //take this line out if this class doesn't extend EntityMob.
}
public int getMaxHealth()
{
return 20;
}
protected String getLivingSound()
{
return "mob.villager.default";
}
protected String getHurtSound()
{
return "mob.villager.defaulthurt";
}
protected String getDeathSound()
{
return "mob.villager.defaultdeath";
}
protected int getDropItemId()
{
return Item.ingotIron.shiftedIndex;
}
protected boolean canDespawn()
{
return false;
}
}
LeftArm.mirror = true; //here, told to be mirrored, but the actual object isn't created yet.
LeftArm = new ModelRenderer(this, 56, 0); //this is where the object is created.
LeftArm.addBox(-1F, -2F, -1F, 2, 30, 2);
LeftArm.setRotationPoint(5F, -12F, 2F);
LeftArm.setTextureSize(64, 32);
LeftArm.mirror = true;
setRotation(LeftArm, 1.041001F, 0F, 0F);
LeftArm.mirror = false;
The left arm object is told to be mirrored before it is even created. That's why you get the NullPointerException. Either delete that line or put it below the line where it say "= new ModelRenderer" and it should work fine. Techne always has this problem, there isn't really a way around it except to code the model from scratch.
Thankyou PhantomJedi759!
Rollback Post to RevisionRollBack
“Computers are incredibly fast, accurate and stupid; humans are incredibly slow, inaccurate and brilliant; together they are powerful beyond imagination."
Last night i made an npc spawn in only a jungle biome and had a stick in hand and much more cool stuff it worked perfectly but now today it dosen't seem to spawn the mob but i get no errors ? please help me here is the code for the Entity
package net.minecraft.src;
import java.util.Random;
public class EntityFriend extends EntityMob
{
public EntityFriend(World world)
{
super(world);
texture = "/Friend.png";
moveSpeed = 4F;
attackStrength = 3;
}
public int getMaxHealth()
{
return 20;
}
protected int getDropItemId()
{
return Block.leaves.blockID;
}
protected boolean canDespawn()
{
return false;
}
public ItemStack getHeldItem()
{
return defaultHeldItem;
}
static
{
defaultHeldItem = new ItemStack(Item.stick, 1);
}
private static final ItemStack defaultHeldItem;
protected void dropFewItems(boolean par1, int par2)
{
super.dropFewItems(par1, par2);
if (par1 && (rand.nextInt(3) == 0 || rand.nextInt(1 + par2) > 0))
{
dropItem(Block.vine.blockID, 1);
}
if (par1 && (rand.nextInt(3) == 0 || rand.nextInt(1 + par2) > 0))
{
dropItem(Item.stick.shiftedIndex, 1);
}
}
}
Here is the code for the mod_*Name of mod*
package net.minecraft.src;
import java.util.Map;
public class mod_friendmod extends BaseMod
{
public void load()
{
ModLoader.registerEntityID(EntityFriend.class, "Junglelady", ModLoader.getUniqueEntityId());
ModLoader.addSpawn(EntityFriend.class, 3, 5, 20, EnumCreatureType.monster, new BiomeGenBase[]
{
BiomeGenBase.jungle,
BiomeGenBase.jungleHills
});
}
public void addRenderer(Map map)
{
map.put(EntityFriend.class, new RenderBiped(new ModelBiped(), 0.5F));
}
public String getVersion()
{
return "1.2.5";
}
}
Have you changed anything? Anything whatsoever? I don't see how it can just quit working.
Last night i made an npc spawn in only a jungle biome and had a stick in hand and much more cool stuff it worked perfectly but now today it dosen't seem to spawn the mob but i get no errors ? please help me here is the code for the Entity
package net.minecraft.src;
import java.util.Random;
public class EntityFriend extends EntityMob
{
public EntityFriend(World world)
{
super(world);
texture = "/Friend.png";
moveSpeed = 4F;
attackStrength = 3;
}
public int getMaxHealth()
{
return 20;
}
protected int getDropItemId()
{
return Block.leaves.blockID;
}
protected boolean canDespawn()
{
return false;
}
public ItemStack getHeldItem()
{
return defaultHeldItem;
}
static
{
defaultHeldItem = new ItemStack(Item.stick, 1);
}
private static final ItemStack defaultHeldItem;
protected void dropFewItems(boolean par1, int par2)
{
super.dropFewItems(par1, par2);
if (par1 && (rand.nextInt(3) == 0 || rand.nextInt(1 + par2) > 0))
{
dropItem(Block.vine.blockID, 1);
}
if (par1 && (rand.nextInt(3) == 0 || rand.nextInt(1 + par2) > 0))
{
dropItem(Item.stick.shiftedIndex, 1);
}
}
}
Here is the code for the mod_*Name of mod*
package net.minecraft.src;
import java.util.Map;
public class mod_friendmod extends BaseMod
{
public void load()
{
ModLoader.registerEntityID(EntityFriend.class, "Junglelady", ModLoader.getUniqueEntityId());
ModLoader.addSpawn(EntityFriend.class, 3, 5, 20, EnumCreatureType.monster, new BiomeGenBase[]
{
BiomeGenBase.jungle,
BiomeGenBase.jungleHills
});
}
public void addRenderer(Map map)
{
map.put(EntityFriend.class, new RenderBiped(new ModelBiped(), 0.5F));
}
public String getVersion()
{
return "1.2.5";
}
}
Firstly: please use spoilers (see below)
Secondly: I agree with PhantomJedi, I don't see how it could just stop working.
How to make a spoiler:
I didn't do anything to it but is that code correct ?
I have just joined so i didn't know how to make spoilers !
I think it looks right, Are you sure it doesn't spawn? If it wasn't right then I think it would give you an error. You could rewrite the class, I do that sometimes, and it works... sometimes
So I'm having a bit of trouble with the image that I'm using for the block. Here is the error report:
Mods loaded: 2
ModLoader 1.2.5
mod_Speedstone 1.2.5
Minecraft has crashed!
----------------------
Minecraft has stopped running because it encountered a problem.
--- BEGIN ERROR REPORT 58d19e14 --------
Generated 14/04/12 5:17 PM
Minecraft: Minecraft 1.2.5
OS: Windows 7 (amd64) version 6.1
Java: 1.7.0_03, Oracle Corporation
VM: Java HotSpot(TM) 64-Bit Server VM (mixed mode), Oracle Corporation
LWJGL: 2.4.2
OpenGL: Mobile Intel(R) 4 Series Express Chipset Family version 2.1.0 - Build 8.15.10.2202, Intel
java.lang.RuntimeException: java.lang.Exception: Image not found: C:/Users/User/Desktop/mcp/temp/bin/minecraft/Speedstone.png
at net.minecraft.src.ModLoader.registerAllTextureOverrides(ModLoader.java:1451)
at net.minecraft.src.ModLoader.onTick(ModLoader.java:1104)
at net.minecraft.src.EntityRendererProxy.updateCameraAndRender(EntityRendererProxy.java:21)
at net.minecraft.client.Minecraft.runGameLoop(Minecraft.java:922)
at net.minecraft.client.Minecraft.run(Minecraft.java:801)
at java.lang.Thread.run(Unknown Source)
Caused by: java.lang.Exception: Image not found: C:/Users/User/Desktop/mcp/temp/bin/minecraft/Speedstone.png
at net.minecraft.src.ModLoader.loadImage(ModLoader.java:1024)
at net.minecraft.src.ModLoader.registerAllTextureOverrides(ModLoader.java:1443)
... 5 more
--- END ERROR REPORT 214dabf7 ----------
And here is my code for the mod_ file
package net.minecraft.src;
public class mod_Speedstone extends BaseMod
{
public static final Block Speedstone = new BlockSpeedstone(160, 0).setBlockName("Speed Stone").setHardness(3F).setResistance(4F).setLightValue(1F);
public void load()
{
Speedstone.blockIndexInTexture = ModLoader.addOverride("/terrain.png", "C:/Users/User/Desktop/mcp/temp/bin/minecraft/Speedstone.png");
ModLoader.registerBlock(Speedstone);
ModLoader.addName(Speedstone, "Speed Stone");
ModLoader.addRecipe(new ItemStack(Speedstone, 1), new Object [] {"#", Character.valueOf('#'), Block.dirt});
}
public String getVersion()
{
return "1.2.5";
}
}
The image is in the same file as the Terrain.png and it still can't find it when I run it. There are no errors in Eclipse and the Block file is also error free. I've tried 3 or 4 different paths for it and its the same result every time.
So I'm having a bit of trouble with the image that I'm using for the block. Here is the error report:
Mods loaded: 2
ModLoader 1.2.5
mod_Speedstone 1.2.5
Minecraft has crashed!
----------------------
Minecraft has stopped running because it encountered a problem.
--- BEGIN ERROR REPORT 58d19e14 --------
Generated 14/04/12 5:17 PM
Minecraft: Minecraft 1.2.5
OS: Windows 7 (amd64) version 6.1
Java: 1.7.0_03, Oracle Corporation
VM: Java HotSpot(TM) 64-Bit Server VM (mixed mode), Oracle Corporation
LWJGL: 2.4.2
OpenGL: Mobile Intel(R) 4 Series Express Chipset Family version 2.1.0 - Build 8.15.10.2202, Intel
java.lang.RuntimeException: java.lang.Exception: Image not found: C:/Users/User/Desktop/mcp/temp/bin/minecraft/Speedstone.png
at net.minecraft.src.ModLoader.registerAllTextureOverrides(ModLoader.java:1451)
at net.minecraft.src.ModLoader.onTick(ModLoader.java:1104)
at net.minecraft.src.EntityRendererProxy.updateCameraAndRender(EntityRendererProxy.java:21)
at net.minecraft.client.Minecraft.runGameLoop(Minecraft.java:922)
at net.minecraft.client.Minecraft.run(Minecraft.java:801)
at java.lang.Thread.run(Unknown Source)
Caused by: java.lang.Exception: Image not found: C:/Users/User/Desktop/mcp/temp/bin/minecraft/Speedstone.png
at net.minecraft.src.ModLoader.loadImage(ModLoader.java:1024)
at net.minecraft.src.ModLoader.registerAllTextureOverrides(ModLoader.java:1443)
... 5 more
--- END ERROR REPORT 214dabf7 ----------
And here is my code for the mod_ file
package net.minecraft.src;
public class mod_Speedstone extends BaseMod
{
public static final Block Speedstone = new BlockSpeedstone(160, 0).setBlockName("Speed Stone").setHardness(3F).setResistance(4F).setLightValue(1F);
public void load()
{
Speedstone.blockIndexInTexture = ModLoader.addOverride("/terrain.png", "C:/Users/User/Desktop/mcp/temp/bin/minecraft/Speedstone.png");
ModLoader.registerBlock(Speedstone);
ModLoader.addName(Speedstone, "Speed Stone");
ModLoader.addRecipe(new ItemStack(Speedstone, 1), new Object [] {"#", Character.valueOf('#'), Block.dirt});
}
public String getVersion()
{
return "1.2.5";
}
}
The image is in the same file as the Terrain.png and it still can't find it when I run it. There are no errors in Eclipse and the Block file is also error free. I've tried 3 or 4 different paths for it and its the same result every time.
You don't put the full path "C:/Users/User/Desktop/mcp/temp/bin/minecraft" is already assumed, so you just need "/Speedstone.png" or, if you put it into a folder (which is a good idea) you make it like this "/your folder name/Speedstone.png" then it should work.
Rollback Post to RevisionRollBack
To post a comment, please login or register a new account.
Im trying to make an item that when used in a crafting recipe is not used up but is just damaged, Is this possible and if so please could you help me.
The item is a grinder to make coal into coal powder
I'm sorry, but I don't think that there is a way to do this. (At least not an easy way.) My advice would be to make a custom crafting table that is required to make coal powder. I am trying to learn how to do that now, but it should be very similar to making a custom furnace.
Try reinstalling modloader in a fresh minecraft.jar. That might help. Also, please post your code.
When making a new mod, you should always make a new file and name it mod_yourmodnamehere.java and save it in your src folder. I hope this helps.
-
View User Profile
-
View Posts
-
Send Message
Curse PremiumFrom the Minecraft launcher, it just whitescreens. When trying from Eclipse it whitescreens and gives me this error.
at net.minecraft.client.Minecraft.startGame(Minecraft.java:424)
at net.minecraft.client.Minecraft.run(Minecraft.java:786)
at java.lang.Thread.run(Unknown Source)
Caused by: java.lang.NullPointerException
at net.minecraft.src.ModelEnderghost.<init>(ModelEnderghost.java:53)
at net.minecraft.src.mod_Void.addRenderer(mod_Void.java:16)
at net.minecraft.src.ModLoader.addAllRenderers(ModLoader.java:163)
at net.minecraft.src.RenderManager.<init>(RenderManager.java:85)
at net.minecraft.src.RenderManager.<clinit>(RenderManager.java:12)
... 3 more
Please post your code.
-
View User Profile
-
View Posts
-
Send Message
Curse Premiumat net.minecraft.client.Minecraft.startGame(Minecraft.java:424)
at net.minecraft.client.Minecraft.run(Minecraft.java:786)
at java.lang.Thread.run(Unknown Source)
Caused by: java.lang.NullPointerException
at net.minecraft.src.ModelEnderghost.<init>(ModelEnderghost.java:53)
at net.minecraft.src.mod_Void.addRenderer(mod_Void.java:16)
at net.minecraft.src.ModLoader.addAllRenderers(ModLoader.java:163)
at net.minecraft.src.RenderManager.<init>(RenderManager.java:85)
at net.minecraft.src.RenderManager.<clinit>(RenderManager.java:12)
... 3 more
mod_Void
package net.minecraft.src; import java.util.Map; public class mod_Void extends BaseMod { public void load() { ModLoader.registerEntityID(EntityEnderghost.class, "Enderghost", ModLoader.getUniqueEntityId()); ModLoader.addSpawn(EntityEnderghost.class, 12, 14, 18, EnumCreatureType.creature); } public void addRenderer(Map map) { map.put(EntityEnderghost.class, new RenderEnderghost(new ModelEnderghost(), 0.5F)); } public String getVersion() { return "1.2.5"; } }EntitiyEnderghost
package net.minecraft.src; import java.util.Random; public class EntityEnderghost extends EntityMob { public EntityEnderghost(World world) { super(world); texture = "/Enderghost.png"; moveSpeed = 0.5F; attackStrength = 4; //take this line out if this class doesn't extend EntityMob. } public int getMaxHealth() { return 20; } protected String getLivingSound() { return "mob.villager.default"; } protected String getHurtSound() { return "mob.villager.defaulthurt"; } protected String getDeathSound() { return "mob.villager.defaultdeath"; } protected int getDropItemId() { return Item.ingotIron.shiftedIndex; } protected boolean canDespawn() { return false; } }RenderEnderghost
package net.minecraft.src; import org.lwjgl.opengl.GL11; public class RenderEnderghost extends RenderLiving { protected ModelEnderghost Enderghost; protected float field_40296_d; public RenderEnderghost(ModelEnderghost par1ModelEnderghost, float par2) { this(par1ModelEnderghost, par2, 1.0F); } public RenderEnderghost(ModelEnderghost par1ModelEnderghost, float par2, float par3) { super(par1ModelEnderghost, par2); field_40296_d = par3; } }ModelEnderghost
// Date: 4/13/2012 7:13:55 PM // Template version 1.1 // Java generated by Techne // Keep in mind that you still need to fill in some blanks // - ZeuX package net.minecraft.src; public class ModelEnderghost extends ModelBase { //fields ModelRenderer Head; ModelRenderer Headwear; ModelRenderer Body; ModelRenderer RightArm; ModelRenderer LeftArm; public ModelEnderghost() { textureWidth = 64; textureHeight = 32; Head = new ModelRenderer(this, 0, 0); Head.addBox(-4F, -8F, -4F, 8, 8, 8); Head.setRotationPoint(0F, -14F, 0F); Head.setTextureSize(64, 32); Head.mirror = true; setRotation(Head, 0F, 0F, 0.0174533F); Headwear = new ModelRenderer(this, 0, 16); Headwear.addBox(-4F, -8F, -4F, 8, 8, 8); Headwear.setRotationPoint(0F, -14F, 0F); Headwear.setTextureSize(64, 32); Headwear.mirror = true; setRotation(Headwear, 0F, 0F, 0F); Body = new ModelRenderer(this, 32, 16); Body.addBox(-4F, 0F, -2F, 8, 12, 4); Body.setRotationPoint(0F, -14F, 0F); Body.setTextureSize(64, 32); Body.mirror = true; setRotation(Body, 0.7063936F, 0F, 0F); RightArm = new ModelRenderer(this, 56, 0); RightArm.addBox(-1F, -2F, -1F, 2, 30, 2); RightArm.setRotationPoint(-5F, -12F, 2F); RightArm.setTextureSize(64, 32); RightArm.mirror = true; setRotation(RightArm, 1.041001F, 0F, 0F); LeftArm.mirror = true; LeftArm = new ModelRenderer(this, 56, 0); LeftArm.addBox(-1F, -2F, -1F, 2, 30, 2); LeftArm.setRotationPoint(5F, -12F, 2F); LeftArm.setTextureSize(64, 32); LeftArm.mirror = true; setRotation(LeftArm, 1.041001F, 0F, 0F); LeftArm.mirror = false; } 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); Head.render(f5); Headwear.render(f5); Body.render(f5); RightArm.render(f5); LeftArm.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) { super.setRotationAngles(f, f1, f2, f3, f4, f5); } }There, sorry there's so much.
I'm sorry, but I can't figure out what's wrong with it! :-( You can wait for TechGuy to post a response, or, make a thread in the Mod Development forum. You stand a relatively good chance of getting help over there. My apologies again.
Thanks i should try that! i was trying to make a mob and i named it mod_WitchMob.java and did the entity, model, and rendering but i went to test it and it was a white floating box (i put modloader in my bin file but did not delete meta-inf) should i delete meta-inf?
Yes, always delete Meta-INF. As for your mob, the only advice I can give you would be to double-check your code with TechGuy's tutorial, and make sure your textures are in the proper location. If you want more precise help, post your code, and someone who specializes in mobs can help you. (Not me, I don't do mobs.)
You can also make a thread with your code in the mod development forum.
If it's for source code don't, if it's in game then yes delete it. I had a similar problem, the way I fixed it was go to rendermanager and add my new mob into there, try that.
hmm idk i have'nt coded any blocks yet just items
Thanks Nightara excellent signature and banner
You may need to try setting MCP up again. Use a fresh minecraft.jar, and make sure modloader is installed.
You should not modify base classes.
Your problem lays here:
LeftArm.mirror = true; //here, told to be mirrored, but the actual object isn't created yet. LeftArm = new ModelRenderer(this, 56, 0); //this is where the object is created. LeftArm.addBox(-1F, -2F, -1F, 2, 30, 2); LeftArm.setRotationPoint(5F, -12F, 2F); LeftArm.setTextureSize(64, 32); LeftArm.mirror = true; setRotation(LeftArm, 1.041001F, 0F, 0F); LeftArm.mirror = false;The left arm object is told to be mirrored before it is even created. That's why you get the NullPointerException. Either delete that line or put it below the line where it say "= new ModelRenderer" and it should work fine. Techne always has this problem, there isn't really a way around it except to code the model from scratch.
Thankyou PhantomJedi759!
together they are powerful beyond imagination."
-
View User Profile
-
View Posts
-
Send Message
Curse PremiumPlease post your full error report.
Have you changed anything? Anything whatsoever? I don't see how it can just quit working.
-
View User Profile
-
View Posts
-
Send Message
Curse PremiumFirstly: please use spoilers (see below)
Secondly: I agree with PhantomJedi, I don't see how it could just stop working.
How to make a spoiler:
-
View User Profile
-
View Posts
-
Send Message
Curse PremiumI think it looks right, Are you sure it doesn't spawn? If it wasn't right then I think it would give you an error. You could rewrite the class, I do that sometimes, and it works... sometimes
Hence the "How to make a spoiler" part
And here is my code for the mod_ file
package net.minecraft.src; public class mod_Speedstone extends BaseMod { public static final Block Speedstone = new BlockSpeedstone(160, 0).setBlockName("Speed Stone").setHardness(3F).setResistance(4F).setLightValue(1F); public void load() { Speedstone.blockIndexInTexture = ModLoader.addOverride("/terrain.png", "C:/Users/User/Desktop/mcp/temp/bin/minecraft/Speedstone.png"); ModLoader.registerBlock(Speedstone); ModLoader.addName(Speedstone, "Speed Stone"); ModLoader.addRecipe(new ItemStack(Speedstone, 1), new Object [] {"#", Character.valueOf('#'), Block.dirt}); } public String getVersion() { return "1.2.5"; } }The image is in the same file as the Terrain.png and it still can't find it when I run it. There are no errors in Eclipse and the Block file is also error free. I've tried 3 or 4 different paths for it and its the same result every time.
-
View User Profile
-
View Posts
-
Send Message
Curse PremiumYou don't put the full path "C:/Users/User/Desktop/mcp/temp/bin/minecraft" is already assumed, so you just need "/Speedstone.png" or, if you put it into a folder (which is a good idea) you make it like this "/your folder name/Speedstone.png" then it should work.