mirror of
https://github.com/MCCTeam/Minecraft-Console-Client
synced 2025-10-14 21:22:49 +00:00
Implemented entity metadata to keep track of entity health (#1205)
* Implement entity metadata protocol handling * Add health information for entity * Make AutoAttack check entity health * LivingEntity: Default health is 1.0 as per https://wiki.vg/Entity_metadata#Living_Entity * Fix entity metadata for lower MC versions * Fix commit888297d(1.0f instead of 1.0) * Add OnEntityHealth ChatBot event (Remove protocol-dependant stuff from McClient (undo part of85c32b9)) * Remove OnEntityMetadata in favor of OnEntityHealth Co-authored-by: ORelio <ORelio@users.noreply.github.com>
This commit is contained in:
parent
526dabd1e7
commit
2c8ec4aa4a
9 changed files with 191 additions and 2 deletions
|
|
@ -301,5 +301,12 @@ namespace MinecraftClient.Protocol
|
|||
/// <param name="objectivename">The name of the objective the score belongs to</param>
|
||||
/// <param name="value">he score to be displayed next to the entry. Only sent when Action does not equal 1.</param>
|
||||
void OnUpdateScore(string entityname, byte action, string objectivename, int value);
|
||||
|
||||
/// <summary>
|
||||
/// Called when the health of an entity changed
|
||||
/// </summary>
|
||||
/// <param name="entityID">Entity ID</param>
|
||||
/// <param name="health">The health of the entity</param>
|
||||
void OnEntityHealth(int entityID, float health);
|
||||
}
|
||||
}
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue