Package net.minecraft.src

Examples of net.minecraft.src.AxisAlignedBB


   }

   public static int removeItemDrops(Player player, int radius) {
      Coordinate pos = player.getPosition();
      World world = player.getWorld().getMinecraftWorld();
      AxisAlignedBB boundingBox = AxisAlignedBB.getBoundingBox(
               pos.getX() - radius, pos.getY() - radius, pos.getZ() - radius,
               pos.getX() + radius, pos.getY() + radius, pos.getZ() + radius
      );
      List<?> nearbyEntities = world.getEntitiesWithinAABBExcludingEntity(
               player.getMinecraftPlayer(), boundingBox
View Full Code Here


            {
               this.setPlayerLocation(lastPosX, lastPosY, lastPosZ, var11, var12);
               return;
            }

            AxisAlignedBB var33 = this.playerEntity.boundingBox.copy().expand(var27, var27, var27).addCoord(0.0D, -0.55D, 0.0D);

            if (!this.mcServer.isFlightAllowed() && !this.playerEntity.theItemInWorldManager.isCreative() && !var2.checkBlockCollision(var33))
            {
               if (var29 >= -0.03125D)
               {
View Full Code Here

            if(!entity1.canBeCollidedWith() || entity1.isEntityEqual(shootingEntity) && ticksInAir < 25)
            {
                continue;
            }
            float f2 = 0.3F;
            AxisAlignedBB axisalignedbb = entity1.boundingBox.expand(f2, f2, f2);
            MovingObjectPosition movingobjectposition1 = axisalignedbb.calculateIntercept(vec3d, vec3d1);
            if(movingobjectposition1 == null)
            {
                continue;
            }
            double d1 = vec3d.distanceTo(movingobjectposition1.hitVec);
View Full Code Here

      prevRotationPitch = rotationPitch = (float) ((Math.atan2(motionY, f) * 180D) / 3.1415927410125732D);
    }
    int i = worldObj.getBlockId(xTile, yTile, zTile);
    if (i > 0) {
      Block.blocksList[i].setBlockBoundsBasedOnState(worldObj, xTile, yTile, zTile);
      AxisAlignedBB axisalignedbb = Block.blocksList[i].getCollisionBoundingBoxFromPool(
          worldObj, xTile, yTile, zTile);
      if (axisalignedbb != null
          && axisalignedbb.isVecInside(Vec3D.createVector(posX, posY, posZ))) {
        inGround = true;
      }
    }
    if (arrowShake > 0) {
      arrowShake--;
    }
    if (inGround) {
      int j = worldObj.getBlockId(xTile, yTile, zTile);
      int k = worldObj.getBlockMetadata(xTile, yTile, zTile);
      if (j != inTile || k != inData) {
        inGround = false;
        motionX *= rand.nextFloat() * 0.2F;
        motionY *= rand.nextFloat() * 0.2F;
        motionZ *= rand.nextFloat() * 0.2F;
        ticksInGround = 0;
        ticksInAir = 0;
        return;
      }
      ticksInGround++;
      if (ticksInGround == 1200) {
        setDead();
      }
      return;
    }
    ticksInAir++;
    Vec3D vec3d = Vec3D.createVector(posX, posY, posZ);
    Vec3D vec3d1 = Vec3D.createVector(posX + motionX, posY + motionY, posZ + motionZ);
    MovingObjectPosition movingobjectposition = worldObj.rayTraceBlocks_do_do(vec3d, vec3d1,
        false, true);
    vec3d = Vec3D.createVector(posX, posY, posZ);
    vec3d1 = Vec3D.createVector(posX + motionX, posY + motionY, posZ + motionZ);
    if (movingobjectposition != null) {
      vec3d1 = Vec3D.createVector(movingobjectposition.hitVec.xCoord,
          movingobjectposition.hitVec.yCoord, movingobjectposition.hitVec.zCoord);
    }
    Entity entity = null;
    List list = worldObj.getEntitiesWithinAABBExcludingEntity(this,
        boundingBox.addCoord(motionX, motionY, motionZ).expand(1.0D, 1.0D, 1.0D));
    double d = 0.0D;
    for (int l = 0; l < list.size(); l++) {
      Entity entity1 = (Entity) list.get(l);
      if (!entity1.canBeCollidedWith() || entity1 == shootingEntity && ticksInAir < 5) {
        continue;
      }
      float f5 = 0.3F;
      AxisAlignedBB axisalignedbb1 = entity1.boundingBox.expand(f5, f5, f5);
      MovingObjectPosition movingobjectposition1 = axisalignedbb1.calculateIntercept(vec3d,
          vec3d1);
      if (movingobjectposition1 == null) {
        continue;
      }
      double d1 = vec3d.distanceTo(movingobjectposition1.hitVec);
View Full Code Here

TOP

Related Classes of net.minecraft.src.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.