smartcmd-MinecraftConsoles/Minecraft.Server.FourKit/Inventory/HorseInventory.cs
sylvessa f5f9aa1cf5 finish rewrite; port to cmake, loads of other changes
Theres documentation at https://sylvessa.zip/fourkit/ now. And a bunch of other changes. Check the discord server for a more comprehensive list
2026-03-21 14:01:49 -05:00

37 lines
1.1 KiB
C#

namespace Minecraft.Server.FourKit.Inventory;
/// <summary>
/// Represents the inventory of a Horse.
/// Slot layout: 0 = saddle, 1 = armor, 2+ = chest slots.
/// </summary>
public class HorseInventory : Inventory
{
internal HorseInventory(string title, int size, int entityId)
: base(title, InventoryType.CHEST, size < 2 ? 2 : size, entityId)
{
}
/// <summary>
/// Gets the item in the horse's saddle slot.
/// </summary>
/// <returns>The saddle item.</returns>
public ItemStack? getSaddle() => getItem(0);
/// <summary>
/// Sets the item in the horse's saddle slot.
/// </summary>
/// <param name="stack">The saddle item.</param>
public void setSaddle(ItemStack? stack) => setItem(0, stack);
/// <summary>
/// Gets the item in the horse's armor slot.
/// </summary>
/// <returns>The armor item.</returns>
public ItemStack? getArmor() => getItem(1);
/// <summary>
/// Sets the item in the horse's armor slot.
/// </summary>
/// <param name="stack">The armor item.</param>
public void setArmor(ItemStack? stack) => setItem(1, stack);
}