Exemplo n.º 1
0
 public void addCollisionBoxesToList(
     World par1World,
     int par2,
     int par3,
     int par4,
     AxisAlignedBB par5AxisAlignedBB,
     List par6List,
     Entity par7Entity) {
   this.setBlockBounds(0.0F, 0.0F, 0.0F, 1.0F, 0.3125F, 1.0F);
   super.addCollisionBoxesToList(
       par1World, par2, par3, par4, par5AxisAlignedBB, par6List, par7Entity);
   float f = 0.03F;
   this.setBlockBounds(0.0F, 0.0F, 0.0F, f, 1.0F, 1.0F);
   super.addCollisionBoxesToList(
       par1World, par2, par3, par4, par5AxisAlignedBB, par6List, par7Entity);
   this.setBlockBounds(0.0F, 0.0F, 0.0F, 1.0F, 1.0F, f);
   super.addCollisionBoxesToList(
       par1World, par2, par3, par4, par5AxisAlignedBB, par6List, par7Entity);
   this.setBlockBounds(1.0F - f, 0.0F, 0.0F, 1.0F, 1.0F, 1.0F);
   super.addCollisionBoxesToList(
       par1World, par2, par3, par4, par5AxisAlignedBB, par6List, par7Entity);
   this.setBlockBounds(0.0F, 0.0F, 1.0F - f, 1.0F, 1.0F, 1.0F);
   super.addCollisionBoxesToList(
       par1World, par2, par3, par4, par5AxisAlignedBB, par6List, par7Entity);
   this.setBlockBoundsForItemRender();
 }
Exemplo n.º 2
0
  @SuppressWarnings("rawtypes")
  @Override
  public void addCollisionBoxesToList(
      World worldIn,
      BlockPos pos,
      IBlockState state,
      AxisAlignedBB mask,
      List list,
      Entity collidingEntity) {
    int meta = getMetaFromState(state);

    if (meta == 2 || meta == 6) {
      this.setBlockBounds(0.0F, 0.0F, 0.0F, 1.0F, 0.2F, 1.0F);
      super.addCollisionBoxesToList(worldIn, pos, state, mask, list, collidingEntity);
    } else if (meta == 0 || meta == 4) {
      this.setBlockBounds(
          0.3F,
          0.0F,
          0.3F,
          0.7F,
          worldIn.getBlockState(pos.up()).getBlock() == this ? 1.0F : 0.6F,
          0.7F);
      super.addCollisionBoxesToList(worldIn, pos, state, mask, list, collidingEntity);
    }
    /*else if (meta == 7)
    {
        this.setBlockBounds(0.0F, 0.0F, 0.0F, 1.0F, 0.38F, 1.0F);
        super.addCollisionBoxesToList(world, x, y, z, axisalignedbb, list, entity);
    }*/
    else {
      super.addCollisionBoxesToList(worldIn, pos, state, mask, list, collidingEntity);
    }
  }
Exemplo n.º 3
0
 @Override
 public void addCollisionBoxesToList(
     World world, int x, int y, int z, AxisAlignedBB axisAlignedBB, List aList, Entity anEntity) {
   int metadata = world.getBlockMetadata(x, y, z);
   TileEntityBase tileentitybase =
       (TileEntityBase) BlockHelper.getTileEntity(world, x, y, z, this.getTileMapData(metadata));
   if (tileentitybase != null) {
     tileentitybase.addCollisionBoxesToList(this, axisAlignedBB, aList, anEntity);
   } else {
     super.addCollisionBoxesToList(world, x, y, z, axisAlignedBB, aList, anEntity);
   }
 }
Exemplo n.º 4
0
  @Override
  public void addCollisionBoxesToList(
      World worldIn,
      BlockPos pos,
      IBlockState state,
      AxisAlignedBB mask,
      List list,
      Entity collidingEntity) {
    if (collidingEntity instanceof EntityDog) {

    } else {
      super.addCollisionBoxesToList(worldIn, pos, state, mask, list, collidingEntity);
    }
  }
 @Override
 public void addCollisionBoxesToList(
     World par1World,
     int par2,
     int par3,
     int par4,
     AxisAlignedBB par5AxisAlignedBB,
     List par6List,
     Entity par7Entity) {
   for (MBBox box : getTileMultiblock(par1World, par2, par3, par4).getBoxes()) {
     setBlockBounds(
         box.getX(),
         box.getY(),
         box.getZ(),
         box.getX() + box.getWidth(),
         box.getY() + box.getHeight(),
         box.getZ() + box.getDepth());
     super.addCollisionBoxesToList(
         par1World, par2, par3, par4, par5AxisAlignedBB, par6List, par7Entity);
   }
   setBlockBounds(0.0F, 0.0F, 0.0F, 1.0F, 1.0F, 1.0F);
 }
