Implemented Enchanting

Implemented Enchanting
This commit is contained in:
Anon 2022-10-14 16:02:34 +00:00 committed by GitHub
commit 12e2c6b4bb
No known key found for this signature in database
GPG key ID: 4AEE18F83AFDEB23
16 changed files with 776 additions and 65 deletions

View file

@ -358,6 +358,42 @@ namespace MinecraftClient
/// <param name="inventoryId"></param>
public virtual void OnInventoryClose(int inventoryId) { }
/// <summary>
/// When received inventory/container/window properties from the server.
/// Used for Frunaces, Enchanting Table, Beacon, Brewing stand, Stone cutter, Loom and Lectern
/// More info about: https://wiki.vg/Protocol#Set_Container_Property
/// </summary>
/// <param name="inventoryID">Inventory ID</param>
/// <param name="propertyId">Property ID</param>
/// <param name="propertyValue">Property Value</param>
public virtual void OnInventoryProperties(byte inventoryID, short propertyId, short propertyValue) { }
/// <summary>
/// When received enchantments from the server this method is called
/// Enchantment levels are the levels of enchantment (eg. I, II, III, IV, V) (eg. Smite IV, Power III, Knockback II ..)
/// Enchantment level requirements are the levels that player needs to have in order to enchant the item
/// </summary>
/// <param name="topEnchantment">Enchantment in the top most slot</param>
/// <param name="middleEnchantment">Enchantment in the middle slot</param>
/// <param name="bottomEnchantment">Enchantment in the bottom slot</param>
/// <param name="topEnchantmentLevel">Enchantment level for the enchantment in the top most slot</param>
/// <param name="middleEnchantmentLevel">Enchantment level for the enchantment in the middle slot</param>
/// <param name="bottomEnchantmentLevel">Enchantment level for the enchantment in the bottom slot</param>
/// <param name="topEnchantmentLevelRequirement">Levels required by player for the enchantment in the top most slot</param>
/// <param name="middleEnchantmentLevelRequirement">Levels required by player for the enchantment in the middle slot</param>
/// <param name="bottomEnchantmentLevelRequirement">Levels required by player for the enchantment in the bottom slot</param>
public virtual void OnEnchantments(
Enchantment topEnchantment,
Enchantment middleEnchantment,
Enchantment bottomEnchantment,
short topEnchantmentLevel,
short middleEnchantmentLevel,
short bottomEnchantmentLevel,
short topEnchantmentLevelRequirement,
short middleEnchantmentLevelRequirement,
short bottomEnchantmentLevelRequirement)
{ }
/// <summary>
/// Called when a player joined the game
/// </summary>