Advertisement
Guest User

Untitled

a guest
Jul 21st, 2017
186
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
Java 1.46 KB | None | 0 0
  1. /*package net.minecraft.src;
  2.  
  3. import java.util.List;
  4. import java.util.Random;
  5.  
  6. public class EntityFriend extends EntityLiving
  7. {
  8. /* not done at all so dont worry if you feel the need to edit it go ahead <3 Justin*/
  9.     /*public EntityFriend(World world)
  10.     {
  11.         super(world);
  12.         randomSoundDelay = 0;
  13.         texture = "/mob/pigman.png";
  14.         moveSpeed = 0.5F;
  15.         attackStrength = 5;
  16.         isImmuneToFire = true;
  17.     }
  18.     public void onUpdate()
  19.     {
  20.         super.onUpdate();
  21.        
  22.        
  23.         for(int i = 0; i < worldObj.loadedEntityList.size(); i++)
  24.         {
  25.             Entity entity1 = (Entity)worldObj.loadedEntityList.get(i);
  26.            
  27.            
  28.             if(!(entity1 instanceof EntityPlayer))
  29.             {
  30.                 continue;
  31.             }
  32.            
  33.            
  34.             double d2 = entity1.getDistance(posX, posY, posZ);
  35.             EntityFriend friend = (EntityFriend)entity1;
  36.             if((d2 < 16) && friend.canEntityBeSeen(this) && friend.playerToAttack == null)
  37.             {
  38.                 friend.playerToAttack = this;
  39.             }
  40.         }
  41.     }
  42.  
  43.     protected int getDropItemId()
  44.     {
  45.         return 0;
  46.     }
  47.  
  48.     public ItemStack getHeldItem()
  49.     {
  50.         return defaultHeldItem;
  51.     }
  52.  
  53.     private int randomSoundDelay;
  54.     private static final ItemStack defaultHeldItem;
  55.  
  56.     static
  57.     {
  58.         defaultHeldItem = new ItemStack(Item.sword, 1);
  59.     }
  60. }
  61. */
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement