Package net.glowstone.block.blocktype
Interface IBlockGrowable
- All Known Implementing Classes:
BlockCarrot,BlockCocoa,BlockCrops,BlockDoublePlant,BlockGrass,BlockMushroom,BlockPotato,BlockSapling,BlockStem,BlockTallGrass
public interface IBlockGrowable
Represents a growable block.
-
Method Summary
Modifier and TypeMethodDescriptionbooleancanGrowWithChance(GlowBlock block) Called to check if the block will effectively grow.voidgrow(GlowPlayer player, GlowBlock block) Called to grow a growable block.booleanisFertilizable(GlowBlock block) Called to check if a block can be fertilized.
-
Method Details
-
isFertilizable
Called to check if a block can be fertilized.- Parameters:
block- the targeted block to fertilize- Returns:
- True if the block can be fertilized.
-
canGrowWithChance
Called to check if the block will effectively grow.- Parameters:
block- the targeted block to grow- Returns:
- True if the block will grow.
-
grow
Called to grow a growable block.- Parameters:
player- the player who triggered the growth, this can be null if the growth is natural or by plugin sourceblock- the targeted block to grow
-