NetworkInventoryAction
in package
Table of Contents
- ACTION_MAGIC_SLOT_CREATIVE_CREATE_ITEM = 1
- ACTION_MAGIC_SLOT_CREATIVE_DELETE_ITEM = 0
- ACTION_MAGIC_SLOT_DROP_ITEM = 0
- ACTION_MAGIC_SLOT_PICKUP_ITEM = 1
- SOURCE_CONTAINER = 0
- SOURCE_CREATIVE = 3
- SOURCE_TODO = 99999
- SOURCE_TYPE_ANVIL_OUTPUT = -13
- SOURCE_TYPE_ANVIL_RESULT = -12
- SOURCE_TYPE_BEACON = -24
- SOURCE_TYPE_CRAFTING_RESULT = -4
- Fake window IDs for the SOURCE_TODO type (99999)
- SOURCE_TYPE_CRAFTING_USE_INGREDIENT = -5
- SOURCE_TYPE_ENCHANT_OUTPUT = -17
- SOURCE_TYPE_TRADING_INPUT_1 = -20
- SOURCE_TYPE_TRADING_INPUT_2 = -21
- SOURCE_TYPE_TRADING_OUTPUT = -23
- SOURCE_TYPE_TRADING_USE_INPUTS = -22
- SOURCE_WORLD = 2
- $inventorySlot : int
- $newItem : ItemStackWrapper
- $oldItem : ItemStackWrapper
- $sourceFlags : int
- $sourceType : int
- $windowId : int
- read() : $this
- write() : void
Constants
ACTION_MAGIC_SLOT_CREATIVE_CREATE_ITEM
public
mixed
ACTION_MAGIC_SLOT_CREATIVE_CREATE_ITEM
= 1
ACTION_MAGIC_SLOT_CREATIVE_DELETE_ITEM
public
mixed
ACTION_MAGIC_SLOT_CREATIVE_DELETE_ITEM
= 0
ACTION_MAGIC_SLOT_DROP_ITEM
public
mixed
ACTION_MAGIC_SLOT_DROP_ITEM
= 0
ACTION_MAGIC_SLOT_PICKUP_ITEM
public
mixed
ACTION_MAGIC_SLOT_PICKUP_ITEM
= 1
SOURCE_CONTAINER
public
mixed
SOURCE_CONTAINER
= 0
SOURCE_CREATIVE
public
mixed
SOURCE_CREATIVE
= 3
SOURCE_TODO
public
mixed
SOURCE_TODO
= 99999
SOURCE_TYPE_ANVIL_OUTPUT
public
mixed
SOURCE_TYPE_ANVIL_OUTPUT
= -13
SOURCE_TYPE_ANVIL_RESULT
public
mixed
SOURCE_TYPE_ANVIL_RESULT
= -12
SOURCE_TYPE_BEACON
public
mixed
SOURCE_TYPE_BEACON
= -24
SOURCE_TYPE_CRAFTING_RESULT
Fake window IDs for the SOURCE_TODO type (99999)
public
mixed
SOURCE_TYPE_CRAFTING_RESULT
= -4
These identifiers are used for inventory source types which are not currently implemented server-side in MCPE. As a general rule of thumb, anything that doesn't have a permanent inventory is client-side. These types are to allow servers to track what is going on in client-side windows.
Expect these to change in the future.
SOURCE_TYPE_CRAFTING_USE_INGREDIENT
public
mixed
SOURCE_TYPE_CRAFTING_USE_INGREDIENT
= -5
SOURCE_TYPE_ENCHANT_OUTPUT
public
mixed
SOURCE_TYPE_ENCHANT_OUTPUT
= -17
SOURCE_TYPE_TRADING_INPUT_1
public
mixed
SOURCE_TYPE_TRADING_INPUT_1
= -20
SOURCE_TYPE_TRADING_INPUT_2
public
mixed
SOURCE_TYPE_TRADING_INPUT_2
= -21
SOURCE_TYPE_TRADING_OUTPUT
public
mixed
SOURCE_TYPE_TRADING_OUTPUT
= -23
SOURCE_TYPE_TRADING_USE_INPUTS
public
mixed
SOURCE_TYPE_TRADING_USE_INPUTS
= -22
SOURCE_WORLD
public
mixed
SOURCE_WORLD
= 2
Properties
$inventorySlot
public
int
$inventorySlot
$newItem
public
ItemStackWrapper
$newItem
$oldItem
public
ItemStackWrapper
$oldItem
$sourceFlags
public
int
$sourceFlags
= 0
$sourceType
public
int
$sourceType
$windowId
public
int
$windowId
Methods
read()
public
read(PacketSerializer $packet) : $this
Parameters
- $packet : PacketSerializer
Tags
Return values
$this —write()
public
write(PacketSerializer $packet) : void
Parameters
- $packet : PacketSerializer