mirror of
https://github.com/smartcmd/MinecraftConsoles.git
synced 2026-05-24 02:53:51 +00:00
finish rewrite; port to cmake, loads of other changes
Theres documentation at https://sylvessa.zip/fourkit/ now. And a bunch of other changes. Check the discord server for a more comprehensive list
This commit is contained in:
parent
ecb3f00bd6
commit
f5f9aa1cf5
107 changed files with 14289 additions and 40 deletions
31
Minecraft.Server.FourKit/Event/Block/BlockExpEvent.cs
Normal file
31
Minecraft.Server.FourKit/Event/Block/BlockExpEvent.cs
Normal file
|
|
@ -0,0 +1,31 @@
|
|||
namespace Minecraft.Server.FourKit.Event.Block;
|
||||
|
||||
using Minecraft.Server.FourKit.Block;
|
||||
|
||||
/// <summary>
|
||||
/// An event that is called when a block yields experience.
|
||||
/// </summary>
|
||||
public class BlockExpEvent : BlockEvent
|
||||
{
|
||||
private int _exp;
|
||||
internal BlockExpEvent(Block block, int exp)
|
||||
: base(block)
|
||||
{
|
||||
_exp = exp;
|
||||
}
|
||||
|
||||
/// <summary>
|
||||
/// Get the experience dropped by the block after the event has processed.
|
||||
/// </summary>
|
||||
/// <returns>The experience to drop.</returns>
|
||||
public int getExpToDrop() => _exp;
|
||||
|
||||
/// <summary>
|
||||
/// Set the amount of experience dropped by the block after the event has processed.
|
||||
/// </summary>
|
||||
/// <param name="exp">1 or higher to drop experience, else nothing will drop.</param>
|
||||
public void setExpToDrop(int exp)
|
||||
{
|
||||
_exp = exp;
|
||||
}
|
||||
}
|
||||
Loading…
Add table
Add a link
Reference in a new issue