Package net.minecraft.util

Examples of net.minecraft.util.AxisAlignedBB


    if(minecart.riddenByEntity != null)
    {
      return;
    }
   
    AxisAlignedBB bb = AxisAlignedBB.getBoundingBox(
        x - MFRConfig.passengerRailSearchMaxHorizontal.getInt(),
        y - MFRConfig.passengerRailSearchMaxVertical.getInt(),
        z - MFRConfig.passengerRailSearchMaxHorizontal.getInt(),
        x + MFRConfig.passengerRailSearchMaxHorizontal.getInt() + 1,
        y + MFRConfig.passengerRailSearchMaxVertical.getInt() + 1,
View Full Code Here


  }

  @SuppressWarnings({ "unchecked", "rawtypes" })
  protected void addCollidingBlockToList_do(World world, int x, int y, int z, AxisAlignedBB aabb, List blockList, Entity e)
  {
    AxisAlignedBB newAABB = this.getCollisionBoundingBoxFromPool(world, x, y, z);

    if (newAABB != null && aabb.intersectsWith(newAABB))
    {
      blockList.add(newAABB);
    }
View Full Code Here

      Entity entity = (Entity)list.get(i);
     
      if(entity.canBeCollidedWith())
      {
        double entitySize = entity.getCollisionBorderSize();
        AxisAlignedBB axisalignedbb = entity.boundingBox.expand(entitySize, entitySize, entitySize);
        MovingObjectPosition movingobjectposition = axisalignedbb.calculateIntercept(playerPos, playerLookRel);
       
        if(axisalignedbb.isVecInside(playerPos))
        {
          if(0.0D < entityDistTotal || entityDistTotal == 0.0D)
          {
            pointedEntity = entity;
            entityDistTotal = 0.0D;
View Full Code Here

      Entity entity = (Entity)list.get(i);
     
      if(entity.canBeCollidedWith())
      {
        double entitySize = entity.getCollisionBorderSize();
        AxisAlignedBB axisalignedbb = entity.boundingBox.expand(entitySize, entitySize, entitySize);
        MovingObjectPosition movingobjectposition = axisalignedbb.calculateIntercept(playerPos, playerLookRel);
       
        if(axisalignedbb.isVecInside(playerPos))
        {
          if(0.0D < entityDistTotal || entityDistTotal == 0.0D)
          {
            pointedEntity = entity;
            entityDistTotal = 0.0D;
View Full Code Here

    World world = Minecraft.getMinecraft().theWorld;
    Block block = world.getBlock(pos.posX, pos.posY, pos.posZ);
    drawWireframe : {
      if(block != null) {
        AxisAlignedBB axis;

        if(block instanceof IWireframeAABBProvider)
          axis = ((IWireframeAABBProvider) block).getWireframeAABB(world, pos.posX, pos.posY, pos.posZ);
        else axis = block.getSelectedBoundingBoxFromPool(world, pos.posX, pos.posY, pos.posZ);
View Full Code Here

    if(ticksOpen > 60) {
      ticksSinceLastItem++;
      if(ConfigHandler.elfPortalParticlesEnabled)
        blockParticle(meta);

      AxisAlignedBB aabb = getPortalAABB();
      List<EntityItem> items = worldObj.getEntitiesWithinAABB(EntityItem.class, aabb);
      if(!worldObj.isRemote)
        for(EntityItem item : items) {
          if(item.isDead)
            continue;
View Full Code Here

    return false;
  }

  AxisAlignedBB getPortalAABB() {
    AxisAlignedBB aabb = AxisAlignedBB.getBoundingBox(xCoord - 1, yCoord + 1, zCoord, xCoord + 2, yCoord + 4, zCoord + 1);
    if(getBlockMetadata() == 2)
      aabb = AxisAlignedBB.getBoundingBox(xCoord, yCoord + 1, zCoord - 1, xCoord + 1, yCoord + 4, zCoord + 2);

    return aabb;
  }
View Full Code Here

  @Override
  public boolean bindTo(EntityPlayer player, ItemStack wand, int x, int y, int z, int side) {
    Vector3 thisVec = Vector3.fromTileEntityCenter(this);
    Vector3 blockVec = new Vector3(x + 0.5, y + 0.5, z + 0.5);

    AxisAlignedBB axis = player.worldObj.getBlock(x, y, z).getCollisionBoundingBoxFromPool(player.worldObj, x, y, z);
    if(axis == null)
      axis = AxisAlignedBB.getBoundingBox(x, y, z, x + 1, y + 1, z + 1);

    if(!blockVec.isInside(axis))
      blockVec = new Vector3(axis.minX + (axis.maxX - axis.minX) / 2, axis.minY + (axis.maxY - axis.minY) / 2, axis.minZ + (axis.maxZ - axis.minZ) / 2);
View Full Code Here

  }

  @Override
  public void updateBurst(IManaBurst burst, ItemStack stack) {
    EntityThrowable entity = (EntityThrowable) burst;
    AxisAlignedBB axis = AxisAlignedBB.getBoundingBox(entity.posX, entity.posY, entity.posZ, entity.lastTickPosX, entity.lastTickPosY, entity.lastTickPosZ).expand(1, 1, 1);
    List<EntityLivingBase> entities = entity.worldObj.getEntitiesWithinAABB(EntityLivingBase.class, axis);
    String attacker = ItemNBTHelper.getString(burst.getSourceLens(), TAG_ATTACKER_USERNAME, "");

    for(EntityLivingBase living : entities) {
      if(living instanceof EntityPlayer && (((EntityPlayer) living).getCommandSenderName().equals(attacker) || MinecraftServer.getServer() != null && !MinecraftServer.getServer().isPVPEnabled()))
View Full Code Here

      burst.setColor(getLensColor(stack));

    boolean magnetized = entity.getEntityData().hasKey("Botania:Magnetized");
    switch(stack.getItemDamage()) {
    case DAMAGE : {
      AxisAlignedBB axis = AxisAlignedBB.getBoundingBox(entity.posX, entity.posY, entity.posZ, entity.lastTickPosX, entity.lastTickPosY, entity.lastTickPosZ).expand(1, 1, 1);
      List<EntityLivingBase> entities = entity.worldObj.getEntitiesWithinAABB(EntityLivingBase.class, axis);
      for(EntityLivingBase living : entities) {
        if(living instanceof EntityPlayer)
          continue;
View Full Code Here

TOP

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