mirror of
https://github.com/MCCTeam/Minecraft-Console-Client
synced 2025-10-14 21:22:49 +00:00
Add code documentation for inventories
This commit is contained in:
parent
195e162c7d
commit
6929ae236a
6 changed files with 134 additions and 18 deletions
|
|
@ -5,26 +5,64 @@ using System.Text;
|
|||
|
||||
namespace MinecraftClient.Inventory
|
||||
{
|
||||
/// <summary>
|
||||
/// Represents an item inside a Container
|
||||
/// </summary>
|
||||
public class Item
|
||||
{
|
||||
/// <summary>
|
||||
/// Item Type ID
|
||||
/// </summary>
|
||||
public int ID;
|
||||
|
||||
/// <summary>
|
||||
/// Item Count
|
||||
/// </summary>
|
||||
public int Count;
|
||||
public int SlotID = -1; // which slot is this item at, -1 = not specified
|
||||
|
||||
/// <summary>
|
||||
/// Slot ID in the parent inventory (-1 means not specified)
|
||||
/// </summary>
|
||||
public int SlotID = -1;
|
||||
|
||||
/// <summary>
|
||||
/// Item Metadata
|
||||
/// </summary>
|
||||
public Dictionary<string, object> NBT;
|
||||
|
||||
public Item(int ID,int Count,int SlotID, Dictionary<string,object> NBT)
|
||||
/// <summary>
|
||||
/// Create an item with Type ID, Count, Slot ID and Metadata
|
||||
/// </summary>
|
||||
/// <param name="ID">Item Type ID</param>
|
||||
/// <param name="Count">Item Count</param>
|
||||
/// <param name="SlotID">Item Slot ID in parent inventory</param>
|
||||
/// <param name="NBT">Item Metadata</param>
|
||||
public Item(int ID,int Count,int SlotID, Dictionary<string, object> NBT)
|
||||
{
|
||||
this.ID = ID;
|
||||
this.Count = Count;
|
||||
this.SlotID = SlotID;
|
||||
this.NBT = NBT;
|
||||
}
|
||||
|
||||
/// <summary>
|
||||
/// Create an item with Type ID, Count and Slot ID
|
||||
/// </summary>
|
||||
/// <param name="ID">Item Type ID</param>
|
||||
/// <param name="Count">Item Count</param>
|
||||
/// <param name="SlotID">Item Slot ID in parent inventory</param>
|
||||
public Item(int ID, int Count, int SlotID)
|
||||
{
|
||||
this.ID = ID;
|
||||
this.Count = Count;
|
||||
this.SlotID = SlotID;
|
||||
}
|
||||
|
||||
/// <summary>
|
||||
/// Create an item with Type ID and Count
|
||||
/// </summary>
|
||||
/// <param name="ID">Item Type ID</param>
|
||||
/// <param name="Count">Item Count</param>
|
||||
public Item(int ID, int Count)
|
||||
{
|
||||
this.ID = ID;
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue