Package net.glowstone.block.blocktype
Class BlockNeedsAttached
java.lang.Object
net.glowstone.block.itemtype.ItemType
net.glowstone.block.blocktype.BlockType
net.glowstone.block.blocktype.BlockNeedsAttached
- Direct Known Subclasses:
BlockAttachable
,BlockCarpet
,BlockCocoa
,BlockCrops
,BlockDeadBush
,BlockDoublePlant
,BlockFire
,BlockMushroom
,BlockNetherWart
,BlockRails
,BlockRedstone
,BlockRedstoneComparator
,BlockRedstoneRepeater
,BlockRedstoneTorch
,BlockSapling
,BlockSign
,BlockSnow
,BlockSugarCane
,BlockTallGrass
,BlockTorch
-
Nested Class Summary
Nested classes/interfaces inherited from class net.glowstone.block.itemtype.ItemType
ItemType.Context
-
Field Summary
Fields inherited from class net.glowstone.block.blocktype.BlockType
ADJACENT, drops, placeSound, SIDES, soundGroup
-
Constructor Summary
-
Method Summary
Modifier and TypeMethodDescriptionboolean
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
protected org.bukkit.block.BlockFace
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
Methods inherited from class net.glowstone.block.blocktype.BlockType
afterDestroy, afterPlace, blockDestroy, blockInteract, canAbsorb, canOverride, canTickRandomly, createBlockEntity, getCastedBlockData, getDrops, getMinedDrops, getOppositeBlockFace, getPlaceAs, getPlaceSound, getPulseTickSpeed, getSoundGroup, isPulseOnce, leftClickBlock, onBlockChanged, onEntityStep, onRedstoneUpdate, placeBlock, receivePulse, requestPulse, rightClickBlock, setDrops, setPlaceSound, updateBlock, updatePhysics, warnMaterialData
Methods inherited from class net.glowstone.block.itemtype.ItemType
getContext, getMaterial, getMaterials, getMaxStackSize, rightClickAir, setMaterial, setMaxStackSize, setPlaceAs, setPlaceAs, toString
-
Constructor Details
-
BlockNeedsAttached
public BlockNeedsAttached()
-
-
Method Details
-
onNearBlockChanged
public void onNearBlockChanged(GlowBlock block, org.bukkit.block.BlockFace face, GlowBlock changedBlock, org.bukkit.Material oldType, byte oldData, org.bukkit.Material newType, byte newData) Description copied from class:BlockType
Called when a neighboring block (within a 3x3x3 cube) has changed its type or data and physics checks should occur.- Overrides:
onNearBlockChanged
in classBlockType
- Parameters:
block
- 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 block
-
updatePhysicsAfterEvent
- Overrides:
updatePhysicsAfterEvent
in classBlockType
-
canAttachTo
Called to determine if the target block can be attached to when right clicking it.- Parameters:
block
- The location the block is being placed at.against
- The face the block is being placed against.- Returns:
- Whether the black can be attached to.
-
canPlaceAt
Description copied from class:BlockType
Check whether the block can be placed at the given location.- Overrides:
canPlaceAt
in classBlockType
- Parameters:
player
- The player who placed the block.block
- The location the block is being placed at.against
- The face the block is being placed against.- Returns:
- Whether the placement is valid.
-
dropMe
-
getAttachedFace
-