Package net.minecraft.server.v1_7_R1

Examples of net.minecraft.server.v1_7_R1.AxisAlignedBB


    } else return entityHeight;
  }

  @Override
  public AlmostBoolean isBlockSolid(final int id) {
    final Block block = Block.e(id);
    if (block == null || block.getMaterial() == null) return AlmostBoolean.MAYBE;
    else return AlmostBoolean.match(block.getMaterial().isSolid());
  }
View Full Code Here


    else return AlmostBoolean.match(block.getMaterial().isSolid());
  }

  @Override
  public AlmostBoolean isBlockLiquid(final int id) {
    final Block block = Block.e(id);
    if (block == null || block.getMaterial() == null) return AlmostBoolean.MAYBE;
    else return AlmostBoolean.match(block.getMaterial().isLiquid());
  }
View Full Code Here

  {
    if(this.getEntityHandle() == null || NMSUtil.isInHomeArea(this.getEntityHandle()))
      return false;
    else
    {
      ChunkCoordinates chunkCoords = NMSUtil.getChunkCoordinates(this.getEntityHandle());
      Vec3D vec = RandomPositionGenerator.a(this.getEntityHandle(), 16, 7, this.getEntityHandle().world.getVec3DPool().create(chunkCoords.x, chunkCoords.y, chunkCoords.z));
      if(vec == null)
        return false;
      else
      {
View Full Code Here

    if(this.m_animal.getAge() >= 0)
      return false;
    else
    {
      List animals = this.m_animal.world.a(this.m_animal.getClass(), this.m_animal.boundingBox.grow(8, 4, 8));
      EntityAnimal nearest = null;
      double minDist = Double.MAX_VALUE;
      Iterator it = animals.iterator();
      while(it.hasNext())
      {
        EntityAnimal animal = (EntityAnimal)it.next();
        if(animal.getAge() >= 0)
        {
          double distance = this.m_animal.e(animal);
          if(distance <= minDist)
          {
            minDist = distance;
View Full Code Here

      return false;
    else if(this.getEntityHandle().velocityChanged)
      return false;
    else
    {
      EntityHuman trader = this.m_villager.b();
      if(trader == null)
        return false;

      return this.m_villager.e(trader) <= 16 && trader.activeContainer != null;
    }
View Full Code Here

  }

  @Override
  public boolean isAffected()
  {
    EntityLiving handle = this.m_entity.getHandle();
    return !(handle instanceof EntityAnimal) || ((EntityAnimal)handle).cc();
  }
View Full Code Here

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

    EntityLiving target = NMSUtil.getGoalTarget(this.getEntityHandle());
    if(target == null)
      return false;

    this.m_target = target;
    return false;
View Full Code Here

  }

  @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

TOP

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

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.