Examples of canHarvestBlock()


Examples of net.minecraft.block.Block.canHarvestBlock()

      return;

    int meta = world.getBlockMetadata(x, y, z);
    Material mat = world.getBlock(x, y, z).getMaterial();
    if (blk != null && !blk.isAir(world, x, y, z) && ((blk.getPlayerRelativeBlockHardness(player, world, x, y, z) != 0 || (blk == Blocks.bedrock && (y <= 253 && world.provider instanceof WorldProviderBedrock))))) {
      if (!blk.canHarvestBlock(player, meta) || !isRightMaterial(mat, materialsListing))
        return;
      if (ConfigHandler.bedrockDimensionID != 0 && block == Blocks.bedrock && ((world.provider.isSurfaceWorld() && y < 5) || (y > 253 && world.provider instanceof WorldProviderBedrock))) {
        world.setBlock(x, y, z, ThaumicTinkerer.registry.getFirstBlockFromClass(BlockBedrockPortal.class));
      }
      if (ConfigHandler.bedrockDimensionID != 0 && world.provider.dimensionId == ConfigHandler.bedrockDimensionID && blk == Blocks.bedrock && y <= 253) {
View Full Code Here

Examples of net.minecraft.block.Block.canHarvestBlock()

    //worldObj.playAuxSFXAtEntity(player, 2001, par1, par2, par3, var4 + (var5 << 12));
    boolean var6;

    boolean var8 = false;
    if (block != null)
      var8 = block.canHarvestBlock(player, var5);

    worldObj.loadedEntityList.size();
    if (stack != null)
      stack.getItem().onBlockDestroyed(stack, worldObj, block, par1, par2, par3, player);
View Full Code Here

Examples of net.minecraft.block.Block.canHarvestBlock()

    Material mat = world.getBlock(x, y, z).getMaterial();
    if(blk != null && !blk.isAir(world, x, y, z) && blk.getPlayerRelativeBlockHardness(player, world, x, y, z) != 0) {
      new ArrayList();

      if(!blk.canHarvestBlock(player, meta) || !isRightMaterial(mat, materialsListing))
        return;

      if(!player.capabilities.isCreativeMode && blk != Blocks.bedrock) {
        int localMeta = world.getBlockMetadata(x, y, z);
        if (blk.removedByPlayer(world, player, x, y, z))
View Full Code Here

Examples of net.minecraft.block.Block.canHarvestBlock()

    if (block.getBlockHardness(world, x, y, z) < 0 || block.equals(Blocks.waterlily)) {
      return;
    }
    int bMeta = world.getBlockMetadata(x, y, z);

    if (block.canHarvestBlock(player, bMeta)) {
      block.harvestBlock(world, player, x, y, z, bMeta);
    }
    if (ServerHelper.isServerWorld(world) && block.equals(Blocks.vine)) {
      CoreUtils.dropItemStackIntoWorldWithVelocity(new ItemStack(Blocks.vine), world, x, y, z);
    }
View Full Code Here

Examples of net.minecraft.block.Block.canHarvestBlock()

    if (block.getBlockHardness(world, x, y, z) < 0) {
      return;
    }
    int bMeta = world.getBlockMetadata(x, y, z);

    if (block.canHarvestBlock(player, bMeta)) {
      block.harvestBlock(world, player, x, y, z, bMeta);
    }
    world.setBlockToAir(x, y, z);
  }
View Full Code Here

Examples of net.minecraft.src.ItemStack.canHarvestBlock()

      ItemStack var5 = this.inventory.getCurrentItem();

      if (var4 > 0 && var5 != null) {
        float var6 = (float)(var4 * var4 + 1);

        if (!var5.canHarvestBlock(par1Block) && var3 <= 1.0F) {
          var3 += var6 * 0.08F;
        } else {
          var3 += var6;
        }
      }
View Full Code Here

Examples of net.minecraft.src.ItemStack.canHarvestBlock()

        }

        if (this.getCurrentEquippedItem() != null) {
          ItemStack var6 = this.getCurrentEquippedItem();

          if (var6.canHarvestBlock(var5) || var6.getStrVsBlock(var5) > 1.0F) {
            return true;
          }
        }
      }
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.