Module item_stack
Expand description
Owned item values and typed component patches. Owned item values. Registry-dependent validation belongs to the game’s write boundary.
Structs§
- Components
- An owned component patch, independent of the engine’s component representation.
- Item
Stack - A nonempty, owned item value. Maxima are checked when the game accepts a write,
not by this record: item definitions and effective component overrides belong to the game.
The component patch is shared copy-on-write:
Clonecounts a reference instead of copying it, the first write through a shared stack copies the patch once, and equality of two stacks that still share it is a pointer comparison. An absent patch allocates nothing. - Stack
Split - The two nonempty portions of a consuming split. Either portion can be absent.
Enums§
- Stack
Error - A stack operation could not represent the requested count.
- Stack
Write Error - Why the game refused to accept an owned stack at a write boundary.
Traits§
- Component
- A typed descriptor for one component in an item’s component patch. Implementations own the conversion between their value and Minecraft NBT.