The new modloader has ModTexture.class file. You must dowload the new modloader. And before decompiling you must put Modloader.class , Modtexture.class and Base_Mod.class into the minecraft.jar .
Okay I did everything exactly as it says but I can't find any of the PIgmen (or Humans in my case) and sometimes my game crashes... any help on that?
You have to post the crash error.
Also, did you have any errors on recompiling or reobfuscating? If so your mob won't work.
As an alternative you might have forgot to put your mobs texture into minecraft.jar/mobs folder.It might be invisible.
Otherwise make sure you have installed modloader and spawnlist in your minecraft game.(not mcp)
and FMJ, you have an error in your mod_Desertpig.java code. Fix it. If you can't recompile you can't reobfuscate.
When i recompile i dont get an error but i get an error as it doesnt see as an error.
it says:
*** Minecraft Coder Pack Version 2.7 ***
Finding javac.exe... if you want to speed this up, add it to your PATH
Path set.
Compiling Minecraft
sources\minecraft\net\minecraft\src\mod_Desertpig.java:20: reached end of file w
hile parsing
}
Compiling Minecraft Start Class
*** minecraft_server.jar was not found, skipping
=== MCP 2.7 recompile script finished ===
Press any key to continue . . .
And when i reobf after this recompilation it just says: client not compiled skips this step (not actual quote but close)
Please help me =)
Also how does this mob i now created following this tutorial behave???
Grab some meat to end ur hunger
EDIT: Demigod. Put on singleplayer commands and type ''/spawn your humans name'' If it doesnt work then ur mod doesnt work. If it works u still have to change your mobs spawning conditions. Hope it helped you and that someone will help me =)
you are either missing a } or have one too many. Make sure each { has a } to go with it, if not, remove or add one. That's about as descriptive as I can be without seeing your code.
Rollback Post to RevisionRollBack
GENERATION 25: The first time you see this, copy it into your sig on any forum and add 1 to the generation.
It is all about renderentity and modelentity.For the list of all renders available, go to RenderManager in src folder.You will see a list of all mobs and their renders. Then choose a render and place it.
For example in your code we place it like this for the mob to look like a slime.
NOT:
map.put(EntityJaba.class, new RenderSlime(new ModelSlime(), 0.5F));
BUT:
map.put(EntityJaba.class, new RenderSlime(new ModelSlime(16), new ModelSlime(0), 0.25F));
You can see that code in RenderManager.java file. So , to make it look like a zombie(as in model) you go like this:
map.put(EntityJaba.class, new RenderBiped(new ModelZombie(), 0.5F));
Also remember that these lines are placed in public void AddRenderer(Map map) title under mod_modname .
Have fun with your new ... slime mob? :smile.gif:
I guess that answers you? You must try this yourself. Getting this from people just won't help you learn modding.However if you can't succesfully follow the tutorial i might throw you one.Just try it first.
I keep getting one error when trying to recomplie, and its with the pigman-neutral code
Error I get is:
sources\minecraft\net\minecraft\src\EntityGUmbrella.java:62: cannot find symbol
symbol: class List
location: Class net.minecraft.src.EntityGumbrella
List list = worldObj.getEntitiesWithinAABBExcludingEntity(this, boundingBox.Expand(32D, 32D, 32D>>;
^
The ^ is under the N in Expand
My mob code is here, copied the part with the error from the Pigman code.. so I can't see why its erroring
package net.minecraft.src;
public class EntityGUmbrella extends EntityMobs
{
public EntityGUmbrella(World world)
{
super(world);
angerLevel = 0;
randomSoundDelay = 0;
texture = "/mob/GUmbrella.png";
}
protected int getDropItemId()
{
//This is the item your mob will drop
return Item.ingotIron.shiftedIndex;
}
public void onUpdate()
{
moveSpeed = playerToAttack == null ? 0.5F : 0.95F;
if(randomSoundDelay > 0 && --randomSoundDelay == 0)
{
worldObj.playSoundAtEntity(this, "mob.zombiepig.zpigangry", getSoundVolume() * 2.0F, ((rand.nextFloat() - rand.nextFloat()) * 0.2F + 1.0F) * 1.8F);
}
super.onUpdate();
}
public void writeEntityToNBT(NBTTagCompound nbttagcompound)
{
super.writeEntityToNBT(nbttagcompound);
nbttagcompound.setShort("Anger", (short)angerLevel);
}
public void readEntityFromNBT(NBTTagCompound nbttagcompound)
{
super.readEntityFromNBT(nbttagcompound);
angerLevel = nbttagcompound.getShort("Anger");
}
protected Entity findPlayerToAttack()
{
if(angerLevel == 0)
{
return null;
} else
{
return super.findPlayerToAttack();
}
}
public void onLivingUpdate()
{
super.onLivingUpdate();
}
public boolean attackEntityFrom(Entity entity, int i)
{
if(entity instanceof EntityPlayer)
{
List list = worldObj.getEntitiesWithinAABBExcludingEntity(this, boundingBox.expand(32D, 32D, 32D));
for(int j = 0; j < list.size(); j++)
{
Entity entity1 = (Entity)list.get(j);
if(entity1 instanceof EntityGUmbrella)
{
EntityGUmbrella entitygumbrella = (EntityGUmbrella)entity1;
entitygumbrella.becomeAngryAt(entity);
}
}
becomeAngryAt(entity);
}
return super.attackEntityFrom(entity, i);
}
private void becomeAngryAt(Entity entity)
{
playerToAttack = entity;
angerLevel = 400 + rand.nextInt(400);
randomSoundDelay = rand.nextInt(40);
}
public boolean getCanSpawnHere()
{
if(worldObj.countEntities(this.getClass()) >= 15){
return false;
}
int i = MathHelper.floor_double(posX);
int j = MathHelper.floor_double(boundingBox.minY);
int k = MathHelper.floor_double(posZ);
int l = worldObj.getBlockId(i, j - 1, k);
return worldObj.difficultySetting > 0 && worldObj.checkIfAABBIsClear(boundingBox) && worldObj.getCollidingBoundingBoxes(this, boundingBox).size() == 0 && !worldObj.getIsAnyLiquid(boundingBox);
}
public ItemStack getHeldItem()
{
return defaultHeldItem;
}
private int angerLevel;
private int randomSoundDelay;
private static final ItemStack defaultHeldItem;
static
{
defaultHeldItem = new ItemStack(Item.swordStone, 1);
}
}
Add this to the top of your entity code, before public class
GAH! i want a video tut D: i dont understand compiling and recompiling and coding and all that stuff just make a video tutorial plz! im only 11 years old i dont know what that stuff is!
*** Minecraft Coder Pack Version 2.7 ***
Finding java.exe... if you want to speed this up, add it to your PATH
Finding javac.exe... if you want to speed this up, add it to your PATH
Path set.
Unable to locate java.exe. Please verify that it is in the PATH.
Press any key to continue . . .
is that suppose to happen or am i so stupid that i did something wrong?
*** Minecraft Coder Pack Version 2.7 ***
Finding java.exe... if you want to speed this up, add it to your PATH
Finding javac.exe... if you want to speed this up, add it to your PATH
Path set.
Unable to locate java.exe. Please verify that it is in the PATH.
Press any key to continue . . .
is that suppose to happen or am i so stupid that i did something wrong?
make sure to download the latest java runtime environment and java development kit. someone offered to make a video tutorial, but i don't know what happened to that.
Rollback Post to RevisionRollBack
GENERATION 25: The first time you see this, copy it into your sig on any forum and add 1 to the generation.
*** Minecraft Coder Pack Version 2.7 ***
Finding java.exe... if you want to speed this up, add it to your PATH
Finding javac.exe... if you want to speed this up, add it to your PATH
Path set.
Unable to locate java.exe. Please verify that it is in the PATH.
Press any key to continue . . .
is that suppose to happen or am i so stupid that i did something wrong?
make sure to download the latest java runtime environment and java development kit. someone offered to make a video tutorial, but i don't know what happened to that.
how do i make sure i have them? im downloading JDK cuz im pretty sure i have the runtime environment
EDIT: i figured out i have them both, but i still get the same error. it said java is already at the latest update, but when i see if theres an update for the JDK, it takes me to a uninstall wizard
I keep getting one error when trying to recomplie, and its with the pigman-neutral code
Error I get is:
sources\minecraft\net\minecraft\src\EntityGUmbrella.java:62: cannot find symbol
symbol: class List
location: Class net.minecraft.src.EntityGumbrella
List list = worldObj.getEntitiesWithinAABBExcludingEntity(this, boundingBox.Expand(32D, 32D, 32D>>;
^
The ^ is under the N in Expand
My mob code is here, copied the part with the error from the Pigman code.. so I can't see why its erroring
package net.minecraft.src;
public class EntityGUmbrella extends EntityMobs
{
public EntityGUmbrella(World world)
{
super(world);
angerLevel = 0;
randomSoundDelay = 0;
texture = "/mob/GUmbrella.png";
}
protected int getDropItemId()
{
//This is the item your mob will drop
return Item.ingotIron.shiftedIndex;
}
public void onUpdate()
{
moveSpeed = playerToAttack == null ? 0.5F : 0.95F;
if(randomSoundDelay > 0 && --randomSoundDelay == 0)
{
worldObj.playSoundAtEntity(this, "mob.zombiepig.zpigangry", getSoundVolume() * 2.0F, ((rand.nextFloat() - rand.nextFloat()) * 0.2F + 1.0F) * 1.8F);
}
super.onUpdate();
}
public void writeEntityToNBT(NBTTagCompound nbttagcompound)
{
super.writeEntityToNBT(nbttagcompound);
nbttagcompound.setShort("Anger", (short)angerLevel);
}
public void readEntityFromNBT(NBTTagCompound nbttagcompound)
{
super.readEntityFromNBT(nbttagcompound);
angerLevel = nbttagcompound.getShort("Anger");
}
protected Entity findPlayerToAttack()
{
if(angerLevel == 0)
{
return null;
} else
{
return super.findPlayerToAttack();
}
}
public void onLivingUpdate()
{
super.onLivingUpdate();
}
public boolean attackEntityFrom(Entity entity, int i)
{
if(entity instanceof EntityPlayer)
{
List list = worldObj.getEntitiesWithinAABBExcludingEntity(this, boundingBox.expand(32D, 32D, 32D));
for(int j = 0; j < list.size(); j++)
{
Entity entity1 = (Entity)list.get(j);
if(entity1 instanceof EntityGUmbrella)
{
EntityGUmbrella entitygumbrella = (EntityGUmbrella)entity1;
entitygumbrella.becomeAngryAt(entity);
}
}
becomeAngryAt(entity);
}
return super.attackEntityFrom(entity, i);
}
private void becomeAngryAt(Entity entity)
{
playerToAttack = entity;
angerLevel = 400 + rand.nextInt(400);
randomSoundDelay = rand.nextInt(40);
}
public boolean getCanSpawnHere()
{
if(worldObj.countEntities(this.getClass()) >= 15){
return false;
}
int i = MathHelper.floor_double(posX);
int j = MathHelper.floor_double(boundingBox.minY);
int k = MathHelper.floor_double(posZ);
int l = worldObj.getBlockId(i, j - 1, k);
return worldObj.difficultySetting > 0 && worldObj.checkIfAABBIsClear(boundingBox) && worldObj.getCollidingBoundingBoxes(this, boundingBox).size() == 0 && !worldObj.getIsAnyLiquid(boundingBox);
}
public ItemStack getHeldItem()
{
return defaultHeldItem;
}
private int angerLevel;
private int randomSoundDelay;
private static final ItemStack defaultHeldItem;
static
{
defaultHeldItem = new ItemStack(Item.swordStone, 1);
}
}
Sorry to requote this, but i just caught this upon reading a second time, you can't have your mob name different from the mob file name, you need to change the u in the filename to a capital.
Rollback Post to RevisionRollBack
GENERATION 25: The first time you see this, copy it into your sig on any forum and add 1 to the generation.
Well, when i run reobf.bat file and check the final_out folder/minecraft there is only one file, after reading through all the comments I assume there is suppose to be mod_Pigman.class AND EntityPigman.class, I only seem to have mod_Pigman.class. 0 errors was shown when I ran all the .bat files...
Well, when i run reobf.bat file and check the final_out folder/minecraft there is only one file, after reading through all the comments I assume there is suppose to be mod_Pigman.class AND EntityPigman.class, I only seem to have mod_Pigman.class. 0 errors was shown when I ran all the .bat files...
Make sure in your client_obfuscation.txt you have both files typed into it.
*** Minecraft Coder Pack Version 2.7 ***
Finding java.exe... if you want to speed this up, add it to your PATH
Finding javac.exe... if you want to speed this up, add it to your PATH
Path set.
Unable to locate java.exe. Please verify that it is in the PATH.
Press any key to continue . . .
is that suppose to happen or am i so stupid that i did something wrong?
make sure to download the latest java runtime environment and java development kit. someone offered to make a video tutorial, but i don't know what happened to that.
how do i make sure i have them? im downloading JDK cuz im pretty sure i have the runtime environment
EDIT: i figured out i have them both, but i still get the same error. it said java is already at the latest update, but when i see if theres an update for the JDK, it takes me to a uninstall wizard
Weird, are you on a pc or a mac? What operating system? There's a readme file that comes with MCP that tells you how to set your PATH variable, but be careful when you do this. The first time I did, I overwrote my PATH instead of adding to it, and it took me days to fully fix it.
Rollback Post to RevisionRollBack
GENERATION 25: The first time you see this, copy it into your sig on any forum and add 1 to the generation.
I think its the codder thing (MCP) because I keep getting that error too, and its ALWAYS because of a symbol that it somehow can't find :S
You have to post the crash error.
Also, did you have any errors on recompiling or reobfuscating? If so your mob won't work.
As an alternative you might have forgot to put your mobs texture into minecraft.jar/mobs folder.It might be invisible.
Otherwise make sure you have installed modloader and spawnlist in your minecraft game.(not mcp)
and FMJ, you have an error in your mod_Desertpig.java code. Fix it. If you can't recompile you can't reobfuscate.
you are either missing a } or have one too many. Make sure each { has a } to go with it, if not, remove or add one. That's about as descriptive as I can be without seeing your code.
lol good point killnature
I guess that answers you? You must try this yourself. Getting this from people just won't help you learn modding.However if you can't succesfully follow the tutorial i might throw you one.Just try it first.
You only need to add, ModTexture.class, BaseMod.class and Modloader.class
You also will need to add spawnlist.class in there too before you decompile. Well....I always do.
Add this to the top of your entity code, before public class that should fix it.
*** Minecraft Coder Pack Version 2.7 ***
Finding java.exe... if you want to speed this up, add it to your PATH
Finding javac.exe... if you want to speed this up, add it to your PATH
Path set.
Unable to locate java.exe. Please verify that it is in the PATH.
Press any key to continue . . .
is that suppose to happen or am i so stupid that i did something wrong?
make sure to download the latest java runtime environment and java development kit. someone offered to make a video tutorial, but i don't know what happened to that.
how do i make sure i have them? im downloading JDK cuz im pretty sure i have the runtime environment
EDIT: i figured out i have them both, but i still get the same error. it said java is already at the latest update, but when i see if theres an update for the JDK, it takes me to a uninstall wizard
It defaults to the player sound.
Sorry to requote this, but i just caught this upon reading a second time, you can't have your mob name different from the mob file name, you need to change the u in the filename to a capital.
Make sure in your client_obfuscation.txt you have both files typed into it.
EntityPigman
mod_Pigman
--Both on their own seperate line.
Why won't you look back.Your answer is there for 100 years.
Weird, are you on a pc or a mac? What operating system? There's a readme file that comes with MCP that tells you how to set your PATH variable, but be careful when you do this. The first time I did, I overwrote my PATH instead of adding to it, and it took me days to fully fix it.