public class BlockDoublePlant extends BlockNeedsAttached implements IBlockGrowable
ItemType.ContextADJACENT, drops, placeSound, SIDES| Constructor and Description |
|---|
BlockDoublePlant() |
| Modifier and Type | Method and Description |
|---|---|
void |
afterPlace(GlowPlayer player,
GlowBlock block,
org.bukkit.inventory.ItemStack holding,
GlowBlockState oldState)
Called after a block has been placed by a player.
|
void |
blockDestroy(GlowPlayer player,
GlowBlock block,
org.bukkit.block.BlockFace face)
Called when a player attempts to destroy a block.
|
boolean |
canAbsorb(GlowBlock block,
org.bukkit.block.BlockFace face,
org.bukkit.inventory.ItemStack holding)
Called when a player attempts to place a block on an existing block of this type.
|
boolean |
canGrowWithChance(GlowBlock block)
Called to check if the block will effectively grow.
|
boolean |
canPlaceAt(GlowPlayer player,
GlowBlock block,
org.bukkit.block.BlockFace against)
Check whether the block can be placed at the given location.
|
Collection<org.bukkit.inventory.ItemStack> |
getDrops(GlowBlock block,
org.bukkit.inventory.ItemStack tool)
Get the items that will be dropped by digging the block.
|
void |
grow(GlowPlayer player,
GlowBlock block)
Called to grow a growable block.
|
boolean |
isFertilizable(GlowBlock block)
Called to check if a block can be fertilized.
|
canAttachTo, dropMe, getAttachedFace, onNearBlockChanged, updatePhysicsAfterEventafterDestroy, blockInteract, canOverride, canTickRandomly, createBlockEntity, 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 boolean canPlaceAt(GlowPlayer player, GlowBlock block, org.bukkit.block.BlockFace against)
BlockTypecanPlaceAt in class BlockNeedsAttachedplayer - The player who placed the block.block - The location the block is being placed at.against - The face the block is being placed against.public void afterPlace(GlowPlayer player, GlowBlock block, org.bukkit.inventory.ItemStack holding, GlowBlockState oldState)
BlockTypeafterPlace in class BlockTypeplayer - the player who placed the blockblock - the block that was placedholding - the the ItemStack that was being heldoldState - The old block state before the block was placed.public Collection<org.bukkit.inventory.ItemStack> getDrops(GlowBlock block, org.bukkit.inventory.ItemStack tool)
BlockTypepublic void blockDestroy(GlowPlayer player, GlowBlock block, org.bukkit.block.BlockFace face)
BlockTypeblockDestroy in class BlockTypeplayer - The player interactingblock - The block the player destroyedface - The block facepublic boolean isFertilizable(GlowBlock block)
IBlockGrowableisFertilizable in interface IBlockGrowableblock - the targeted block to fertilizepublic boolean canGrowWithChance(GlowBlock block)
IBlockGrowablecanGrowWithChance in interface IBlockGrowableblock - the targeted block to growpublic void grow(GlowPlayer player, GlowBlock block)
IBlockGrowablegrow in interface IBlockGrowableplayer - the player who triggered the growth, this can be null if the growth is natural
or by plugin sourceblock - the targeted block to growpublic boolean canAbsorb(GlowBlock block, org.bukkit.block.BlockFace face, org.bukkit.inventory.ItemStack holding)
BlockTypeCopyright © 2021. All rights reserved.