Examples of canMineBlock()


Examples of net.minecraft.world.World.canMineBlock()

   
    // Return false if there's an entity blocking the placement.
    if (!world.canPlaceEntityOnSide(blockBackpack, x, y, z, deathDrop, side, carrier, backpack)) return false;
   
    // Return false if the player can't edit the block.
    if ((player != null) && (!world.canMineBlock(player, x, y, z) ||
                             !player.canPlayerEdit(x, y, z, side, backpack))) return false;
   
    // Do not actually place the backpack on the client.
    if (world.isRemote) return true;
   
View Full Code Here

Examples of net.minecraft.world.WorldServer.canMineBlock()

        boolean ignore = mat == Material.air || mat == Material.lava || mat == Material.water || mat.isLiquid() || blk == Blocks.bedrock
            || blk == Blocks.end_portal || blk == Blocks.end_portal_frame || blk == Blocks.command_block;

        if ( !ignore )
        {
          if ( !w.isAirBlock( x, y, z ) && w.blockExists( x, y, z ) && w.canMineBlock( Platform.getPlayer( w ), x, y, z ) )
          {
            float hardness = blk.getBlockHardness( w, x, y, z );
            if ( hardness >= 0.0 )
            {
              ItemStack[] out = Platform.getBlockDrops( w, x, y, z );
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.