More events (#1660)

* + OnBlockBreakAnimation

* + OnBlockBreakAnimation

* + OnEntityAnimation

* Add checks

* + OnBlockChange

* + OnMultiBlockChange

* Fix

* Fix

* Fix

* add summary

* Fix

* fix other summary
This commit is contained in:
Рома Данилов 2021-07-04 11:26:41 +05:00 committed by GitHub
parent c0f128f632
commit 48577bf034
No known key found for this signature in database
GPG key ID: 4AEE18F83AFDEB23
4 changed files with 97 additions and 19 deletions

View file

@ -115,6 +115,21 @@ namespace MinecraftClient
/// </summary>
public virtual void Update() { }
/// <summary>
/// Will be called every player break block in gamemode 0
/// </summary>
/// <param name="entity">Player</param>
/// <param name="location">Block location</param>
/// <param name="stage">Destroy stage, maximum 255</param>
public virtual void OnBlockBreakAnimation(Entity entity, Location location, byte stage) { }
/// <summary>
/// Will be called every animations of the hit and place block
/// </summary>
/// <param name="entity">Player</param>
/// <param name="animation">0 = LMB, 1 = RMB (RMB Corrent not work)</param>
public virtual void OnEntityAnimation(Entity entity, byte animation) { }
/// <summary>
/// Any text sent by the server will be sent here by MinecraftCom
/// </summary>
@ -211,6 +226,7 @@ namespace MinecraftClient
/// Called when an explosion occurs on the server
/// </summary>
/// <param name="explode">Explosion location</param>
/// <param name="strength">Explosion strength</param>
/// <param name="recordcount">Amount of blocks blown up</param>
public virtual void OnExplosion(Location explode, float strength, int recordcount) { }
@ -284,11 +300,11 @@ namespace MinecraftClient
/// <param name="slot"> Equipment slot. 0: main hand, 1: off hand, 25: armor slot (2: boots, 3: leggings, 4: chestplate, 5: helmet)</param>
/// <param name="item"> Item)</param>
public virtual void OnEntityEquipment(Entity entity, int slot, Item item) { }
/// <summary>
/// Called when an entity has effect applied
/// </summary>
/// <param name="entityid">entity ID</param>
/// <param name="entity">entity</param>
/// <param name="effect">effect id</param>
/// <param name="amplifier">effect amplifier</param>
/// <param name="duration">effect duration</param>
@ -367,7 +383,6 @@ namespace MinecraftClient
/// </summary>
/// <param name="entity">Entity</param>
/// <param name="metadata">The metadata of the entity</param>
/// <param name="protocolversion">Ptotocol version</param>
public virtual void OnEntityMetadata(Entity entity, Dictionary<int, object> metadata) { }
/// <summary>