Package net.minecraft.server.v1_7_R1

Examples of net.minecraft.server.v1_7_R1.AxisAlignedBB


    for(int i = 0; i < this.m_nodes.length; i++)
    {
      BlockNode node = this.m_nodes[i];
      points[i] = new PathPoint(node.getX(), node.getZ(), node.getZ());
    }
    return new PathEntity(points);
  }
View Full Code Here


  {
    PathPoint[] points = new PathPoint[this.m_nodes.length];
    for(int i = 0; i < this.m_nodes.length; i++)
    {
      BlockNode node = this.m_nodes[i];
      points[i] = new PathPoint(node.getX(), node.getZ(), node.getZ());
    }
    return new PathEntity(points);
  }
View Full Code Here

        }
      }

      if(this.m_friend == null)
      {
        Vec3D vec = RandomPositionGenerator.a(this.m_villager, 16, 3);

        if(vec == null)
          return false;

        Vec3D.a.release(vec);
View Full Code Here

      if(this.m_villager.e(this.m_friend) > 4)
        this.getRemoteEntity().move((LivingEntity)this.m_friend.getBukkitEntity(), (this.m_speed == -1 ? this.getRemoteEntity().getSpeed() : this.m_speed));
    }
    else if(this.getNavigation().g())
    {
      Vec3D vec = RandomPositionGenerator.a(this.m_villager, 16, 3);

      if(vec == null)
        return true;

      this.getRemoteEntity().move(new Location(this.getRemoteEntity().getBukkitEntity().getWorld(), vec.c, vec.d, vec.e), (this.m_speed == -1 ? this.getRemoteEntity().getSpeed() : this.m_speed));
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
      {
        this.m_x = vec.c;
View Full Code Here

      return false;
    else if(this.m_target.e(this.getEntityHandle()) > this.m_minDistanceSquared)
      return false;
    else
    {
      Vec3D vec = RandomPositionGenerator.a(this.getEntityHandle(), 16, 7, this.getEntityHandle().world.getVec3DPool().create(this.m_target.locX, this.m_target.locY, this.m_target.locZ));

      if(vec == null)
        return false;
      else
      {
View Full Code Here

  {
    if(this.getEntityHandle() == null || (this.getEntityHandle().getLastDamager() == null && !this.getEntityHandle().isBurning()))
      return false;
    else
    {
      Vec3D vec = RandomPositionGenerator.a(this.getEntityHandle(), 5, 4);
      if(vec == null)
        return false;
      else
      {
        this.m_x = vec.c;
View Full Code Here

    if(!WorldUtilities.isInCircle(this.m_midSpot.getX(), this.m_midSpot.getZ(), handle.getLocation().getX(), handle.getLocation().getZ(), this.m_Radius) || super.shouldExecute())
    {
      int tries = 0;
      while(!WorldUtilities.isInCircle(this.m_midSpot.getX(), this.m_midSpot.getZ(), this.m_xPos, this.m_zPos, this.m_Radius) && tries <= 10)
      {
        Vec3D vector = RandomPositionGenerator.a(this.getEntityHandle(), 10, 7);
        if(vector != null)
        {
          this.m_xPos = vector.c;
          this.m_yPos = vector.d;
          this.m_zPos = vector.e;
View Full Code Here

      return false;
    else if(this.getEntityHandle() instanceof EntityTameableAnimal && ((EntityTameableAnimal)this.getEntityHandle()).isSitting())
      return false;
    else
    {
      Vec3D vector = RandomPositionGenerator.a(this.getEntityHandle(), 10, 7);
      if(vector == null)
        return false;
      else
      {
        this.m_xPos = vector.c;
View Full Code Here

    try{
      // TODO: Probably check other ids too before doing this ?
     
      final net.minecraft.server.v1_7_R2.Entity mcEntity  = ((CraftEntity) entity).getHandle();
     
      final AxisAlignedBB box = useBox.b(minX, minY, minZ, maxX, maxY, maxZ);
      @SuppressWarnings("rawtypes")
      final List list = world.getEntities(mcEntity, box);
      @SuppressWarnings("rawtypes")
      final Iterator iterator = list.iterator();
      while (iterator.hasNext()) {
        final net.minecraft.server.v1_7_R2.Entity other = (net.minecraft.server.v1_7_R2.Entity) iterator.next();
        if (!(other instanceof EntityBoat)){ // && !(other instanceof EntityMinecart)) continue;
          continue;
        }
        if (minY >= other.locY && minY - other.locY <= 0.7){
          return true;
        }
        // Still check this for some reason.
        final AxisAlignedBB otherBox = other.boundingBox;
        if (box.a > otherBox.d || box.d < otherBox.a || box.b > otherBox.e || box.e < otherBox.b || box.c > otherBox.f || box.f < otherBox.c) continue;
        else {
          return true;
        }
      }
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.