Zig: Items and containers¶
Item¶
An item stack as SNBT, a value: reading it asks the host about that SNBT.
Item.of¶
| Zig | |
|---|---|
- Parameters:
- item_snbt_value :
[]const u8
- item_snbt_value :
- Return type:
Item
Item.count¶
| Zig | |
|---|---|
PIER_IPROP_COUNT: ItemStackBase::mCount
- Return type:
core.Error!f64 - Slots:
item_get_num
Item.maxStackSize¶
| Zig | |
|---|---|
PIER_IPROP_MAX_STACK_SIZE: ItemStackBase::getMaxStackSize
- Return type:
core.Error!f64 - Slots:
item_get_num
Item.auxValue¶
| Zig | |
|---|---|
PIER_IPROP_AUX_VALUE: ItemStackBase::getAuxValue
- Return type:
core.Error!f64 - Slots:
item_get_num
Item.id¶
| Zig | |
|---|---|
PIER_IPROP_ID: ItemStackBase::getId
- Return type:
core.Error!f64 - Slots:
item_get_num
Item.damage¶
| Zig | |
|---|---|
PIER_IPROP_DAMAGE: ItemStackBase::getDamageValue
- Return type:
core.Error!f64 - Slots:
item_get_num
Item.isNull¶
| Zig | |
|---|---|
PIER_IPROP_IS_NULL: ItemStackBase::isNull
- Return type:
core.Error!bool - Slots:
item_get_num
Item.isBlock¶
| Zig | |
|---|---|
PIER_IPROP_IS_BLOCK: ItemStackBase::isBlock
- Return type:
core.Error!bool - Slots:
item_get_num
Item.isEnchanted¶
| Zig | |
|---|---|
PIER_IPROP_IS_ENCHANTED: ItemStackBase::isEnchanted
- Return type:
core.Error!bool - Slots:
item_get_num
Item.isArmor¶
| Zig | |
|---|---|
PIER_IPROP_IS_ARMOR: ItemStackBase::isArmorItem
- Return type:
core.Error!bool - Slots:
item_get_num
Item.isDamageable¶
| Zig | |
|---|---|
PIER_IPROP_IS_DAMAGEABLE: ItemStackBase::isDamageableItem
- Return type:
core.Error!bool - Slots:
item_get_num
Item.isDamaged¶
| Zig | |
|---|---|
PIER_IPROP_IS_DAMAGED: ItemStackBase::isDamaged
- Return type:
core.Error!bool - Slots:
item_get_num
Item.maxDamage¶
| Zig | |
|---|---|
PIER_IPROP_MAX_DAMAGE: ItemStackBase::getMaxDamage
- Return type:
core.Error!f64 - Slots:
item_get_num
Item.isUnbreakable¶
| Zig | |
|---|---|
PIER_IPROP_IS_UNBREAKABLE: ItemStackBase::isUnbreakable
- Return type:
core.Error!bool - Slots:
item_get_num
Item.hasDurability¶
| Zig | |
|---|---|
PIER_IPROP_HAS_DURABILITY: ItemStackBase::hasDurability
- Return type:
core.Error!bool - Slots:
item_get_num
Item.isPotion¶
| Zig | |
|---|---|
PIER_IPROP_IS_POTION: ItemStackBase::isPotionItem
- Return type:
core.Error!bool - Slots:
item_get_num
Item.isThrowable¶
| Zig | |
|---|---|
PIER_IPROP_IS_THROWABLE: ItemStackBase::isThrowable
- Return type:
core.Error!bool - Slots:
item_get_num
Item.isFireResistant¶
| Zig | |
|---|---|
PIER_IPROP_IS_FIRE_RESISTANT: ItemStackBase::isFireResistant
- Return type:
core.Error!bool - Slots:
item_get_num
Item.attackDamage¶
| Zig | |
|---|---|
PIER_IPROP_ATTACK_DAMAGE: ItemStackBase::getAttackDamage
- Return type:
core.Error!f64 - Slots:
item_get_num
Item.repairCost¶
| Zig | |
|---|---|
PIER_IPROP_REPAIR_COST: ItemStackBase::getBaseRepairCost
- Return type:
core.Error!f64 - Slots:
item_get_num
Item.enchantValue¶
| Zig | |
|---|---|
PIER_IPROP_ENCHANT_VALUE: ItemStackBase::getEnchantValue
- Return type:
core.Error!f64 - Slots:
item_get_num
Item.isStackable¶
| Zig | |
|---|---|
PIER_IPROP_IS_STACKABLE: ItemStackBase::isStackable
- Return type:
core.Error!bool - Slots:
item_get_num
Item.isMusicDisc¶
| Zig | |
|---|---|
PIER_IPROP_IS_MUSIC_DISC: ItemStackBase::isMusicDiscItem
- Return type:
core.Error!bool - Slots:
item_get_num
Item.isOffhand¶
| Zig | |
|---|---|
PIER_IPROP_IS_OFFHAND: ItemStackBase::isOffhandItem
- Return type:
core.Error!bool - Slots:
item_get_num
Item.useDuration¶
| Zig | |
|---|---|
PIER_IPROP_USE_DURATION: ItemStackBase::getMaxUseDuration
- Return type:
core.Error!f64 - Slots:
item_get_num
Item.isGlint¶
| Zig | |
|---|---|
PIER_IPROP_IS_GLINT: ItemStackBase::isGlint
- Return type:
core.Error!bool - Slots:
item_get_num
Item.isBundle¶
| Zig | |
|---|---|
PIER_IPROP_IS_BUNDLE: ItemStackBase::isBundle
- Return type:
core.Error!bool - Slots:
item_get_num
Item.hasUserData¶
| Zig | |
|---|---|
PIER_IPROP_HAS_USER_DATA: ItemStackBase::hasUserData
- Return type:
core.Error!bool - Slots:
item_get_num
Item.hasCustomName¶
| Zig | |
|---|---|
PIER_IPROP_HAS_CUSTOM_NAME: ItemStackBase::hasCustomHoverName
- Return type:
core.Error!bool - Slots:
item_get_num
Item.typeName¶
| Zig | |
|---|---|
PIER_ISTR_TYPE_NAME: ItemStackBase::getTypeName ("minecraft:apple")
- Parameters:
- allocator :
std.mem.Allocator
- allocator :
- Return type:
core.Error![]u8 - Slots:
item_get_str
Item.name¶
| Zig | |
|---|---|
PIER_ISTR_NAME: ItemStackBase::getName (display)
- Parameters:
- allocator :
std.mem.Allocator
- allocator :
- Return type:
core.Error![]u8 - Slots:
item_get_str
Item.customName¶
| Zig | |
|---|---|
PIER_ISTR_CUSTOM_NAME: ItemStackBase::getCustomName
- Parameters:
- allocator :
std.mem.Allocator
- allocator :
- Return type:
core.Error![]u8 - Slots:
item_get_str
Item.rawNameId¶
| Zig | |
|---|---|
PIER_ISTR_RAW_NAME_ID: ItemStackBase::getRawNameId
- Parameters:
- allocator :
std.mem.Allocator
- allocator :
- Return type:
core.Error![]u8 - Slots:
item_get_str
Item.lore¶
| Zig | |
|---|---|
PIER_ISTR_LORE: SNBT list ["l1","l2"] ItemStackBase::getCustomLore
- Parameters:
- allocator :
std.mem.Allocator
- allocator :
- Return type:
core.Error![]u8 - Slots:
item_get_str
Item.canDestroy¶
| Zig | |
|---|---|
PIER_ISTR_CAN_DESTROY: SNBT list ["minecraft:stone",β¦]
- Parameters:
- allocator :
std.mem.Allocator
- allocator :
- Return type:
core.Error![]u8 - Slots:
item_get_str
Item.canPlaceOn¶
| Zig | |
|---|---|
PIER_ISTR_CAN_PLACE_ON: SNBT list
- Parameters:
- allocator :
std.mem.Allocator
- allocator :
- Return type:
core.Error![]u8 - Slots:
item_get_str
Item.userData¶
| Zig | |
|---|---|
PIER_ISTR_USER_DATA: full NBT user data as SNBT
- Parameters:
- allocator :
std.mem.Allocator
- allocator :
- Return type:
core.Error![]u8 - Slots:
item_get_str
Item.hoverName¶
| Zig | |
|---|---|
PIER_ISTR_HOVER_NAME: ItemStackBase::getHoverName
- Parameters:
- allocator :
std.mem.Allocator
- allocator :
- Return type:
core.Error![]u8 - Slots:
item_get_str
Item.effectName¶
| Zig | |
|---|---|
PIER_ISTR_EFFECT_NAME: ItemStackBase::getEffectName
- Parameters:
- allocator :
std.mem.Allocator
- allocator :
- Return type:
core.Error![]u8 - Slots:
item_get_str
Item.color¶
| Zig | |
|---|---|
PIER_ISTR_COLOR: SNBT {r,g,b} ItemStackBase::getColor
- Parameters:
- allocator :
std.mem.Allocator
- allocator :
- Return type:
core.Error![]u8 - Slots:
item_get_str