Package net.minecraft.block

Examples of net.minecraft.block.Block


    }
  }

  private boolean doMultiHarvest(EntityPlayer player, World worldObj, BlockCoord bc, Block refBlock, int refMeta) { 
   
    Block block = worldObj.getBlock(bc.x, bc.y, bc.z);
    int meta = worldObj.getBlockMetadata(bc.x, bc.y, bc.z);
   
    ArrayList<ItemStack> itemDrops = block.getDrops(worldObj, bc.x, bc.y, bc.z, meta, 0);
    worldObj.setBlockToAir(bc.x, bc.y, bc.z);
    boolean usedPower = false;
    if(itemDrops != null) {
      for (ItemStack stack : itemDrops) {               
        worldObj.spawnEntityInWorld(new EntityItem(worldObj, bc.x + 0.5, bc.y + 0.5, bc.z + 0.5, stack.copy()));               
View Full Code Here


      TankFluidRenderer.renderTankFluid(tt.tank, 0, -0.1f, 0);
      hasFluid = true;
    }

    GL11.glEnable(GL11.GL_ALPHA_TEST);
    Block block = EnderIO.blockTank;
    int meta = item.getItemDamage();
   
    IIcon[] icons = RenderUtil.getBlockTextures(block, meta);
    BoundingBox bb = BoundingBox.UNIT_CUBE.translate(0, -0.1f, 0);
    Tessellator.instance.startDrawingQuads();
View Full Code Here

    return false;
  }

  private boolean isTranparent(Vector3d offset) {
    Block id = worldObj.getBlock(xCoord + (int) offset.x, yCoord + (int) offset.y, zCoord + (int) offset.z);
    if(isRailcraftException(id)) {
      return false;
    }
    return worldObj.getBlockLightOpacity(xCoord + (int) offset.x, yCoord + (int) offset.y, zCoord + (int) offset.z) == 0;
  }
View Full Code Here

    } else if(evt.itemStack.getItem() instanceof IResourceTooltipProvider) {
      addInformation((IResourceTooltipProvider) evt.itemStack.getItem(), evt);
      return;
    }

    Block blk = Block.getBlockFromItem(evt.itemStack.getItem());
    if(blk instanceof IAdvancedTooltipProvider) {
      addInformation((IAdvancedTooltipProvider) blk, evt.itemStack, evt.entityPlayer, evt.toolTip, false);
      return;
    } else if(blk instanceof IResourceTooltipProvider) {
      addInformation((IResourceTooltipProvider) blk, evt);
View Full Code Here

    blocks.add(new ViewableBlocks(ioX, ioY, ioZ, EnderIO.blockEnderIo));

    for (int x = ioX - range; x <= ioX + range; x++) {
      for (int y = ioY - range; y <= ioY + range; y++) {
        for (int z = ioZ - range; z <= ioZ + range; z++) {
          Block block = world.getBlock(x, y, z);
          blocks.add(new ViewableBlocks(x, y, z, block));
        }
      }
    }
  }
View Full Code Here

        }
      }
    }
    MovingObjectPosition hit = getClosestHit(Vec3.createVectorHelper(start.x, start.y, start.z), hits);
    if(hit != null) {
      Block block = world.getBlock(hit.blockX, hit.blockY, hit.blockZ);
      if(block == EnderIO.blockHyperCube || block == EnderIO.blockCapacitorBank) {
        block.onBlockActivated(world, hit.blockX, hit.blockY, hit.blockZ, player, 0, 0, 0, 0);
      } else {
        openInterface(hit.blockX, hit.blockY, hit.blockZ);
      }
    }
View Full Code Here

    itemIcon = IIconRegister.registerIcon("enderio:yetaWrench");
  }

  @Override
  public boolean onItemUseFirst(ItemStack stack, EntityPlayer player, World world, int x, int y, int z, int side, float hitX, float hitY, float hitZ) {
    Block block = world.getBlock(x, y, z);
    if(block != null && !player.isSneaking() && block.rotateBlock(world, x, y, z, ForgeDirection.getOrientation(side))) {
      player.swingItem();
      return !world.isRemote;
    }
    return false;
  }
View Full Code Here

    return true;
  }
 
  @Override
  public void toolUsed(ItemStack item, EntityLivingBase user, int x, int y, int z) {
    Block block = user.worldObj.getBlock(x, y, z);
    if (user.isSneaking() && block instanceof IDismantleable && user instanceof EntityPlayer) {
      EntityPlayer player = (EntityPlayer) user;
      IDismantleable machine = (IDismantleable) block;
      if (machine.canDismantle(player, player.worldObj, x, y, z) && !player.worldObj.isRemote) {
          machine.dismantleBlock(player, player.worldObj, x, y, z, false);
View Full Code Here

    float globalScale = (float) sf;
    ItemStack itemLabel = ta.getItemLabel();
    if(itemLabel != null && itemLabel.getItem() != null) {

      boolean isBlock = false;
      Block block = Block.getBlockFromItem(itemLabel.getItem());
      if(block != null && block != Blocks.air) {
        isBlock = true;
      }

      float alpha = 0.5f;
View Full Code Here

        fieldLoop:
        while (it.hasNext())
        {
          Vector3 vector = it.next();

          Block block = Block.blocksList[vector.getBlockID(this.worldObj)];

          if (canReplaceBlock(vector, block))
          {
            /**
             * Prevents the force field projector from disintegrating itself.
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.