Examples of onBlockDestroyedByPlayer()


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

        world.setBlock(x, y, z, Blocks.air);
      }
      if (!player.capabilities.isCreativeMode && blk != Blocks.bedrock) {
        int localMeta = world.getBlockMetadata(x, y, z);
                if(MiscHelper.breakBlockToAirWithCheck(world, x, y, z, player)) {
                    blk.onBlockDestroyedByPlayer(world, x, y, z, localMeta);

                    blk.harvestBlock(world, player, x, y, z, localMeta);
                    blk.onBlockHarvested(world, x, y, z, localMeta, player);
                }
      } else {
View Full Code Here

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

      var4.onBlockHarvested(worldObj, par1, par2, par3, var5, player);

    boolean var6 = var4 != null && var4.removedByPlayer(worldObj, player, par1, par2, par3);

    if (var4 != null && var6)
      var4.onBlockDestroyedByPlayer(worldObj, par1, par2, par3, var5);

    return var6;
  }

  public boolean detect() {
View Full Code Here

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

        return;

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

        damageItem(stack, 1, player, 80);
        if(!dispose || !ItemElementiumPick.isDisposable(blk))
          blk.harvestBlock(world, player, x, y, z, localMeta);
        blk.onBlockHarvested(world, x, y, z, localMeta, player);
View Full Code Here

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

            continue;
          }

          Block block2 = coord.getBlock(player.worldObj);

          block2.onBlockDestroyedByPlayer(player.worldObj, coord.xCoord, coord.yCoord, coord.zCoord, meta);
          player.worldObj.playAuxSFXAtEntity(null, 2001, coord.xCoord, coord.yCoord, coord.zCoord, meta << 12);
          player.worldObj.setBlockToAir(coord.xCoord, coord.yCoord, coord.zCoord);
          block2.breakBlock(player.worldObj, coord.xCoord, coord.yCoord, coord.zCoord, block, meta);
          block2.dropBlockAsItem(player.worldObj, coord.xCoord, coord.yCoord, coord.zCoord, meta, 0);
View Full Code Here

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

                                                int exp = localBlock.getExpDrop(world, localMeta, fortune);

                                                localBlock.onBlockHarvested(world, xPos, yPos, zPos, localMeta, player);
                                                if (localBlock.removedByPlayer(world, player, xPos, yPos, zPos, true))
                                                {
                                                    localBlock.onBlockDestroyedByPlayer(world, xPos, yPos, zPos, localMeta);
                                                    localBlock.harvestBlock(world, player, xPos, yPos, zPos, localMeta);
                                                    // Workaround for dropping experience
                                                    if (!butter)
                                                        localBlock.dropXpOnBlockBreak(world, xPos, yPos, zPos, exp);
                                                }
View Full Code Here

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

        int l = theWorld.getBlockMetadata(par1, par2, par3);
        block.onBlockHarvested(theWorld, par1, par2, par3, l, thisPlayerMP);
        boolean flag = block != null && block.removedByPlayer(theWorld, thisPlayerMP, par1, par2, par3);

        if(flag) {
            block.onBlockDestroyedByPlayer(theWorld, par1, par2, par3, l);
        }

        return flag;
    }
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.