Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- 1)
- //mod_testmob
- package net.minecraft.src;
- import java.awt.Color;
- import java.util.Map;
- public class mod_testmob extends BaseMod
- {
- public String getVersion()
- {
- return "1.4.7";
- }
- public void load()
- {
- ModLoader.registerEntityID(EntityTest.class, "test", 30);
- ModLoader.addSpawn("test", 15, -5, 1, EnumCreatureType.monster);
- ModLoader.addLocalization("entity.test.name", "jaje");
- EntityList.entityEggs.put(Integer.valueOf(30), new EntityEggInfo(30, 894731, (new Color(21, 15, 6)).getRGB()));
- }
- public void addRenderer(Map var1)
- {
- var1.put(EntityTest.class, new RenderLiving(new ModelMob(),.5f));
- }
- }
- //
- // EntityTest
- package net.minecraft.src;
- public class EntityTest extends EntityMob
- {
- public EntityTest(World par1World)
- {
- super(par1World);
- this.texture = "/mob/Mayoneza.png";
- this.moveSpeed = 10.4f;
- isImmuneToFire = false;
- this.tasks.addTask(0, new EntityAISwimming(this));
- this.tasks.addTask(1, new EntityAIAttackOnCollide(this, EntityPlayer.class, this.moveSpeed, false));
- this.tasks.addTask(2, new EntityAIMoveTwardsRestriction(this, this.moveSpeed));
- this.tasks.addTask(3, new EntityAIWander(this, this.moveSpeed));
- this.tasks.addTask(4, new EntityAILookIdle(this));
- this.targetTasks.addTask(0, new EntityAIHurtByTarget(this, false));
- this.targetTasks.addTask(1, new EntityAINearestAttackableTarget(this, EntityPlayer.class, 25.0F, 0, true));
- }
- public int func_82193_c(Entity par1Entity)
- {
- return 4;
- }
- protected void fall(float par1) {}
- public int getMaxHealth()
- {
- return 10;
- }
- protected String getLivingSound()
- {
- return "mob.pig.say";
- }
- protected String getHurtSound()
- {
- return "mob.pig.say";
- }
- protected String getDeathSound()
- {
- return "mob.pig.death";
- }
- protected int getDropItemId()
- {
- return Item.diamond.itemID;
- }
- protected boolean canDespawn()
- {
- return true;
- }
- protected boolean isAIEnabled()
- {
- return true;
- }
- }
Advertisement
Add Comment
Please, Sign In to add comment