Table of Contents

Class ItemSlotCreative

Namespace
Vintagestory.API.Common
Assembly
VintagestoryAPI.dll
public class ItemSlotCreative : ItemSlot
Inheritance
ItemSlotCreative
Inherited Members
Extension Methods

Constructors

ItemSlotCreative(InventoryBase)

public ItemSlotCreative(InventoryBase inventory)

Parameters

inventory InventoryBase

Methods

ActivateSlotLeftClick(ItemSlot, ref ItemStackMoveOperation)

Activates the left click functions of the given slot.

protected override void ActivateSlotLeftClick(ItemSlot sinkSlot, ref ItemStackMoveOperation op)

Parameters

sinkSlot ItemSlot
op ItemStackMoveOperation

ActivateSlotMiddleClick(ItemSlot, ref ItemStackMoveOperation)

Activates the middle click functions of the given slot.

protected override void ActivateSlotMiddleClick(ItemSlot sinkSlot, ref ItemStackMoveOperation op)

Parameters

sinkSlot ItemSlot
op ItemStackMoveOperation

ActivateSlotRightClick(ItemSlot, ref ItemStackMoveOperation)

Activates the right click functions of the given slot.

protected override void ActivateSlotRightClick(ItemSlot sourceSlot, ref ItemStackMoveOperation op)

Parameters

sourceSlot ItemSlot
op ItemStackMoveOperation

FlipWith(ItemSlot)

Forces a flip with the given ItemSlot

protected override void FlipWith(ItemSlot withslot)

Parameters

withslot ItemSlot

OnItemSlotModified(ItemStack)

The event fired when the slot is modified.

public override void OnItemSlotModified(ItemStack sinkStack)

Parameters

sinkStack ItemStack

TakeOut(int)

Gets some of the contents of the stack.

public override ItemStack TakeOut(int quantity)

Parameters

quantity int

The amount to get from the stack.

Returns

ItemStack

The stack with the quantity take out (or as much as was available)

TakeOutWhole()

Gets the entire contents of the stack, setting the base stack to null.

public override ItemStack TakeOutWhole()

Returns

ItemStack

TryFlipWith(ItemSlot)

Attempts to flip the ItemSlots.

public override bool TryFlipWith(ItemSlot itemSlot)

Parameters

itemSlot ItemSlot

Returns

bool

Whether or no the flip was successful.

TryPutInto(ItemSlot, ref ItemStackMoveOperation)

Returns the quantity of items that were not merged (left over in the source slot)

public override int TryPutInto(ItemSlot sinkSlot, ref ItemStackMoveOperation op)

Parameters

sinkSlot ItemSlot
op ItemStackMoveOperation

Returns

int

Amount of moved items