Skip to content

Stack JSON Syntax

Sara Freimer edited this page Aug 17, 2025 · 5 revisions

Item Stack

count is an optional key for specifying the size of the stack, defaults to one, must be at least one.

components is an optional key for specifying any Data Components the Item Stack has.

{
  "item": REGISTRY_NAME,
  "count": int,
  "components": DATA_COMPONENTS
}
1.15-1.20.1 syntax

nbt is an optional key for specifying any NBT the Item Stack has.

{
  "item": REGISTRY_NAME,
  "count": int,
  "nbt": string
}

Fluid Stack

components is an optional key for specifying any Data Components the Item Stack has.

{
  "fluid": REGISTRY_NAME,
  "amount": int,
  "components": DATA_COMPONENTS
}
1.15-1.20.1 syntax

nbt is an optional key for specifying any NBT the Fluid Stack has.

{
  "fluid": REGISTRY_NAME,
  "count": int,
  "nbt": string
}

Chemical Stack

{
  "chemical": REGISTRY_NAME,
  "amount": long
}

Gas Stack (Pre 10.7.0 only)

{
  "gas": REGISTRY_NAME,
  "amount": long
}

Infusion Stack (Pre 10.7.0 only)

{
  "infuse_type": REGISTRY_NAME,
  "amount": long
}

Pigment Stack (Pre 10.7.0 only)

{
  "pigment": REGISTRY_NAME,
  "amount": long
}

Slurry Stack (Pre 10.7.0 only)

{
  "slurry": REGISTRY_NAME,
  "amount": long
}

Boxed Chemical Stack (Pre 10.7.0 only)

Boxed chemical stacks follow the same format as any of the chemical stacks (gas, infusion, slurry, or pigment) but they have an extra helper tag called to chemicalType inside the block to specify the type of chemical being deserialized. Eventually this might be changed to be automatic. The valid chemical types are:

  • gas
  • infuse_type
  • slurry
  • pigment

For example a Boxed Gas Stack would look like:

{
  "gas": REGISTRY_NAME,
  "amount": long,
  "chemicalType": "gas"
}

Clone this wiki locally