public class BlockObserver extends BlockDirectional
ItemType.ContextADJACENT, drops, placeSound, SIDES| Constructor and Description |
|---|
BlockObserver() |
| Modifier and Type | Method and Description |
|---|---|
static org.bukkit.block.BlockFace |
getFace(GlowBlock block)
Returns the direction the given block is facing, if it's an observer, or null otherwise.
|
static boolean |
isPowered(GlowBlock block) |
void |
onNearBlockChanged(GlowBlock block,
org.bukkit.block.BlockFace face,
GlowBlock changedBlock,
org.bukkit.Material oldType,
byte oldData,
org.bukkit.Material newType,
byte newData)
Called when a neighboring block (within a 3x3x3 cube) has changed its type or data and
physics checks should occur.
|
void |
receivePulse(GlowBlock block)
Called when the BlockType gets pulsed as requested.
|
calculateFace, getFace, getRawFace, placeBlockafterDestroy, afterPlace, blockDestroy, blockInteract, canAbsorb, canOverride, canPlaceAt, canTickRandomly, createBlockEntity, getDrops, getMinedDrops, getOppositeBlockFace, getPlaceAs, getPlaceSound, getPulseTickSpeed, isPulseOnce, leftClickBlock, onBlockChanged, onEntityStep, onRedstoneUpdate, requestPulse, rightClickBlock, setDrops, setPlaceSound, updateBlock, updatePhysics, updatePhysicsAfterEvent, warnMaterialDatagetContext, getId, getMaterial, getMaxStackSize, rightClickAir, setId, setMaterial, setMaxStackSize, setPlaceAs, setPlaceAs, toStringpublic static boolean isPowered(GlowBlock block)
public static org.bukkit.block.BlockFace getFace(GlowBlock block)
block - a blockpublic void onNearBlockChanged(GlowBlock block, org.bukkit.block.BlockFace face, GlowBlock changedBlock, org.bukkit.Material oldType, byte oldData, org.bukkit.Material newType, byte newData)
BlockTypeonNearBlockChanged in class BlockTypeblock - The block to perform physics checks forface - The BlockFace to the changed block, or null if unavailablechangedBlock - The neighboring block that has changedoldType - The old type of the changed blockoldData - The old data of the changed blocknewType - The new type of the changed blocknewData - The new data of the changed blockpublic void receivePulse(GlowBlock block)
BlockTypereceivePulse in class BlockTypeblock - The block that was pulsedCopyright © 2021. All rights reserved.