Guest User

Untitled

a guest
Jun 22nd, 2015
111
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
Java 1.62 KB | None | 0 0
  1. public class EntityDataSwordman extends EntityDataGeneric {
  2.  
  3.     public EntityDataSwordman(World world) {
  4.         super(world);
  5.        
  6.         Minecraft.getMinecraft().thePlayer.sendChatMessage("Constructing swordman at World#isRemote:" + world.isRemote);
  7.        
  8.         this.tasks.addTask(0, new EntityAISwimming(this));
  9.         this.tasks.addTask(2, new EntityAIAttackOnCollide(this, EntityMob.class, 1.0D, false));
  10.         this.tasks.addTask(6, new EntityAIMoveThroughVillage(this, 1.0D, false));
  11.         this.tasks.addTask(7, new EntityAIWander(this, 1.0D));
  12.         this.tasks.addTask(8, new EntityAIWatchClosest(this, EntityMob.class, 8.0F));
  13.         this.tasks.addTask(8, new EntityAILookIdle(this));
  14.        
  15.         this.setCurrentItemOrArmor(0, new ItemStack(Items.iron_sword));
  16.        
  17.         this.setCustomNameTag("Data Swordsman");
  18.         this.setAlwaysRenderNameTag(true);
  19.         this.setVelocity(0, 2, 0);
  20.        
  21.         // this.getEntityAttribute(SharedMonsterAttributes.attackDamage).setBaseValue(5);
  22.         this.getEntityAttribute(SharedMonsterAttributes.maxHealth).setBaseValue(20);
  23.         this.getEntityAttribute(SharedMonsterAttributes.movementSpeed).setBaseValue(1);
  24.     }
  25.    
  26.     @Override
  27.     public void applyEntityAttributes() {
  28.         super.applyEntityAttributes();
  29.     }
  30.    
  31.     @Override
  32.     public void entityInit() {
  33.         super.entityInit();
  34.     }
  35.    
  36.     @Override
  37.     public void readEntityFromNBT(NBTTagCompound p_70037_1_) {
  38.         // TODO Auto-generated method stub
  39.         super.readEntityFromNBT(p_70037_1_);
  40.     }
  41.  
  42.     @Override
  43.     public void writeEntityToNBT(NBTTagCompound p_70014_1_) {
  44.         // TODO Auto-generated method stub
  45.         super.writeEntityToNBT(p_70014_1_);
  46.     }
  47.  
  48. }
Advertisement
Add Comment
Please, Sign In to add comment