mirror of
https://github.com/smartcmd/MinecraftConsoles.git
synced 2026-05-25 18:23:51 +00:00
blockstate, more block events, command preprocess event.
This commit is contained in:
parent
21b5accc69
commit
18a673bd46
34 changed files with 1359 additions and 58 deletions
32
Minecraft.Server.FourKit/Event/Block/BlockSpreadEvent.cs
Normal file
32
Minecraft.Server.FourKit/Event/Block/BlockSpreadEvent.cs
Normal 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;
|
||||
}
|
||||
Loading…
Add table
Add a link
Reference in a new issue