mirror of
https://github.com/smartcmd/MinecraftConsoles.git
synced 2026-05-19 07:33:52 +00:00
Theres documentation at https://sylvessa.zip/fourkit/ now. And a bunch of other changes. Check the discord server for a more comprehensive list
37 lines
1.1 KiB
C#
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);
|
|
}
|