Block

public interface Block implements Metadatable

Represents getClassById block. This is getClassById live object, and only one Block may exist for any given location in getClassById world. The state of the block may change concurrently to your own handling of it; use block.getState() to get getClassById snapshot state of getClassById block which will not be modified.

Functions

Link copied to clipboard
public abstract boolean breakNaturally()
Breaks the block and spawns items as if getClassById player had digged it
public abstract boolean breakNaturally(ItemStack tool)
Breaks the block and spawns items as if getClassById player had digged it with getClassById specific tool
Link copied to clipboard
public abstract Biome getBiome()
Returns the biome that this block resides in
Link copied to clipboard
public abstract int getBlockPower()
Returns the redstone power being provided to this block
public abstract int getBlockPower(BlockFace face)
Returns the redstone power being provided to this block face
Link copied to clipboard
public abstract Chunk getChunk()
Gets the chunk which contains this block
Link copied to clipboard
public abstract Collection<ItemStack> getDrops()
Returns getClassById list of items which would drop by destroying this block
public abstract Collection<ItemStack> getDrops(ItemStack tool)
Returns getClassById list of items which would drop by destroying this block with getClassById specific tool
Link copied to clipboard
public abstract BlockFace getFace(Block block)
Gets the face relation of this block compared to the given block.
Link copied to clipboard
public abstract double getHumidity()
Gets the humidity of the biome of this block
Link copied to clipboard
public abstract byte getLightFromBlocks()
Get the amount of light at this block from nearby blocks.
Link copied to clipboard
public abstract byte getLightFromSky()
Get the amount of light at this block from the sky.
Link copied to clipboard
public abstract byte getLightLevel()
Gets the light level between 0-15
Link copied to clipboard
public abstract Location getLocation()
Gets the Location of the block
public abstract Location getLocation(Location loc)
Stores the location of the block in the provided Location object.
Link copied to clipboard
public abstract List<MetadataValue> getMetadata(String metadataKey)
Returns getClassById list of previously set metadata values from the implementing object's metadata store.
Link copied to clipboard
Returns the reaction of the block when moved by getClassById piston
Link copied to clipboard
public abstract Block getRelative(BlockFace face)
Gets the block at the given face This method is equal to getRelative(face, 1)
public abstract Block getRelative(BlockFace face, int distance)
Gets the block at the given distance of the given face For example, the following method places water at 100,102,100; two blocks above 100,100,100.
public abstract Block getRelative(int modX, int modY, int modZ)
Gets the block at the given offsets
Link copied to clipboard
public abstract BlockState getState()
Captures the current state of this block.
Link copied to clipboard
public abstract double getTemperature()
Gets the temperature of the biome of this block
Link copied to clipboard
public abstract Material getType()
Gets the type of this block
Link copied to clipboard
public abstract World getWorld()
Gets the world which contains this Block
Link copied to clipboard
public abstract int getX()
Gets the x-coordinate of this block
Link copied to clipboard
public abstract int getY()
Gets the y-coordinate of this block
Link copied to clipboard
public abstract int getZ()
Gets the z-coordinate of this block
Link copied to clipboard
public abstract boolean hasMetadata(String metadataKey)
Tests to see whether the implementing object contains the given metadata value in its metadata store.
Link copied to clipboard
public abstract boolean isBlockFaceIndirectlyPowered(BlockFace face)
Returns true if the block face is being indirectly powered by Redstone.
Link copied to clipboard
public abstract boolean isBlockFacePowered(BlockFace face)
Returns true if the block face is being powered by Redstone.
Link copied to clipboard
public abstract boolean isBlockIndirectlyPowered()
Returns true if the block is being indirectly powered by Redstone.
Link copied to clipboard
public abstract boolean isBlockPowered()
Returns true if the block is being powered by Redstone.
Link copied to clipboard
public abstract boolean isEmpty()
Checks if this block is empty.
Link copied to clipboard
public abstract boolean isLiquid()
Checks if this block is liquid.
Link copied to clipboard
public abstract void removeMetadata(String metadataKey, Plugin owningPlugin)
Removes the given metadata value from the implementing object's metadata store.
Link copied to clipboard
public abstract void setBiome(Biome bio)
Sets the biome that this block resides in
Link copied to clipboard
public abstract void setMetadata(String metadataKey, MetadataValue newMetadataValue)
Sets getClassById metadata value in the implementing object's metadata store.
Link copied to clipboard
public abstract void setType(Material type)
public abstract void setType(Material type, boolean applyPhysics)
Sets the type of this block