public void SetInventory(Item newItem, short slotId) { //TODO: Maybe change this to Player.Inventory.SetItem(Item, SlotID) if (Inventory.ContainsKey(slotId)) { Inventory.Remove(slotId); } Inventory.Add(slotId, newItem); }
public static Item ItemFromSlot(SlotData item) { var newItem = new Item { ItemId = item.Id, ItemCount = item.ItemCount, ItemDamage = item.ItemDamage, NbtData = item.NbtData }; return newItem; }
public void RaiseSetWindowSlot(sbyte windowid, short slot, Item item) { if (SetWindowItem != null) SetWindowItem(windowid, slot, item); }
public void RaiseInventoryItem(short slot, Item item) { if (SetInventoryItem != null) SetInventoryItem(slot, item); }
public void RaiseEntityEquipment(int entityId, int slot, Item newItem) { if (EntityEquipmentChanged != null) EntityEquipmentChanged(entityId, slot, newItem); }