Examples of onBlockPlacedBy()


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

          ++mop.blockX;

        if (block.canPlaceBlockOnSide(world, mop.blockX, mop.blockY, mop.blockZ, mop.sideHit)) {
          if (!world.isRemote) {
            world.setBlock(mop.blockX, mop.blockY, mop.blockZ, ((ItemBlock) stack.getItem()).field_150939_a, stack.getItemDamage(), 1 | 2);
            block.onBlockPlacedBy(world, mop.blockX, mop.blockY, mop.blockZ, player, itemstack);
            NBTTagCompound tileCmp = getStackTileEntity(itemstack);
            if (tileCmp != null && !tileCmp.hasNoTags()) {
              TileEntity tile1 = TileEntity.createAndLoadEntity(tileCmp);
              tile1.xCoord = mop.blockX;
              tile1.yCoord = mop.blockY;
View Full Code Here

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

                return false;
            }
            else if (world.canPlaceEntityOnSide(block, i, j, k, false, side, entityplayer, itemstack))
            {
                int j1 = this.field_150939_a.onBlockPlaced(world, i, j, k, side, par8, par9, par10, metadata);
                block.onBlockPlacedBy(world, i, j, k, entityplayer, itemstack);

                if (placeBlockAt(itemstack, entityplayer, world, i, j, k, side, par8, par9, par10, j1))
                {
                    world.playSoundEffect(i + 0.5F, j + 0.5F, k + 0.5F, this.field_150939_a.stepSound.func_150496_b(), (this.field_150939_a.stepSound.getVolume() + 1.0F) / 2.0F, this.field_150939_a.stepSound.getPitch() * 0.8F);
                    --itemstack.stackSize;
View Full Code Here

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

    Block block = world.getBlock(x, y, z);

    if (!ForestryBlock.stairs.isBlockEqual(block))
      return false;

    block.onBlockPlacedBy(world, x, y, z, player, stack);
    block.onPostBlockPlaced(world, x, y, z, metadata);

    TileEntity tile = world.getTileEntity(x, y, z);
    if (!(tile instanceof TileStairs)) {
      world.setBlockToAir(x, y, z);
View Full Code Here

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

        boolean success = placeTrack(stack, world, x, y, z, side);
        if (success) {
            Block blockTrack = RailcraftBlocks.getBlockTrack();
            if (player != null)
                blockTrack.onBlockPlacedBy(world, x, y, z, player, stack);
            stack.stackSize--;
        }
        return success;
    }
View Full Code Here

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

        Block block = Block.getBlockFromItem(stack.getItem());
        if(!world.setBlock(x, y, z, block, metadata, 3)) {
            return false;
        }

        block.onBlockPlacedBy(world, x, y, z, player, stack);
        block.onPostBlockPlaced(world, x, y, z, metadata);

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