namespace Minecraft.Server.FourKit.Event.Block; using Minecraft.Server.FourKit.Block; /// /// Called when a block fades, melts or disappears based on world conditions. /// /// Examples: /// /// Snow melting due to being near a light source. /// Ice melting due to being near a light source. /// /// /// If a Block Fade event is cancelled, the block will not fade, melt or disappear. /// public class BlockFadeEvent : BlockEvent, Cancellable { private readonly BlockState _newState; private bool _cancel; internal BlockFadeEvent(Block block, BlockState newState) : base(block) { _newState = newState; _cancel = false; } /// /// Gets the state of the block that will be fading, melting or disappearing. /// /// The block state of the block that will be fading, melting or disappearing. public BlockState getNewState() => _newState; /// public bool isCancelled() => _cancel; /// public void setCancelled(bool cancel) { _cancel = cancel; } }