Code refactoring (related to #1024)

This commit is contained in:
ORelio 2020-05-25 21:39:24 +02:00
parent d120001d70
commit 23870711a0
11 changed files with 69 additions and 100 deletions

View file

@ -887,17 +887,16 @@ namespace MinecraftClient
}
/// <summary>
/// Interact with an entity
/// Give Creative Mode items into regular/survival Player Inventory
/// </summary>
/// <param name="slot"></param>
/// <param name="ItemType"></param>
/// <param name="count"></param>
/// <returns></returns>
protected bool CreativeInventoryAction(int slot, ItemType ItemType, int count)
/// <remarks>(obviously) requires to be in creative mode</remarks>
/// <param name="slot">Destination inventory slot</param>
/// <param name="itemType">Item type</param>
/// <param name="count">Item count</param>
/// <returns>TRUE if item given successfully</returns>
protected bool CreativeGive(int slot, ItemType itemType, int count)
{
Dictionary<string, object> NBT = null;
Item item = new Item((int)ItemType, count, NBT);
return Handler.DoCreativeInventoryAction(slot, item);
return Handler.DoCreativeGive(slot, itemType, count);
}
/// <summary>