namespace Minecraft.Server.FourKit.Event.Block; using Minecraft.Server.FourKit.Block; /// /// Called when a block grows naturally in the world. /// /// Examples: /// /// Wheat /// Sugar Cane /// Cactus /// Watermelon /// Pumpkin /// /// /// If a Block Grow event is cancelled, the block will not grow. /// public class BlockGrowEvent : BlockEvent, Cancellable { private bool _cancel; private readonly BlockState _newState; internal BlockGrowEvent(Block block, BlockState newState) : base(block) { _cancel = false; _newState = newState; } /// /// Gets the state of the block where it will form or spread to. /// /// The block state for this events block. public BlockState getNewState() => _newState; /// public bool isCancelled() => _cancel; /// public void setCancelled(bool cancel) { _cancel = cancel; } }