Guest User

da

a guest
Feb 8th, 2013
67
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
text 1.91 KB | None | 0 0
  1. 1)
  2. //mod_testmob
  3.  
  4.  
  5.  
  6. package net.minecraft.src;
  7.  
  8. import java.awt.Color;
  9. import java.util.Map;
  10.  
  11. public class mod_testmob extends BaseMod
  12. {
  13. public String getVersion()
  14. {
  15. return "1.4.7";
  16. }
  17.  
  18. public void load()
  19. {
  20. ModLoader.registerEntityID(EntityTest.class, "test", 30);
  21. ModLoader.addSpawn("test", 15, -5, 1, EnumCreatureType.monster);
  22. ModLoader.addLocalization("entity.test.name", "jaje");
  23. EntityList.entityEggs.put(Integer.valueOf(30), new EntityEggInfo(30, 894731, (new Color(21, 15, 6)).getRGB()));
  24. }
  25.  
  26. public void addRenderer(Map var1)
  27. {
  28. var1.put(EntityTest.class, new RenderLiving(new ModelMob(),.5f));
  29. }
  30. }
  31.  
  32.  
  33. //
  34.  
  35.  
  36.  
  37.  
  38. // EntityTest
  39.  
  40. package net.minecraft.src;
  41.  
  42. public class EntityTest extends EntityMob
  43. {
  44. public EntityTest(World par1World)
  45. {
  46. super(par1World);
  47. this.texture = "/mob/Mayoneza.png";
  48. this.moveSpeed = 10.4f;
  49. isImmuneToFire = false;
  50. this.tasks.addTask(0, new EntityAISwimming(this));
  51. this.tasks.addTask(1, new EntityAIAttackOnCollide(this, EntityPlayer.class, this.moveSpeed, false));
  52. this.tasks.addTask(2, new EntityAIMoveTwardsRestriction(this, this.moveSpeed));
  53. this.tasks.addTask(3, new EntityAIWander(this, this.moveSpeed));
  54. this.tasks.addTask(4, new EntityAILookIdle(this));
  55. this.targetTasks.addTask(0, new EntityAIHurtByTarget(this, false));
  56. this.targetTasks.addTask(1, new EntityAINearestAttackableTarget(this, EntityPlayer.class, 25.0F, 0, true));
  57.  
  58. }
  59.  
  60. public int func_82193_c(Entity par1Entity)
  61. {
  62. return 4;
  63. }
  64.  
  65. protected void fall(float par1) {}
  66. public int getMaxHealth()
  67. {
  68. return 10;
  69. }
  70.  
  71. protected String getLivingSound()
  72. {
  73. return "mob.pig.say";
  74. }
  75.  
  76. protected String getHurtSound()
  77. {
  78. return "mob.pig.say";
  79. }
  80.  
  81. protected String getDeathSound()
  82. {
  83. return "mob.pig.death";
  84. }
  85.  
  86. protected int getDropItemId()
  87. {
  88. return Item.diamond.itemID;
  89. }
  90. protected boolean canDespawn()
  91. {
  92. return true;
  93. }
  94.  
  95. protected boolean isAIEnabled()
  96. {
  97. return true;
  98. }
  99. }
Advertisement
Add Comment
Please, Sign In to add comment