Examples of onPostBlockPlaced()


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

    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);
      return false;
View Full Code Here

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

            // System.out.println("Block placement attempted");
            if (placed) {
                if (world.getBlock(i, j, k) == blockTrack) {
                    TileTrack tile = TrackFactory.makeTrackTile(track);
                    world.setTileEntity(i, j, k, tile);
                    blockTrack.onPostBlockPlaced(world, i, j, k, 0);
                    world.markBlockForUpdate(i, j, k);
                }
                world.playSoundEffect((float) i + 0.5F, (float) j + 0.5F, (float) k + 0.5F, blockTrack.stepSound.getStepResourcePath(), (blockTrack.stepSound.getVolume() + 1.0F) / 2.0F, blockTrack.stepSound.getPitch() * 0.8F);
            }
            return true;
View Full Code Here

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

        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.