ItemStatePacket¶
@Serializable
data class ItemStatePacket(
val containerId: Int,
val updates: Map<String, BlockEntityStatePacket.SerializedValue> = emptyMap(),
val timestamp: Long = 0
)
A network packet that carries ComposeItemContainerMenu state changes from server to client - the item-backed-menu equivalent of BlockEntityStatePacket. containerId addresses the player's currently open menu directly rather than acting as a lookup key: an item-backed menu is inherently 1:1 with one player's session, so there's no position-keyed registry to look anything up in, unlike a block entity that can be watched by multiple players at once. It's checked purely as a staleness guard against a stray packet arriving after this player closed one item menu and opened another.
Constructors¶
ItemStatePacket¶
constructor(
containerId: Int,
updates: Map<String, BlockEntityStatePacket.SerializedValue> = emptyMap(),
timestamp: Long = 0
)
Types¶
Companion¶
object Companion
Properties¶
containerId¶
val containerId: Int