Anyone can help you out in this thread! If you know what's wrong with their mod, be sure to help out!
What to do?
* Copy and paste the WHOLE code for the mod in a [./spoiler] [./spoiler] and inside the spoiler, the code must be in a [.code] [./code]. Please put before the spoiler Code, or something.
* Copy and paste the WHOLE error report and put inside a [.spoiler] [./spoiler] and [.code] [./code] and putefore the spoiler Error Report.
* Tell us any information you want that we might need.
Remember to take out the "." in the tags ( therese are the tags [.code] ), if you do not have your code in the code tags, this can make it so much more difficult, and you might not get your error fixed if you do not put it inside the appropriate tags.
You will be putting them in a spoiler as this makes the thread just a little bit better, we dont have to scroll down heaps far to read the whole post, or to get to the bottom!
new code just change minimum and maximum! (change minimum and maximum to a number like 3 and 6 or 9 and 20any numbers) and change the EntityPUTNAMEHERE to what the entity file is called.
When you get the error report its going to look something like this
Mods loaded: 1
ModLoader Beta 1.8.1
Minecraft has crashed!
----------------------
Minecraft has stopped running because it encountered a problem.
If you wish to report this, please copy this entire text and email it to [email protected].
Please include a description of what you did when the error occured.
--- BEGIN ERROR REPORT 5424363c --------
Generated 10/8/11 8:02 PM
Minecraft: Minecraft Beta 1.8.1
OS: Windows 7 (amd64) version 6.1
Java: 1.7.0, Oracle Corporation
VM: Java HotSpot(TM) 64-Bit Server VM (mixed mode), Oracle Corporation
LWJGL: 2.4.2
OpenGL: ATI Radeon HD 3200 Graphics version 3.3.11005 Compatibility Profile Context, ATI Technologies Inc.
java.lang.ExceptionInInitializerError
at sun.reflect.NativeConstructorAccessorImpl.newInstance0(Native Method)
at sun.reflect.NativeConstructorAccessorImpl.newInstance(NativeConstructorAccessorImpl.java:57)
at sun.reflect.DelegatingConstructorAccessorImpl.newInstance(DelegatingConstructorAccessorImpl.java:45)
at java.lang.reflect.Constructor.newInstance(Constructor.java:525)
at java.lang.Class.newInstance0(Class.java:372)
at java.lang.Class.newInstance(Class.java:325)
at net.minecraft.src.ModLoader.addMod(ModLoader.java:224)
at net.minecraft.src.ModLoader.readFromClassPath(ModLoader.java:1027)
at net.minecraft.src.ModLoader.init(ModLoader.java:692)
at net.minecraft.src.ModLoader.AddAllRenderers(ModLoader.java:121)
at net.minecraft.src.RenderManager.<init>(RenderManager.java:72)
at net.minecraft.src.RenderManager.<clinit>(RenderManager.java:168)
at net.minecraft.client.Minecraft.startGame(Minecraft.java:140)
at net.minecraft.client.Minecraft.run(Minecraft.java:438)
at java.lang.Thread.run(Thread.java:722)
Caused by: java.lang.ArrayIndexOutOfBoundsException: 600
at net.minecraft.src.Block.<init>(Block.java:48)
at net.minecraft.src.Block.<init>(Block.java:77)
at net.minecraft.src.BlockDevil.<init>(BlockDevil.java:8)
at net.minecraft.src.mod_Block.<clinit>(mod_Block.java:6)
... 15 more
--- END ERROR REPORT ca0f6969 ----------
Well, its saying theres errors in the package
net.minecraft.src.thefilewheretheerroris....
this tells you where the file with the error is located.
EXAMPLE:
at net.minecraft.src.BlockDevil.<init>(BlockDevil.java:8)
this is telling me, inside the file BlockDevil, which is located in net.minecraft.src, there is a error on line 8, BlockDevil.java: 8
the bold and red 8, is telling me what line it is on, this means, I can skip straight down to that line and look for the code and try and figure out what's wrong with it.
sometimes the error report may tell you exactly whats wrong and how to fix it, like
itll say in the error report something like
this is telling you exactly what the code for AddSpawn is, its telling you, you need 3 integers.
What is a Integer?
A integer is a whole number, like 1, 2, 3, 4, 5, 6, 100, 100000, 914214692492421
A double is a decimal number like, 1.1, 3.14152659, 99.999
A boolean is a true or false
A string is words and must be inside, quotation marks, ""
e.g. "This Is A String, we use strings to name our items"
so this means you must place 3 integers where the error report is telling you, in this case the first int is a spawn rate, the second is the minimum, and the third one is the maximum.
I can not find a example of a error report at the moment, i will try and find one later, i dont have much time.
To thank the person who helped you please press the GREEN + for them fixing your code =)
Anyone can help you out in this thread! If you know what's wrong with their mod, be sure to help out!
What to do?
* Copy and paste the WHOLE code for the mod in a [./spoiler] [./spoiler] and inside the spoiler, the code must be in a [.code] [./code]. Please put before the spoiler Code, or something.
* Copy and paste the WHOLE error report and put inside a [.spoiler] [./spoiler] and [.code] [./code] and putefore the spoiler Error Report.
* Tell us any information you want that we might need.
Remember to take out the "." in the tags ( therese are the tags [.code] ), if you do not have your code in the code tags, this can make it so much more difficult, and you might not get your error fixed if you do not put it inside the appropriate tags.
You will be putting them in a spoiler as this makes the thread just a little bit better, we dont have to scroll down heaps far to read the whole post, or to get to the bottom!
To thank the person who helped you please press the GREEN + for them fixing your code =)
Can someone please please please please help me with these 2 errors i got while trying to make a npc,
Errors:
1st. no suitable method found for AddSpawn
(Class<EntityZaedyn>,int,EnumCreatureType.creature)
ModLoader.AddSpawn(EntityZaedyn.class, 500, EnumCreatureType.creature);
2nd. method ModLoader.AddSpawn(Class,int,int,int,EnumCreatureType.creature);
not applicable
also, you forgot to use tags, that was a easy code to fix, its been recently changed in modloader, and not everyone knows the change, but remember to use [.code] and [./code] with out the "."
omg dude thx soo much i got errors then i understood what u meant, delete that so i did and it worked thank u man u think u can help me with other errors? well, i mean whenever u can.
add me, :smile.gif:
package net.minecraft.src;
import org.lwjgl.opengl.GL11;
public class RenderZaedyn extends RenderLiving
{
//The three numbers below change the size of your model (you'll need to change the hitbox size too though)
protected void preRenderScale(EntityZaedyn entity, float f)
{
GL11.glScalef(1F, 1F, 1F);
}
public RenderZaedyn(ModelZaedyn modelbase, float f)
{
super(modelbase, f);
}
public void func_177_a(EntityZaedyn entity, double d, double d1, double d2,
float f, float f1)
{
super.doRenderLiving(entity, d, d1, d2, f, f1);
}
public void doRenderLiving(EntityLiving entityliving, double d, double d1, double d2,
float f, float f1)
{
super.doRenderLiving((EntityZaedyn) entityliving, d, d1, d2, f, f1);
}
public void doRender(Entity entity, double d, double d1, double d2,
float f, float f1)
{
doRenderLiving((EntityZaedyn)entity, d, d1, d2, f, f1);
}
protected void preRenderCallback(EntityLiving entityliving, float f)
{
preRenderScale((EntityZaedyn)entityliving, f);
}
}
Code for EntityZaedyn:
[spoiler]
package net.minecraft.src;
public class EntityZaedyn extends EntityLiving
{
public EntityZaedyn(World world)
{
super(world);
//Set the texture
texture = "/skin.png";
//Set the size of the hitbox
setSize(2F,2F);
//Set the speed of the mob
//NOTE: 0 = 0% speed, 1 = 100%, 0.75 = 75%
moveSpeed = 20F;
//Set how much health the mob has
health = 25;
}
public void writeEntityToNBT(NBTTagCompound nbttagcompound)
{
super.writeEntityToNBT(nbttagcompound);
}
public void readEntityFromNBT(NBTTagCompound nbttagcompound)
{
super.readEntityFromNBT(nbttagcompound);
}
//Need audiomod for the next 3. Remove them if you want a silent mob (except for the sound of foot steps)
//You can also use sounds from default mobs by going into their respective entity files (like I did in the video)
protected String getLivingSound()
{
//This is what sound the mob makes when it is alive and well
return "mob.cow";
}
protected String getHurtSound()
{
//This is what sound the mob makes when it is getting hurt
return "mob.cow";
}
protected String getDeathSound()
{
//This is what sound the mob makes when it is in the process of dying
return "mob.cow";
}
//Here's where you change the volume of the mob's sounds
protected float getSoundVolume()
{
return 0.4F;
}
//Here you define what items/blocks you want the mob to drop when killed
protected void dropFewItems()
{
dropItem(Item.coal.shiftedIndex, 10);
dropItem(Item.stick.shiftedIndex, 10);
dropItem(Item.swordDiamond.shiftedIndex, 1);
}
}
Thanks to anyone who solves why i cant see my npcs, i owe u a great thx! (and some diamond!)
:huh.gif: :ohmy.gif: :smile.gif:
Anyone can help you out in this thread! If you know what's wrong with their mod, be sure to help out!
* Copy and paste the WHOLE code for the mod in a [./spoiler] [./spoiler] and inside the spoiler, the code must be in a [.code] [./code]. Please put before the spoiler Code, or something.
* Copy and paste the WHOLE error report and put inside a [.spoiler] [./spoiler] and [.code] [./code] and putefore the spoiler Error Report.
* Tell us any information you want that we might need.
Remember to take out the "." in the tags ( therese are the tags [.code] ), if you do not have your code in the code tags, this can make it so much more difficult, and you might not get your error fixed if you do not put it inside the appropriate tags.
You will be putting them in a spoiler as this makes the thread just a little bit better, we dont have to scroll down heaps far to read the whole post, or to get to the bottom!
COMMON MISTAKES PLEASE READ BEFORE YOU POST
new code just change minimum and maximum! (change minimum and maximum to a number like 3 and 6 or 9 and 20any numbers) and change the EntityPUTNAMEHERE to what the entity file is called.
How To Read A Error Report!
When you get the error report its going to look something like this
Well, its saying theres errors in the package
this tells you where the file with the error is located.
EXAMPLE:
this is telling me, inside the file BlockDevil, which is located in net.minecraft.src, there is a error on line 8, BlockDevil.java: 8
the bold and red 8, is telling me what line it is on, this means, I can skip straight down to that line and look for the code and try and figure out what's wrong with it.
sometimes the error report may tell you exactly whats wrong and how to fix it, like
itll say in the error report something like
and bit further down in the code itll say,
this is telling you exactly what the code for AddSpawn is, its telling you, you need 3 integers.
What is a Integer?
A integer is a whole number, like 1, 2, 3, 4, 5, 6, 100, 100000, 914214692492421
A double is a decimal number like, 1.1, 3.14152659, 99.999
A boolean is a true or false
A string is words and must be inside, quotation marks, ""
e.g. "This Is A String, we use strings to name our items"
so this means you must place 3 integers where the error report is telling you, in this case the first int is a spawn rate, the second is the minimum, and the third one is the maximum.
I can not find a example of a error report at the moment, i will try and find one later, i dont have much time.
Lol, i was planning on it, as long as i know how to fix them, pretty new to modding :tongue.gif:
Errors:
1st. no suitable method found for AddSpawn
(Class<EntityZaedyn>,int,EnumCreatureType.creature)
ModLoader.AddSpawn(EntityZaedyn.class, 500, EnumCreatureType.creature);
2nd. method ModLoader.AddSpawn(Class,int,int,int,EnumCreatureType.creature);
not applicable
new code
change minimum and maximum to a number like 3 and 6 or 9 and 20any numbers
error:
cannot find super.render(entity, f, f1, f2, f3, f4, f5);
symbol: variable entity
location: class modelZaedyn
do i get rid of entity?
and thx again for ur help
im sorry, im not really sure with GUI's I havn't made one for minecraft yet.
read what to do, in spoilers and code tags, paste your error reports and the code.
Here is the code:
Error: No suitable method for:
the parameters also should be,
add me, :smile.gif:
code for mod_Mob.java:
[spoiler]
Code for ModelZaedyn:
[spoiler]
Code for RenderZaedyn:
Code for EntityZaedyn:
[spoiler]
Thanks to anyone who solves why i cant see my npcs, i owe u a great thx! (and some diamond!)
:huh.gif: :ohmy.gif: :smile.gif: