Advertisement
Creepinson

Untitled

Jun 20th, 2017
364
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
text 3.88 KB | None | 0 0
  1. package me.creepinson.entities;
  2.  
  3. import me.creepinson.entities.ai.EntityAIAttackMelee;
  4. import net.minecraft.entity.Entity;
  5. import net.minecraft.entity.EntityCreature;
  6. import net.minecraft.entity.EntityLiving;
  7. import net.minecraft.entity.SharedMonsterAttributes;
  8. import net.minecraft.entity.ai.EntityAIAttackOnCollide;
  9. import net.minecraft.entity.ai.EntityAIHurtByTarget;
  10. import net.minecraft.entity.ai.EntityAILeapAtTarget;
  11. import net.minecraft.entity.ai.EntityAILookIdle;
  12. import net.minecraft.entity.ai.EntityAINearestAttackableTarget;
  13. import net.minecraft.entity.ai.EntityAISwimming;
  14. import net.minecraft.entity.ai.EntityAIWander;
  15. import net.minecraft.entity.effect.EntityLightningBolt;
  16. import net.minecraft.entity.player.EntityPlayer;
  17. import net.minecraft.item.Item;
  18. import net.minecraft.util.DamageSource;
  19. import net.minecraft.world.World;
  20. import obsidianAPI.animation.wrapper.IEntityAnimated;
  21.  
  22. public class EntityCreepino extends EntityCreature implements IEntityAnimated
  23. {
  24. World world = null;
  25. public EntityCreepino(World var1)
  26. {
  27. super(var1);
  28. world = var1;
  29. experienceValue = 8;
  30. this.isImmuneToFire = false;
  31.  
  32. this.targetTasks.addTask(6, new EntityAIHurtByTarget(this, false));
  33. this.tasks.addTask(2, new EntityAIWander(this, 0.8D));
  34. this.tasks.addTask(2, new EntityAILookIdle(this));
  35. this.tasks.addTask(1, new EntityAISwimming(this));
  36. this.tasks.addTask(6, new EntityAIAttackMelee(this, 1.0D, false));
  37. this.tasks.addTask(6, new EntityAILeapAtTarget(this, 0.8F));
  38.  
  39. }
  40.  
  41.  
  42.  
  43. protected void applyEntityAttributes(){
  44. super.applyEntityAttributes();
  45. this.getEntityAttribute(SharedMonsterAttributes.movementSpeed).setBaseValue(0.15D);
  46. this.getEntityAttribute(SharedMonsterAttributes.maxHealth).setBaseValue(14D);
  47. if(this.getEntityAttribute(SharedMonsterAttributes.attackDamage)!=null)this.getEntityAttribute(SharedMonsterAttributes.attackDamage).setBaseValue(3D);
  48. }
  49.  
  50.  
  51.  
  52. @Override
  53. public boolean isMoving() {
  54. return limbSwingAmount > 0.02F;
  55. }
  56.  
  57.  
  58.  
  59.  
  60. public boolean isAIEnabled()
  61. {
  62. return true;
  63. }
  64.  
  65. @Override
  66. protected Item getDropItem()
  67. {
  68. return null;
  69. }
  70.  
  71. /**
  72. * Returns the sound this mob makes while it's alive.
  73. */
  74. protected String getLivingSound()
  75. {
  76. return "meepersplus:creepino.screech";
  77. }
  78.  
  79. /**
  80. * Returns the sound this mob makes when it is hurt.
  81. */
  82. protected String getHurtSound()
  83. {
  84. return "meepersplus:creepino.hurt";
  85. }
  86.  
  87. /**
  88. * Returns the sound this mob makes on death.
  89. */
  90. protected String getDeathSound()
  91. {
  92. return "meepersplus:creepino.death";
  93. }
  94.  
  95. public void onStruckByLightning(EntityLightningBolt entityLightningBolt){
  96. super.onStruckByLightning(entityLightningBolt);
  97. int i = (int)this.posX;
  98. int j = (int)this.posY;
  99. int k = (int)this.posZ;
  100. Entity entity = this;
  101.  
  102. if(true){
  103.  
  104. motionY = 5.0D;
  105. motionY = 0.0D;
  106. }
  107.  
  108. }
  109.  
  110. protected void fall(float l){
  111. super.fall(l);
  112. int i = (int)this.posX;
  113. int j = (int)this.posY;
  114. int k = (int)this.posZ;
  115. super.fall(l);
  116. Entity entity = this;
  117.  
  118. }
  119.  
  120. public void onDeath(DamageSource dsource) {
  121. super.onDeath(dsource);
  122. int i = (int)this.posX;
  123. int j = (int)this.posY;
  124. int k = (int)this.posZ;
  125. Entity entity = this;
  126.  
  127. }
  128.  
  129. public void onKillEntity(EntityLiving entityLiving){
  130. super.onKillEntity(entityLiving);
  131. int i = (int)this.posX;
  132. int j = (int)this.posY;
  133. int k = (int)this.posZ;
  134. Entity entity = this;
  135.  
  136. }
  137.  
  138. public boolean interact(EntityPlayer entity){
  139. super.interact(entity);
  140. int i = (int)this.posX;
  141. int j = (int)this.posY;
  142. int k = (int)this.posZ;
  143.  
  144.  
  145. return true;
  146. }
  147.  
  148. public String getEntityName(){
  149. return "creepino";
  150. }
  151.  
  152.  
  153.  
  154.  
  155. }
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement