Package net.minecraft.block

Examples of net.minecraft.block.Block


    } else {

      List<MovingObjectPosition> res = Util.raytraceAll(player.worldObj, eye3, end, !Config.travelStaffBlinkThroughClearBlocksEnabled);
      for (MovingObjectPosition pos : res) {
        if(pos != null) {
          Block hitBlock = player.worldObj.getBlock(pos.blockX, pos.blockY, pos.blockZ);
          if(isBlackListedBlock(player, pos, hitBlock)) {
            maxDistance = Math.min(maxDistance, VecmathUtil.distance(eye, new Vector3d(pos.blockX + 0.5, pos.blockY + 0.5, pos.blockZ + 0.5)) - 1.5 - lookComp);           
          }
        }
      }
View Full Code Here


      if(!canBlinkTo(bc, w, start, target)) {
        return false;
      }
    }  

    Block block = w.getBlock(bc.x, bc.y, bc.z);
    if(block == null || block.isAir(w, bc.x, bc.y, bc.z)) {
      return true;
    }   
    final AxisAlignedBB aabb = block.getCollisionBoundingBoxFromPool(w, bc.x, bc.y, bc.z);
    return aabb == null || aabb.getAverageEdgeLength() < 0.7;
  }
View Full Code Here

    MovingObjectPosition p = w.rayTraceBlocks(start, target, !Config.travelStaffBlinkThroughClearBlocksEnabled);
    if(p != null) {
      if(!Config.travelStaffBlinkThroughClearBlocksEnabled) {
        return false;
      }
      Block block = w.getBlock(p.blockX, p.blockY, p.blockZ);
      if(isClear(w, block, p.blockX, p.blockY, p.blockZ)) {
        if(new BlockCoord(p.blockX, p.blockY, p.blockZ).equals(bc)) {
          return true;
        }
        //need to step
View Full Code Here

    if (mob == null) {
      return true;     
    }
    mob.readFromNBT(root);
   
    Block blk = world.getBlock(x,y,z);   
    double spawnX = x + Facing.offsetsXForSide[side] + 0.5;
    double spawnY = y + Facing.offsetsYForSide[side];
    double spawnZ = z + Facing.offsetsZForSide[side] + 0.5;
    if(side == ForgeDirection.UP.ordinal() && (blk instanceof BlockFence || blk instanceof BlockWall)) {
      spawnY += 0.5;
View Full Code Here

    if(entity instanceof EntityPlayer) {
      TileEntity te = world.getTileEntity(x, y, z);
      if(te instanceof TileTravelAnchor) {
        TileTravelAnchor ta = (TileTravelAnchor) te;
        ta.setPlacedBy((EntityPlayer) entity);
        Block b = PainterUtil.getSourceBlock(par6ItemStack);
        ta.setSourceBlock(b);
        ta.setSourceBlockMetadata(PainterUtil.getSourceBlockMetadata(par6ItemStack));
        world.markBlockForUpdate(x, y, z);
      }
    }
View Full Code Here

      if(te instanceof TileTravelAnchor) {
        TileTravelAnchor tef = (TileTravelAnchor) te;

        ItemStack itemStack;
        Block srcBlk = tef.getSourceBlock();
        if(srcBlk != null) {
          itemStack = createItemStackForSourceBlock(tef.getSourceBlock(), tef.getSourceBlockMetadata());
        } else {
          itemStack = new ItemStack(this);
        }
View Full Code Here

    return false;
  }

  @Override
  public boolean isBlockSolid(IBlockAccess iblockaccess, int x, int y, int z, int l) {
    Block blockID = iblockaccess.getBlock(x, y, z);
    if(blockID == this) {
      return false;
    } else {

      return super.isBlockSolid(iblockaccess, x, y, z, l);
View Full Code Here

    world.removeTileEntity(x, y, z);
  }

  @Override
  public int getLightValue(IBlockAccess world, int x, int y, int z) {
    Block block = world.getBlock(x, y, z);
    if(block != null && block != this) {
      return block.getLightValue(world, x, y, z);
    }
    int onVal = 15;
    // TileEntity te = world.getTileEntity(x, y, z);
    // if(te instanceof TileLightNode && ((TileLightNode)te).isDiagnal) {
    // System.out.println("BlockLightNode.getLightValue: ");
View Full Code Here

    start.add(origin);
    end.add(origin);
    List<MovingObjectPosition> hits = new ArrayList<MovingObjectPosition>();

    for (BlockCoord bc : configurables) {
      Block block = world.getBlock(bc.x, bc.y, bc.z);
      if(block != null) {
        MovingObjectPosition hit = block.collisionRayTrace(world, bc.x, bc.y, bc.z, Vec3.createVectorHelper(start.x, start.y, start.z),
            Vec3.createVectorHelper(end.x, end.y, end.z));
        if(hit != null) {
          hits.add(hit);
        }
      }
View Full Code Here

    Tessellator.instance.startDrawingQuads();
    Tessellator.instance.setTranslation(trans.x, trans.y, trans.z);
    Tessellator.instance.setBrightness(15 << 20 | 15 << 4);

    for(BlockCoord bc : blocks) {
      Block block = world.getBlock(bc.x, bc.y, bc.z);
      if(block != null) {
        if(block.canRenderInPass(pass)) {
          RB.renderAllFaces = true;
          RB.setRenderAllFaces(true);
          RB.setRenderBounds(0, 0, 0, 1, 1, 1);
          try {
            RB.renderBlockByRenderType(block, bc.x, bc.y, bc.z);
View Full Code Here

TOP

Related Classes of net.minecraft.block.Block

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.