Added a command to (re)name items in the Anvil

This commit is contained in:
Anon 2023-06-03 16:12:17 +02:00
parent 9855e2e0f1
commit fce12db33f
8 changed files with 174 additions and 0 deletions

View file

@ -2390,6 +2390,21 @@ namespace MinecraftClient
return false;
}
}
/// <summary>
/// Send the server a command to type in the item name in the Anvil inventory when it's open.
/// </summary>
/// <param name="itemName">The new item name</param>
public bool SendRenameItem(string itemName)
{
if (inventories.Count == 0)
return false;
if (inventories.Values.ToList().Last().Type != ContainerType.Anvil)
return false;
return handler.SendRenameItem(itemName);
}
#endregion
#region Event handlers: An event occurs on the Server