Package net.minecraft.util

Examples of net.minecraft.util.AxisAlignedBB.expand()


    {
      IBiometricIdentifier biometricIdentifier = this.getBiometricIdentifier();

      AxisAlignedBB emptyBounds = AxisAlignedBB.getBoundingBox(this.xCoord, this.yCoord, this.zCoord, this.xCoord + 1, this.yCoord + 1, this.zCoord + 1);

      List<EntityLivingBase> warningList = this.worldObj.getEntitiesWithinAABB(EntityLivingBase.class, emptyBounds.expand(getWarningRange(), getWarningRange(), getWarningRange()));
      List<EntityLivingBase> actionList = this.worldObj.getEntitiesWithinAABB(EntityLivingBase.class, emptyBounds.expand(getActionRange(), getActionRange(), getActionRange()));

      for (EntityLivingBase entityLiving : warningList)
      {
        if (entityLiving instanceof EntityPlayer && !actionList.contains(entityLiving))
View Full Code Here


      IBiometricIdentifier biometricIdentifier = this.getBiometricIdentifier();

      AxisAlignedBB emptyBounds = AxisAlignedBB.getBoundingBox(this.xCoord, this.yCoord, this.zCoord, this.xCoord + 1, this.yCoord + 1, this.zCoord + 1);

      List<EntityLivingBase> warningList = this.worldObj.getEntitiesWithinAABB(EntityLivingBase.class, emptyBounds.expand(getWarningRange(), getWarningRange(), getWarningRange()));
      List<EntityLivingBase> actionList = this.worldObj.getEntitiesWithinAABB(EntityLivingBase.class, emptyBounds.expand(getActionRange(), getActionRange(), getActionRange()));

      for (EntityLivingBase entityLiving : warningList)
      {
        if (entityLiving instanceof EntityPlayer && !actionList.contains(entityLiving))
        {
View Full Code Here

  private void doHoover() {

    BoundingBox bb = new BoundingBox(getLocation());
    AxisAlignedBB aabb = AxisAlignedBB.getBoundingBox(bb.minX, bb.minY, bb.minZ, bb.maxX, bb.maxY, bb.maxZ);
    aabb = aabb.expand(RANGE, RANGE, RANGE);
    List<EntityItem> interestingItems = worldObj.selectEntitiesWithinAABB(EntityItem.class, aabb, this);

    for (EntityItem entity : interestingItems) {
      double x = (xCoord + 0.5D - entity.posX);
      double y = (yCoord + 0.5D - entity.posY);
View Full Code Here

      switch (rayTraceResult.hitPart) {
      case Gate:
      case Plug:
      case RobotStation: {
        float scale = 0.001F;
        box = box.expand(scale, scale, scale);
        break;
      }
      case Pipe: {
        float scale = 0.08F;
        box = box.expand(scale, scale, scale);
View Full Code Here

        box = box.expand(scale, scale, scale);
        break;
      }
      case Pipe: {
        float scale = 0.08F;
        box = box.expand(scale, scale, scale);
        break;
      }
      case Facade:
        break;
      }
View Full Code Here

        return box;
    }

    public static <T extends Entity> List<T> getNearbyEntities(World world, Class<T> entityClass, float x, float minY, float maxY, float z, float radius) {
        AxisAlignedBB box = AxisAlignedBB.getBoundingBox(x, minY, z, x + 1, maxY, z + 1);
        box = box.expand(radius, 0, radius);
        return (List<T>) world.getEntitiesWithinAABB(entityClass, box);
    }

    public static <T extends Entity> List<T> getEntitiesAt(World world, Class<T> entityClass, int x, int y, int z) {
        AxisAlignedBB box = AxisAlignedBB.getBoundingBox(x, y, z, x + 1, y + 1, z + 1);
View Full Code Here

    @Override
    public void onMinecartPass(EntityMinecart cart) {
        if (powered && cart.canBeRidden() && cart.riddenByEntity == null && cart.getEntityData().getInteger("MountPrevention") <= 0) {
            int a = area;
            AxisAlignedBB box = AxisAlignedBB.getBoundingBox(getX(), getY(), getZ(), getX() + 1, getY() + 1, getZ() + 1);
            box = box.expand(a, a, a);
            List entities = getWorld().getEntitiesWithinAABB(EntityLivingBase.class, box);

            if (entities.size() > 0) {
                EntityLivingBase entity = (EntityLivingBase) entities.get(MiscTools.getRand().nextInt(entities.size()));
View Full Code Here

        feedTime--;
        if (!powered && feed != null && feed.stackSize > 0 && feedTime <= 0) {
            feedTime = MIN_FEED_INTERVAL + rand.nextInt(FEED_VARIANCE);

            AxisAlignedBB box = AxisAlignedBB.getBoundingBox(xCoord, yCoord - 1, zCoord, xCoord + 1, yCoord + 3, zCoord + 1);
            box = box.expand(AREA, 0, AREA);
            List<EntityAnimal> animals = (List<EntityAnimal>) worldObj.getEntitiesWithinAABB(EntityAnimal.class, box);

            for (EntityAnimal target : animals) {
                if (target.isBreedingItem(getStackInSlot(0)) && feedAnimal(target)) {
                    if (feedCounter <= 0) {
View Full Code Here

      switch (rayTraceResult.hitPart) {
      case Gate:
      case Plug:
      case RobotStation: {
        float scale = 0.001F;
        box = box.expand(scale, scale, scale);
        break;
      }
      case Pipe: {
        float scale = 0.08F;
        box = box.expand(scale, scale, scale);
View Full Code Here

        box = box.expand(scale, scale, scale);
        break;
      }
      case Pipe: {
        float scale = 0.08F;
        box = box.expand(scale, scale, scale);
        break;
      }
      case Facade:
        break;
      }
View Full Code Here

TOP
Copyright © 2018 www.massapi.com. 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.