This tutorial will teach you how to create mobs with the use of modloader and its required when using this mod , using this tutorial i think is better than the before one because in modloader mods you have more options
first you need to set up mcp with modloader decompiled
now open up notepadd ++ and paste this:
package net.minecraft.src;
// Decompiled by Jad v1.5.8g. Copyright 2001 Pavel Kouznetsov.
// Jad home page: http://www.kpdus.com/jad.html
// Decompiler options: packimports(3) braces deadcode
import java.util.*;
import java.util.Map;
public class mod_Yourmobname extends BaseMod
{
public mod_Yourmobname()
{
ModLoader.RegisterEntityID(EntityYourmobname.class, "Yourmobname", ModLoader.getUniqueEntityId()); // without this code , your mob wont spawn !
ModLoader.AddSpawn(EntityYourmobname.class, 3, EnumCreatureType.creature); // this is the spawn rate for exmaple if you put 3 the mobs is very rare to spawn,The EnumCreatureType is what type of mob it is , mobs that you want to spawn in water are "waterCreature", enemies are "monster", and animals are "creature".
}
// RENDERERS
public void AddRenderer(Map map)
{
map.put(EntityYourmobname.class, new RenderYourmobname(new ModelYourmobname(), 0.5F)); // this one just assign the mob to your game and make it readable, just like RenderManager , the 0.5f is the shadow size of the mob you can make it bigger like 0.8f or smaller like 0.2f
}
public String Version()
{
return "| [1.5_01] Begginers Mob Making Tutorial 2 The Modloader Way!"; // Put here anything you like after that it will show up in the modloader logs.
}
}
Replace Yourmob name with the name of the mob you want to have , be careful java letters are case sensitive! and just edit the other settings explanations are there, after that save it and name it mod_Yourmobname
, Yourmobname is the Same name that you typed there! big letter with big letters , small with small, etc...
now open notepad++ again and paste this:
package net.minecraft.src;
// Decompiled by Jad v1.5.8g. Copyright 2001 Pavel Kouznetsov.
// Jad home page: http://www.kpdus.com/jad.html
// Decompiler options: packimports(3) braces deadcode
public class RenderYourmobname extends RenderLiving
{
public RenderYourmobname(ModelBase modelbase, float f)
{
super(modelbase, f);
}
public void func_177_a(EntityYourmobname entityyourmobname, double d, double d1, double d2,
float f, float f1)
{
super.doRenderLiving(entityyourmobname, d, d1, d2, f, f1);
}
public void doRenderLiving(EntityLiving entityliving, double d, double d1, double d2,
float f, float f1)
{
func_177_a((EntityYourmobname)entityliving, d, d1, d2, f, f1);
}
public void doRender(Entity entity, double d, double d1, double d2,
float f, float f1)
{
func_177_a((EntityYourmobname)entity, d, d1, d2, f, f1);
}
}
replace Yourmobname with the same name that you typed with the one before , also the words that i typed big letters type them big , and small type them small if its Yourmobname start your mob name with big letter , if its yourmobname start your mob name with small letter , now save it and name it : RenderYourmobname
now open notepad++ again and paste this:
package net.minecraft.src;
// Decompiled by Jad v1.5.8g. Copyright 2001 Pavel Kouznetsov.
// Jad home page: http://www.kpdus.com/jad.html
// Decompiler options: packimports(3) braces deadcode
public class EntityYourmobname extends EntityAnimal
{
public EntityYourmobname(World world)
{
super(world);
texture = "/mob/yourtexturename.png"; // the name of the texture that is used with the new mob , it should be in the mob folder in minecraft.jar
setSize(1.5F, 1.9F); // this is the co ordinates where the mob is hit
}
public void writeEntityToNBT(NBTTagCompound nbttagcompound)
{
super.writeEntityToNBT(nbttagcompound); // this make your mob loadable again when you load your map you should keep it as it is if you want iy
}
public void readEntityFromNBT(NBTTagCompound nbttagcompound)
{
super.readEntityFromNBT(nbttagcompound); // this retrieves minecraft saves , so you should keep it as it is if you want it
}
protected String getLivingSound()
{
return null; // the sound of your mob when its hurt , dead , or from a distance, null means theres no sounds ,when you put a sound after all your work you need to install audiomod , the sounds should be placed in resources/mod/sound ,and should be like that: return "thefoldernameofyourmob.thenameofyourogg";the folder name of your mob should be place in resources/mod/sound, when making more than 1 sounds rename them to 1,2,3,4,5 with same name and put it here without the 1,2,3,4 ..
}
protected String getHurtSound()
{
return null;
}
protected String getDeathSound()
{
return null;
}
protected float getSoundVolume()
{
return 0.4F;
}
protected int getDropItemId()
{
return 352; // this is what you want your mob to drop when its dead ,google minecraft id and go to the minecraftwiki to see the id numbers , for exmaple 352 will drop a bone
}
}
again replace Yourmobname with the name of your mob , and yourtexture name with the name of your texture , more info options can be read there when you paste it , and then save it as EntityYourmobname
now for the last thing the model of the mob , open up notepad++ and paste this:
package net.minecraft.src;
// Decompiled by Jad v1.5.8g. Copyright 2001 Pavel Kouznetsov.
// Jad home page: http://www.kpdus.com/jad.html
// Decompiler options: packimports(3) braces deadcode
public class ModelYourmobname extends ModelBase
{
public ModelYourmobname()
{
float scale = 0F;
face = new ModelRenderer(0, 0);
face.addBox(0F, 0F, 0F, 8, 18, 16, scale);
face.setPosition(0F, -4F, 0F);
arm1 = new ModelRenderer(0, 34);
arm1.addBox(0F, 0F, 0F, 8, 18, 8, scale);
arm1.setPosition(0F, -2F, 16F);
arm2 = new ModelRenderer(32, 34);
arm2.addBox(0F, 0F, 0F, 8, 18, 8, scale);
arm2.setPosition(0F, -2F, -8F);
leg1 = new ModelRenderer(80, 0);
leg1.addBox(0F, 0F, 0F, 8, 10, 8, scale);
leg1.setPosition(0F, 14F, 0F);
leg2 = new ModelRenderer(48, 0);
leg2.addBox(0F, 0F, 0F, 8, 10, 8, scale);
leg2.setPosition(0F, 14F, 8F);
}
public void render(float f, float f1, float f2, float f3, float f4, float f5)
{
super.render(f, f1, f2, f3, f4, f5);
face.render(f5); // all the things that isnt in the EXTEND , should be putting here , or it will not show up!
arm1.render(f5);
arm2.render(f5);
leg1.render(f5);
leg2.render(f5);
}
public void setRotationAngles(float f, float f1, float f2, float f3, float f4, float f5)
{
super.setRotationAngles(f, f1, f2, f3, f4, f5); // this adds animations of parts of the body , if you want to know how to animate use mob maker and my tutorial in the other thread
}
ModelRenderer face;
ModelRenderer arm1;
ModelRenderer arm2;
ModelRenderer leg1;
ModelRenderer leg2;
}
again replace Yourmobname with the same name in the java files you did before , and its done! to make your own model and texture mapping and stuff , use:
Fmc Modeler
or
Techne
or
Mcmodeler
save it as java files and then remove the codes of my previous mob and paste them with the codes of the mob you made and saved in those tools
after that put it in the src folder recompile and reobf... and the texture to the texture directory and the sounds to the sounds directory... and if you put sounds you need to install audiomod!
always when making your mob do not copy the modelmymobname.java ! because techne now automatically make it just save it in techne as ModelYourbmobname then open it and put after public class Model the mob name , and after ModelBase
{
public
the mob name which will be like that:
public class ModelYourmobname extends ModelBase
{
public ModelYourmobname()
Happy mob making !
If you need any help or got a problem just drop a comment
Heres a link to my other mob making tutorial:
viewtopic.php?f=1036&t=213286&p=3078216#p3078216




















