Package net.minecraft.server.v1_7_R1

Examples of net.minecraft.server.v1_7_R1.Block


  }

  @Override
  public boolean update()
  {
    EntityLiving entity = this.getEntityHandle();
    NMSUtil.getControllerLook(this.getEntityHandle()).a(this.m_target, 30, 30);
    double minDist = entity.width * entity.width * 4;
    double dist = entity.e(this.m_target.locX, this.m_target.boundingBox.b, this.m_target.locZ);
    float speed = 0.23F;

    if(dist > minDist && dist < 16)
      speed = 0.4F;
    else if(dist < 255)
View Full Code Here


    if(!this.isTamed())
      return false;
    else
    {
      EntityLiving owner = this.getTamer();
      if(owner == null)
        return false;
      else
      {
        this.m_ownerAttacker = owner.getLastDamager();
        int lastAttackedTick = owner.aK();
        return lastAttackedTick != this.m_lastAttackedTick && this.isSuitableTarget(this.m_ownerAttacker, false);
      }
    }
  }
View Full Code Here

   *
   * @param inMotion
   */
  public void ride(float[] inMotion)
  {
    EntityLiving entity = this.m_entity.getHandle();
    if(entity.passenger == null)
      return;

    this.m_entity.setYaw(entity.passenger.yaw);
    this.m_entity.setPitch(entity.passenger.pitch);
View Full Code Here

  public boolean shouldExecute()
  {
    if(this.m_creeper == null)
      return false;

    EntityLiving target = this.m_creeper.getGoalTarget();
    return this.m_creeper.q() > 0 || target != null && this.m_creeper.e(target) < this.m_minDistanceSqr;
  }
View Full Code Here

  public LivingEntity getTarget()
  {
    if(this.m_entity == null)
      return null;

    EntityLiving target = NMSUtil.getGoalTarget(this.m_entity);
    if(target != null)
      return (LivingEntity)target.getBukkitEntity();

    return null;
  }
View Full Code Here

  public void update()
  {
    if(!this.hasPath() || !this.getEntity().isSpawned())
      return;

    EntityLiving entity = this.getEntity().getHandle();
    if(!NMSUtil.getNavigation(this.m_entity.getHandle()).g() || NMSUtil.getControllerMove(this.m_entity.getHandle()).a())
      return;

    BlockNode next = this.m_currentPath.next();
    if(next == null)
View Full Code Here

      return false;
    else if(!this.m_animal.onGround)
      return false;
    else
    {
      EntityLiving owner = this.m_animal.getOwner();
      if(owner == null)
        return true;

      return !(this.m_animal.e(owner) < 144 && NMSUtil.getGoalTarget(owner) != null) && this.m_canSit;
    }
View Full Code Here

  }

  @Override
  public boolean update()
  {
    EntityLiving entity = this.getEntityHandle();
    NMSUtil.getControllerLook(entity).a(this.m_target, 30, 30);
    if(--this.m_moveTick <= 0)
    {
      this.m_moveTick = 4 + entity.aI().nextInt(7);
      this.getRemoteEntity().move((LivingEntity)this.m_target.getBukkitEntity(), this.getRemoteEntity().getSpeed());
    }

    this.m_attackTick = Math.max(this.m_attackTick - 1, 0);
    double minDist = entity.width * 2 * entity.width * 2;
    if(this.m_attackTick <= 0 && entity.e(this.m_target.locX, this.m_target.boundingBox.b, this.m_target.locZ) <= minDist)
    {
      this.m_attackTick = 20;
      if(entity.be() != null)
        this.getEntityHandle().aR();

      this.attack((LivingEntity)this.m_target.getBukkitEntity());
    }
    return true;
View Full Code Here

  @Override
  public boolean update()
  {
    this.m_lookTick--;
    EntityLiving entity = this.getEntityHandle();
    NMSUtil.getControllerLook(entity).a(entity.locX + this.m_xDiff, entity.locY + entity.getHeadHeight(), entity.locZ + this.m_zDiff, 10, NMSUtil.getMaxHeadRotation(entity));
    return true;
  }
View Full Code Here

  }

  @Override
  public boolean update()
  {
    EntityLiving entity = this.getEntityHandle();
    double xDiff = this.m_target.locX - entity.locX;
    double zDiff = this.m_target.locZ - entity.locZ;
    float dist = MathHelper.sqrt(xDiff * xDiff + zDiff * zDiff);

    entity.motX = xDiff / dist * 0.5D * 0.800000011920929D + entity.motX * 0.20000000298023224D;
 
View Full Code Here

TOP

Related Classes of net.minecraft.server.v1_7_R1.Block

Copyright © 2018 www.massapicom. All rights reserved.
All source code are property of their respective owners. Java is a trademark of Sun Microsystems, Inc and owned by ORACLE Inc. Contact coftware#gmail.com.