Guest User

Untitled

a guest
May 15th, 2020
13
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
  1. public class EntityMrSkelly extends EntitySkeleton
  2. {
  3. protected float maxDistanceForPlayer;
  4.  
  5. public EntityMrSkelly (World worldin)
  6. {
  7. super(worldin);
  8. this.setSize(1F, 2F);
  9. this.isImmuneToFire = true;
  10. this.maxDistanceForPlayer = 10.0F;
  11. }
  12.  
  13. protected void applyEntityAttributes()
  14. {
  15. super.applyEntityAttributes();
  16. this.getEntityAttribute(SharedMonsterAttributes.MOVEMENT_SPEED).setBaseValue(1.0D);
  17. this.getEntityAttribute(SharedMonsterAttributes.FOLLOW_RANGE).setBaseValue(20);
  18. this.getEntityAttribute(SharedMonsterAttributes.MAX_HEALTH).setBaseValue(100.0D);
  19. this.getEntityAttribute(SharedMonsterAttributes.KNOCKBACK_RESISTANCE).setBaseValue(1.0);
  20. }
  21.  
  22. protected void entityInit()
  23. {
  24. super.entityInit();
  25. }
  26.  
  27. protected void initEntityAI()
  28. {
  29. this.tasks.addTask(1, new EntityAISwimming(this));
  30. this.tasks.addTask(2, new EntityAIWanderAvoidWater(this, 0.5D));
  31. }
  32.  
  33.  
  34. @Override
  35. public void onUpdate()
  36. {
  37. super.onUpdate();
  38. }
  39. }
RAW Paste Data