Advertisement
Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- package me.creepinson.entities;
- import me.creepinson.entities.ai.EntityAIAttackMelee;
- import net.minecraft.entity.Entity;
- import net.minecraft.entity.EntityCreature;
- import net.minecraft.entity.EntityLiving;
- import net.minecraft.entity.SharedMonsterAttributes;
- import net.minecraft.entity.ai.EntityAIAttackOnCollide;
- import net.minecraft.entity.ai.EntityAIHurtByTarget;
- import net.minecraft.entity.ai.EntityAILeapAtTarget;
- import net.minecraft.entity.ai.EntityAILookIdle;
- import net.minecraft.entity.ai.EntityAINearestAttackableTarget;
- import net.minecraft.entity.ai.EntityAISwimming;
- import net.minecraft.entity.ai.EntityAIWander;
- import net.minecraft.entity.effect.EntityLightningBolt;
- import net.minecraft.entity.player.EntityPlayer;
- import net.minecraft.item.Item;
- import net.minecraft.util.DamageSource;
- import net.minecraft.world.World;
- import obsidianAPI.animation.wrapper.IEntityAnimated;
- public class EntityCreepino extends EntityCreature implements IEntityAnimated
- {
- World world = null;
- public EntityCreepino(World var1)
- {
- super(var1);
- world = var1;
- experienceValue = 8;
- this.isImmuneToFire = false;
- this.targetTasks.addTask(6, new EntityAIHurtByTarget(this, false));
- this.tasks.addTask(2, new EntityAIWander(this, 0.8D));
- this.tasks.addTask(2, new EntityAILookIdle(this));
- this.tasks.addTask(1, new EntityAISwimming(this));
- this.tasks.addTask(6, new EntityAIAttackMelee(this, 1.0D, false));
- this.tasks.addTask(6, new EntityAILeapAtTarget(this, 0.8F));
- }
- protected void applyEntityAttributes(){
- super.applyEntityAttributes();
- this.getEntityAttribute(SharedMonsterAttributes.movementSpeed).setBaseValue(0.15D);
- this.getEntityAttribute(SharedMonsterAttributes.maxHealth).setBaseValue(14D);
- if(this.getEntityAttribute(SharedMonsterAttributes.attackDamage)!=null)this.getEntityAttribute(SharedMonsterAttributes.attackDamage).setBaseValue(3D);
- }
- @Override
- public boolean isMoving() {
- return limbSwingAmount > 0.02F;
- }
- public boolean isAIEnabled()
- {
- return true;
- }
- @Override
- protected Item getDropItem()
- {
- return null;
- }
- /**
- * Returns the sound this mob makes while it's alive.
- */
- protected String getLivingSound()
- {
- return "meepersplus:creepino.screech";
- }
- /**
- * Returns the sound this mob makes when it is hurt.
- */
- protected String getHurtSound()
- {
- return "meepersplus:creepino.hurt";
- }
- /**
- * Returns the sound this mob makes on death.
- */
- protected String getDeathSound()
- {
- return "meepersplus:creepino.death";
- }
- public void onStruckByLightning(EntityLightningBolt entityLightningBolt){
- super.onStruckByLightning(entityLightningBolt);
- int i = (int)this.posX;
- int j = (int)this.posY;
- int k = (int)this.posZ;
- Entity entity = this;
- if(true){
- motionY = 5.0D;
- motionY = 0.0D;
- }
- }
- protected void fall(float l){
- super.fall(l);
- int i = (int)this.posX;
- int j = (int)this.posY;
- int k = (int)this.posZ;
- super.fall(l);
- Entity entity = this;
- }
- public void onDeath(DamageSource dsource) {
- super.onDeath(dsource);
- int i = (int)this.posX;
- int j = (int)this.posY;
- int k = (int)this.posZ;
- Entity entity = this;
- }
- public void onKillEntity(EntityLiving entityLiving){
- super.onKillEntity(entityLiving);
- int i = (int)this.posX;
- int j = (int)this.posY;
- int k = (int)this.posZ;
- Entity entity = this;
- }
- public boolean interact(EntityPlayer entity){
- super.interact(entity);
- int i = (int)this.posX;
- int j = (int)this.posY;
- int k = (int)this.posZ;
- return true;
- }
- public String getEntityName(){
- return "creepino";
- }
- }
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement