Examples of onBlockAdded()


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

                    int updateFlag = blocksnapshot.flag;
                    Block oldBlock = blocksnapshot.replacedBlock;
                    Block newBlock = world.getBlock(blockX, blockY, blockZ);
                    if (newBlock != null && !(newBlock.hasTileEntity(metadata))) // Containers get placed automatically
                    {
                        newBlock.onBlockAdded(world, blockX, blockY, blockZ);
                    }

                    world.markAndNotifyBlock(blockX, blockY, blockZ, null, oldBlock, newBlock, updateFlag);
                }
                player.addStat(StatList.objectUseStats[Item.getIdFromItem(itemstack.getItem())], 1);
View Full Code Here

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

        Block block = id > 0 ? Block.blocksList[id] : null;
        if (block != null) {
          // CraftBukkit - Don't place while processing the BlockPlaceEvent, unless it's a BlockContainer
          if (!worldObj.isRemote && (block instanceof BlockContainer || (worldObj.inPlaceEvent == null || worldObj.inPlaceEvent.get() == Boolean.FALSE))) {
            block.onBlockAdded(worldObj, wX, y, wZ);
          }

          if (block.hasTileEntity(meta)) {
            // CraftBukkit start - don't create tile entity if placement failed
            if (getBlockID(x, y, z) != id) {
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.