Package net.minecraftforge.event.world.BlockEvent

Examples of net.minecraftforge.event.world.BlockEvent.BreakEvent


                    worldObj.spawnParticle("smoke", d0, d1, d2, d3, d4, d5);
                }

                if (block != null)
                {
                    BreakEvent breakEvent = new BreakEvent(i, j, k, worldObj, block, worldObj.getBlockMetadata(i, j, k), player);

                    if(!breakEvent.isCanceled())
                    {
                        if (block.canDropFromExplosion(this))
                        {
                            block.dropBlockAsItemWithChance(worldObj, i, j, k, worldObj.getBlockMetadata(i, j, k), 1.0F / explosionSize, 0);
                        }
View Full Code Here


    if (depth < 1 || depth < yCoord - BuildCraftFactory.miningDepth || !BlockUtil.canChangeBlock(world, xCoord, depth, zCoord)) {
      isDigging = false;
      return;
    }

        BreakEvent breakEvent = new BreakEvent(xCoord, depth, zCoord, worldObj, world.getBlock(xCoord, depth, zCoord),
                world.getBlockMetadata(xCoord, depth, zCoord), CoreProxy.proxy.getBuildCraftPlayer((WorldServer) world).get());
        MinecraftForge.EVENT_BUS.post(breakEvent);

        if (breakEvent.isCanceled()) {
            isDigging = false;
            return;
        }

    boolean wasAir = world.isAirBlock(xCoord, depth, zCoord);
View Full Code Here

TOP

Related Classes of net.minecraftforge.event.world.BlockEvent.BreakEvent

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.