package net.minecraft.src;
import java.lang.reflect.Method;
import java.util.Map;
public class mod_Herobrine extends BaseMod
{
public mod_Herobrine()
{
ModLoader.RegisterEntityID(EntityHerobrine.class, "Herobrine", ModLoader.getUniqueEntityId());
ModLoader.AddSpawn(EntityHerobrine.class, 1, 1, 1, EnumCreatureType.creature);
}
public void AddRenderer(Map map)
{
map.put(EntityHerobrine.class, new RenderBiped(new ModelBiped(), 0.5F));
}
public String Version()
{
return "1.0";
}
}
Error Log:
== MCP v5.0 ==
> Recompiling client...
"D:\Program Files\Java\jdk1.7.0\bin\javac.exe" -g -source 1.6 -target 1.6 -class
path "lib/;lib/*;jars/bin/minecraft.jar;jars/bin/jinput.jar;jars/bin/lwjgl.jar;j
ars/bin/lwjgl_util.jar" -sourcepath src/minecraft -d bin/minecraft src/minecraft
\net\minecraft\client\*.java src/minecraft\net\minecraft\src\*.java conf/patche
s/*.java failed.
Return code : 1
== ERRORS FOUND ==
warning: [options] bootstrap class path not set in conjunction with -source 1.6
src\minecraft\net\minecraft\src\EntityHerobrine.java:3: error: EntityHerobrine i
s not abstract and does not override abstract method getMaxHealth() in EntityLiv
ing
public class EntityHerobrine extends EntityMob
^
src\minecraft\net\minecraft\src\mod_Herobrine.java:6: error: mod_Herobrine is no
t abstract and does not override abstract method load() in BaseMod
public class mod_Herobrine extends BaseMod
^
2 errors
1 warning
==================
> Done in 12.88 seconds
> Recompiling server...
!! Can not find server sources !!
Press any key to continue . . .
public void getMaxHealth()
{
return 20; //1 is half a heart. 20 is 10 hearts. Change to whatever you like :smile.gif:
}
Also, change..
public mod_Herobrine(){
}
To
public void load(){
}
What you were doing wrong is that you did not know minecraft and modloader code has chnage since 1.0.0. Just remember these methods next time you create a mod.
Make sure you mod_*** always starts like this
package net.minecraft.src;
import java.util.Random;
public class mod_****** extends BaseMod
{
public mod_Example()
{
//Don't write you code in here
}
public void load()
{
//Write it in here
}
public String getVersion()
{
return ("1.0.0");
}
}
You only have two errors. The first is: You can't return a sound that is in the code. It has to have been derived from the sounds directory in which you can find the same way I did.
Second, you need to return that this thing lives, therefore you need a getmaxhealth thingy, I assume your using MCP, look at entity chicken or something...The secont error is fixed by the post above.
Rollback Post to RevisionRollBack
Did I help you? There's a little white plus down the bottom. I hope your confused!
I am making a herobrine mod for personal use (for an upcoming youtube video) and i got an error when i tried to recompile it.
Entity Herobrine:
mod_herobrine:
Error Log:
Thanks for your help to everyone (in advance)
The Micahel
Also, change..
To
What you were doing wrong is that you did not know minecraft and modloader code has chnage since 1.0.0. Just remember these methods next time you create a mod.
Make sure you mod_*** always starts like this
Second, you need to return that this thing lives, therefore you need a getmaxhealth thingy, I assume your using MCP, look at entity chicken or something...The secont error is fixed by the post above.
Did I help you? There's a little white plus down the bottom. I hope your confused!