Table of Contents

Interface IInventoryNetworkUtil

Namespace
Vintagestory.API.Common
Assembly
VintagestoryAPI.dll
public interface IInventoryNetworkUtil

Properties

Api

The core API

ICoreAPI Api { get; set; }

Property Value

ICoreAPI

PauseInventoryUpdates

bool PauseInventoryUpdates { get; set; }

Property Value

bool

Methods

DidClose(IPlayer)

Closes the target inventory attached to a player.

object DidClose(IPlayer player)

Parameters

player IPlayer

Returns

object

DidOpen(IPlayer)

Opens a target inventory, passing it to the player.

object DidOpen(IPlayer player)

Parameters

player IPlayer

Returns

object

GetActivateSlotPacket(int, ItemStackMoveOperation)

Gets the active slot packet.

object GetActivateSlotPacket(int slotId, ItemStackMoveOperation op)

Parameters

slotId int

The slot ID

op ItemStackMoveOperation

The operation of the slot.

Returns

object

GetFlipSlotsPacket(IInventory, int, int)

Flips the items between the source slot and target slot.

object GetFlipSlotsPacket(IInventory sourceInv, int sourceSlotId, int targetSlotId)

Parameters

sourceInv IInventory

The inventory.

sourceSlotId int

The source slot ID

targetSlotId int

The target slot ID

Returns

object

HandleClientPacket(IPlayer, int, byte[])

Handles the client packet.

void HandleClientPacket(IPlayer byPlayer, int packetId, byte[] data)

Parameters

byPlayer IPlayer

The player the packet came from

packetId int

the ID of the packet.

data byte[]

the contents of the packet.