public class BlockNeedsAttached extends BlockType
ItemType.ContextADJACENT, drops, placeSound, SIDES| Constructor and Description |
|---|
BlockNeedsAttached() |
| Modifier and Type | Method and Description |
|---|---|
boolean |
canAttachTo(GlowBlock block,
org.bukkit.block.BlockFace against)
Called to determine if the target block can be attached to
when right clicking it.
|
boolean |
canPlaceAt(GlowPlayer player,
GlowBlock block,
org.bukkit.block.BlockFace against)
Check whether the block can be placed at the given location.
|
protected void |
dropMe(GlowBlock me) |
protected org.bukkit.block.BlockFace |
getAttachedFace(GlowBlock me) |
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 |
updatePhysicsAfterEvent(GlowBlock me) |
afterDestroy, afterPlace, blockDestroy, blockInteract, canAbsorb, canOverride, canTickRandomly, createBlockEntity, getDrops, getMinedDrops, getOppositeBlockFace, getPlaceAs, getPlaceSound, getPulseTickSpeed, isPulseOnce, leftClickBlock, onBlockChanged, onEntityStep, onRedstoneUpdate, placeBlock, receivePulse, requestPulse, rightClickBlock, setDrops, setPlaceSound, updateBlock, updatePhysics, warnMaterialDatagetContext, getId, getMaterial, getMaxStackSize, rightClickAir, setId, setMaterial, setMaxStackSize, setPlaceAs, setPlaceAs, toStringpublic 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 updatePhysicsAfterEvent(GlowBlock me)
updatePhysicsAfterEvent in class BlockTypepublic boolean canAttachTo(GlowBlock block, org.bukkit.block.BlockFace against)
block - The location the block is being placed at.against - The face the block is being placed against.public boolean canPlaceAt(GlowPlayer player, GlowBlock block, org.bukkit.block.BlockFace against)
BlockTypecanPlaceAt in class BlockTypeplayer - The player who placed the block.block - The location the block is being placed at.against - The face the block is being placed against.protected void dropMe(GlowBlock me)
protected org.bukkit.block.BlockFace getAttachedFace(GlowBlock me)
Copyright © 2021. All rights reserved.