blockstate, more block events, command preprocess event.

This commit is contained in:
sylvessa 2026-04-06 01:52:58 -05:00
parent 21b5accc69
commit 18a673bd46
34 changed files with 1359 additions and 58 deletions

View file

@ -0,0 +1,32 @@
namespace Minecraft.Server.FourKit.Event.Block;
using Minecraft.Server.FourKit.Block;
/// <summary>
/// Called when a block spreads based on world conditions.
/// Use <see cref="BlockFormEvent"/> to catch blocks that "randomly" form
/// instead of actually spread.
///
/// <para>Examples:</para>
/// <list type="bullet">
/// <item><description>Mushrooms spreading.</description></item>
/// <item><description>Fire spreading.</description></item>
/// </list>
///
/// <para>If a Block Spread event is cancelled, the block will not spread.</para>
/// </summary>
public class BlockSpreadEvent : BlockFormEvent, Cancellable
{
private readonly Block _source;
internal BlockSpreadEvent(Block block, Block source, BlockState newState) : base(block, newState)
{
_source = source;
}
/// <summary>
/// Gets the source block involved in this event.
/// </summary>
/// <returns>The Block for the source block involved in this event.</returns>
public Block getSource() => _source;
}