Examples of dismantleBlock()


Examples of cofh.api.block.IDismantleable.dismantleBlock()

    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);
      }
    }
  }

  /* IResourceTooltipProvider */
 
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.