Exemplo n.º 6
0
  @SuppressWarnings("rawtypes")
  @Override
  public void addCollisionBoxesToList(
      World world,
      int i,
      int j,
      int k,
      AxisAlignedBB axisalignedbb,
      List arraylist,
      Entity par7Entity) {
    setBlockBounds(
        Utils.pipeMinPos,
        Utils.pipeMinPos,
        Utils.pipeMinPos,
        Utils.pipeMaxPos,
        Utils.pipeMaxPos,
        Utils.pipeMaxPos);
    super.addCollisionBoxesToList(world, i, j, k, axisalignedbb, arraylist, par7Entity);

    TileEntity tile1 = world.getBlockTileEntity(i, j, k);
    TileGenericPipe tileG = (TileGenericPipe) tile1;

    if (tileG.isPipeConnected(ForgeDirection.WEST)) {
      setBlockBounds(
          0.0F,
          Utils.pipeMinPos,
          Utils.pipeMinPos,
          Utils.pipeMaxPos,
          Utils.pipeMaxPos,
          Utils.pipeMaxPos);
      super.addCollisionBoxesToList(world, i, j, k, axisalignedbb, arraylist, par7Entity);
    }

    if (tileG.isPipeConnected(ForgeDirection.EAST)) {
      setBlockBounds(
          Utils.pipeMinPos,
          Utils.pipeMinPos,
          Utils.pipeMinPos,
          1.0F,
          Utils.pipeMaxPos,
          Utils.pipeMaxPos);
      super.addCollisionBoxesToList(world, i, j, k, axisalignedbb, arraylist, par7Entity);
    }

    if (tileG.isPipeConnected(ForgeDirection.DOWN)) {
      setBlockBounds(
          Utils.pipeMinPos,
          0.0F,
          Utils.pipeMinPos,
          Utils.pipeMaxPos,
          Utils.pipeMaxPos,
          Utils.pipeMaxPos);
      super.addCollisionBoxesToList(world, i, j, k, axisalignedbb, arraylist, par7Entity);
    }

    if (tileG.isPipeConnected(ForgeDirection.UP)) {
      setBlockBounds(
          Utils.pipeMinPos,
          Utils.pipeMinPos,
          Utils.pipeMinPos,
          Utils.pipeMaxPos,
          1.0F,
          Utils.pipeMaxPos);
      super.addCollisionBoxesToList(world, i, j, k, axisalignedbb, arraylist, par7Entity);
    }

    if (tileG.isPipeConnected(ForgeDirection.NORTH)) {
      setBlockBounds(
          Utils.pipeMinPos,
          Utils.pipeMinPos,
          0.0F,
          Utils.pipeMaxPos,
          Utils.pipeMaxPos,
          Utils.pipeMaxPos);
      super.addCollisionBoxesToList(world, i, j, k, axisalignedbb, arraylist, par7Entity);
    }

    if (tileG.isPipeConnected(ForgeDirection.SOUTH)) {
      setBlockBounds(
          Utils.pipeMinPos,
          Utils.pipeMinPos,
          Utils.pipeMinPos,
          Utils.pipeMaxPos,
          Utils.pipeMaxPos,
          1.0F);
      super.addCollisionBoxesToList(world, i, j, k, axisalignedbb, arraylist, par7Entity);
    }

    if (tileG != null) {
      float facadeThickness = PipeWorldRenderer.facadeThickness;

      if (tileG.hasFacade(ForgeDirection.EAST)) {
        setBlockBounds(1 - facadeThickness, 0.0F, 0.0F, 1.0F, 1.0F, 1.0F);
        super.addCollisionBoxesToList(world, i, j, k, axisalignedbb, arraylist, par7Entity);
      }

      if (tileG.hasFacade(ForgeDirection.WEST)) {
        setBlockBounds(0.0F, 0.0F, 0.0F, facadeThickness, 1.0F, 1.0F);
        super.addCollisionBoxesToList(world, i, j, k, axisalignedbb, arraylist, par7Entity);
      }

      if (tileG.hasFacade(ForgeDirection.UP)) {
        setBlockBounds(0.0F, 1 - facadeThickness, 0.0F, 1.0F, 1.0F, 1.0F);
        super.addCollisionBoxesToList(world, i, j, k, axisalignedbb, arraylist, par7Entity);
      }

      if (tileG.hasFacade(ForgeDirection.DOWN)) {
        setBlockBounds(0.0F, 0.0F, 0.0F, 1.0F, facadeThickness, 1.0F);
        super.addCollisionBoxesToList(world, i, j, k, axisalignedbb, arraylist, par7Entity);
      }

      if (tileG.hasFacade(ForgeDirection.SOUTH)) {
        setBlockBounds(0.0F, 0.0F, 1 - facadeThickness, 1.0F, 1.0F, 1.0F);
        super.addCollisionBoxesToList(world, i, j, k, axisalignedbb, arraylist, par7Entity);
      }

      if (tileG.hasFacade(ForgeDirection.NORTH)) {
        setBlockBounds(0.0F, 0.0F, 0.0F, 1.0F, 1.0F, facadeThickness);
        super.addCollisionBoxesToList(world, i, j, k, axisalignedbb, arraylist, par7Entity);
      }
    }

    setBlockBounds(0.0F, 0.0F, 0.0F, 1.0F, 1.0F, 1.0F);
  }
Exemplo n.º 7
0
 public final void superAddCollisionBoxesToList(
     World world, int x, int y, int z, AxisAlignedBB axisAlignedBB, List aList, Entity anEntity) {
   super.addCollisionBoxesToList(world, x, y, z, axisAlignedBB, aList, anEntity);
 }