getFace

public abstract BlockFace getFace(Block block)

Gets the face relation of this block compared to the given block.

For example:


Block current = world.getBlockAt(100, 100, 100);
Block target = world.getBlockAt(100, 101, 100);

current.getFace(target) == BlockFace.Up;
If the given block is not connected to this block, null may be returned

Return

BlockFace of this block which has the requested block, or null

Parameters

block

Block to compare against this block