Item_ItemStack: {
    type: "compound";
    value: {
        Block?: { type: "compound"; value: object } & Block;
        CanDestroy?: { type: "list"; value: { type: "string"; value: string[] } };
        CanPlaceOn?: { type: "list"; value: { type: "string"; value: string[] } };
        Count: { type: "byte"; value: number };
        Damage: { type: "short"; value: number };
        Name: { type: "string"; value: string };
        tag?: { type: "compound"; value: object };
        WasPickedUp: { type: "byte"; value: number };
    };
}

All items share this base.

Type declaration

  • type: "compound"
  • value: {
        Block?: { type: "compound"; value: object } & Block;
        CanDestroy?: { type: "list"; value: { type: "string"; value: string[] } };
        CanPlaceOn?: { type: "list"; value: { type: "string"; value: string[] } };
        Count: { type: "byte"; value: number };
        Damage: { type: "short"; value: number };
        Name: { type: "string"; value: string };
        tag?: { type: "compound"; value: object };
        WasPickedUp: { type: "byte"; value: number };
    }
    • OptionalBlock?: { type: "compound"; value: object } & Block

      (May not exist) What block is placed when placing a block item.

    • OptionalCanDestroy?: { type: "list"; value: { type: "string"; value: string[] } }

      (May not exist) Controls what block types this item can destroy.

    • OptionalCanPlaceOn?: { type: "list"; value: { type: "string"; value: string[] } }

      (May not exist) Controls what block types this block may be placed on.

    • Count: { type: "byte"; value: number }

      Number of items stacked in this inventory slot.

    • Damage: { type: "short"; value: number }

      The metadata value. Note that this tag does not store items' damage value.

    • Name: { type: "string"; value: string }

      The item ID.

    • Optionaltag?: { type: "compound"; value: object }

      (May not exist) Additional information about the item.

    • WasPickedUp: { type: "byte"; value: number }

      UNDOCUMENTED.