Skip to content

Custom Strains

Warlon Mhite edited this page Nov 8, 2026 · 3 revisions

Home › Servers & modpacks › Custom Strains

How to change a strain, or add one, with nothing but a datapack: a rebalanced Lemon Haze, then a smokable resin of your own, then the whole datapack folder and how to test it. For pack makers and server owners. Every field is described on Datapacks; this page is the walk-through.

On this page: What a datapack can do · 1. Rebalance a shipped strain · 2. Add a resin of your own · 3. The example datapack · 4. Test it in game · Going further

What a datapack can do

A strain is a small JSON file: a name, a colour, the item that packs, and the effects of one hit. The mod reads every strain file in every datapack when the world opens, and sends them to every player who joins.

A datapack can A datapack cannot
change what any shipped strain does — effects, levels, lengths, odds add an item, a block, a crop or seeds
add a strain that packs an item that already exists — the mod's, vanilla's or another mod's add a texture or a model (a resource pack can, see Resource Packs)
give it its own colour on every pipe, bong, vaporizer and moon rock give it its own spliff art (needs a resource pack and a model_index)
make it packable in the pipe, bong and vaporizer, with no recipe of its own add a lang line, so its name must reuse a key that exists (or come from a resource pack)
add spliff and hash-spliff recipes that carry it add a new status effect, a new device or a new rule
filter advancements on it (hempdustry:smoke with strain)

What needs a mod: anything that is not data — a new plant with its own seeds and growth stages, a new item to smoke, a new effect. A mod (or a scripting mod that can register items) supplies the item; the strain file can then live in that mod's jar or in your datapack, and point at it. For mod authors: Addon Development.

How a datapack strain looks. It has no art of its own, so it wears the shared art with its color painted on the load: the bowl of a pipe, bong or vaporizer, the coat of a moon rock, the tip of the shared spliff. Tinting multiplies the drawn colour, so pick the brightest shade you want, not the middle of the range. Leave model_index at 0: it is the number that picks bespoke spliff art, 1–99 belong to the mod, and an index with no art behind it wears the shared tinted spliff, as 0 does (Datapacks).

1. Rebalance a shipped strain

To change a strain the mod ships, write a file at the same path in your datapack. Yours replaces the mod's.

  1. Open the mod's jar (it is a zip file) and copy data/hempdustry/hempdustry/strain/sativa.json — Lemon Haze. The ids of all nine are on Datapacks: indica is Purple Kush, sativa Lemon Haze, beldia Beldía.
  2. Put it in your datapack at the same path: data/hempdustry/hempdustry/strain/sativa.json.
  3. Edit it. Here Hunger stays at level I however much is smoked, and Weakness stops at level II:
{
  "buds": "hempdustry:sativa_buds",
  "color": 13095242,
  "effects": [
    {
      "effect": "minecraft:speed"
    },
    {
      "effect": "minecraft:haste"
    },
    {
      "effect": "minecraft:hunger",
      "scales": false
    },
    {
      "effect": "minecraft:weakness",
      "max_amplifier": 1
    }
  ],
  "flower": "hempdustry:sativa_flower",
  "model_index": 2,
  "seeds": "hempdustry:sativa_seeds",
  "translation_key": "hempdustry.strain.sativa"
}
  1. Restart (below).

Watch out: your file replaces the whole of the mod's, so keep every field you are not changing. Drop seeds and flower and Lemon Haze stops being a plant: its seeds leave the grass and chest loot, and its seeds, buds and spliffs leave the creative tab. Keep model_index and buds as they were, or the spliff art and packing go wrong.

The server's config still caps the result: helpful effects stop at maxBuffLevel (level II by default) whatever the file asks for (Configuration).

2. Add a resin of your own

The mod's hash family — Hashish, Charas, Filtered Hashish, Rosin — are strains with no seeds and no wild plant: something you pack, not something you grow. A datapack can add one the same way, as long as the item exists.

The example below is Honeycomb, after the waxy concentrate of that name, packed from vanilla's own Honeycomb item. Any existing item works the same way — another mod's hash item, if your pack has one.

The file: data/examplepack/hempdustry/strain/honeycomb.json, so the strain's id is examplepack:honeycomb. Note the hempdustry folder inside your namespace: without it the file is silently ignored.

{
  "translation_key": "item.minecraft.honeycomb",
  "color": 15905597,
  "buds": "minecraft:honeycomb",
  "cough_factor": 2.0,
  "effects": [
    {
      "effect": "minecraft:regeneration",
      "scales": false,
      "duration_factor": 0.2
    },
    {
      "effect": "minecraft:slowness",
      "scales": false
    },
    {
      "effect": "minecraft:hunger"
    }
  ]
}
Line Why
translation_key A datapack cannot add a name, so this borrows the item's own: loaded devices read "Honeycomb Pipe", "Honeycomb Bong", "Honeycomb Vaporizer".
color 0xF2B33D, a honey orange, written in decimal. Convert any RRGGBB hex colour to decimal.
buds The item that packs. Pick one no other strain packs: with two strains on one item, packing always gives the mod's own strain, or else the one with the lowest id, so yours may never come out of the grid.
no seeds, no flower A resin: it is not grown, its seeds do not turn up in grass, and it is never rolled into a spliff on its own.
no model_index 0, the shared tinted art.
cough_factor 2.0: half the coughs of whatever it is smoked from.
effects Regeneration I for a fifth of the device's time (7 s from a pipe, 10 s from a bong); Slowness I; Hunger, which rises with the dose as in every shipped strain.

What it gets with no more work:

  • It packs into an empty Wooden Pipe, Bong (any glass) or Redstone Vaporizer in a crafting grid: the device plus one item per level, up to the device's limit (pipe 2, bong 3, vaporizer 1). The level is the dose, as for buds (Smoking).
  • The creative tab lists a packed pipe, bong and vaporizer of it, and the creative search every level. JEI and REI show its packing rows.
  • A full green-out ends its Regeneration along with every other buff, and hempdustry:smoke advancements can filter on "strain": "examplepack:honeycomb".
  • Because it has no flower and has a helpful effect, it counts as a concentrate: smoked in one load with a bud, it lifts that bud's dose-scaling helpful effects one level past the usual cap, as hash does.
  • A vaporizer bowl of it hands back no Scorched Hemp: only plant matter does.

What it does not get: a spliff of its own (the mod never rolls a joint of resin alone, and lists none), and art beyond its colour.

Rolling it into a spliff

A hash spliff is a plain crafting recipe whose result carries both strains. This one is a bud of Purple Kush and one Honeycomb on top of two paper, the shape the mod's own hash spliffs use. Minecraft 1.21.11 — data/examplepack/recipe/spliff_indica_with_honeycomb.json:

{
  "type": "minecraft:crafting_shaped",
  "category": "misc",
  "group": "spliff",
  "key": {
    "B": "hempdustry:indica_buds",
    "H": "minecraft:honeycomb",
    "P": "minecraft:paper"
  },
  "pattern": [
    "BH",
    "PP"
  ],
  "result": {
    "components": {
      "hempdustry:smoke_contents": {
        "entries": [
          {
            "count": 1,
            "strain": "hempdustry:indica"
          },
          {
            "count": 1,
            "strain": "examplepack:honeycomb"
          }
        ]
      }
    },
    "count": 1,
    "id": "hempdustry:spliff"
  }
}

Minecraft 26.2 and 26.3 take the 1.21.11 file as it is. (The mod's own recipes there leave out category and count, which default to misc and 1.)

Minecraft 1.21.1 writes ingredients as objects; everything else is the same:

  "key": {
    "B": { "item": "hempdustry:indica_buds" },
    "H": { "item": "minecraft:honeycomb" },
    "P": { "item": "minecraft:paper" }
  },

The spliff is named for the plant ("Purple Kush Spliff") and says "With Honeycomb" underneath. Unlike strains, recipes are re-read by /reload.

A variation: a concentrate that fills a bowl

Add "dose_per_item": 3 and one Honeycomb is a whole bowl, the way one piece of Rosin is. Since the dose is measured against each device's limit, it then fits only the Bong. The mod never rolls a concentrate into a spliff, and neither should a recipe of yours.

3. The example datapack

The whole thing, ready to drop into a world:

examplepack/
├── pack.mcmeta
└── data/
    └── examplepack/
        ├── hempdustry/
        │   └── strain/
        │       └── honeycomb.json
        └── recipe/
            └── spliff_indica_with_honeycomb.json

The rebalanced Lemon Haze from step 1 would sit beside it at data/hempdustry/hempdustry/strain/sativa.json.

pack.mcmeta for Minecraft 1.21.11 (data pack format 94):

{
  "pack": {
    "description": "Honeycomb for Hempdustry",
    "min_format": 94,
    "max_format": 94
  }
}

On Minecraft 26.2 the data pack format is 107, and on 26.3 121: the same file with those numbers in min_format and max_format.

pack.mcmeta for Minecraft 1.21.1 (data pack format 48):

{
  "pack": {
    "description": "Honeycomb for Hempdustry",
    "pack_format": 48
  }
}

A pack for several versions is simplest as one pack each: the format numbers differ, and on 1.21.1 the recipe's ingredient syntax too. The strain file itself is the same on all of them. Minecraft 1.16.5 and 1.18.2 read the same strain file too, but their pack format, folders and recipes are older, and /reload re-reads strains there (Datapacks).

4. Test it in game

  1. Install it. Put the examplepack folder in the world's datapacks/ folder — saves/<world>/datapacks/ in single player, world/datapacks/ on a server.
  2. Restart. Strains are read once, when the world opens; /reload does not re-read them. Leave the world and open it again, or restart the server. /datapack list should show file/examplepack enabled.
  3. Check the log (logs/latest.log). A world that refuses to open means a broken file: the log says Registry loading errors: and names the registry, your entry and what is wrong — usually a missing comma, a misspelt field or an item id that does not exist. A strain that is simply missing means a misplaced file: check the hempdustry/strain/ folder.
  4. Pack one. /give @s hempdustry:wooden_pipe and /give @s minecraft:honeycomb 2, then put the pipe and two Honeycomb in a crafting grid, one Honeycomb per slot (a slot counts once, however many it holds): out comes a Honeycomb Pipe II, its bowl in honey orange. Smoke it.
  5. Or give one ready-packed, with the components a packed pipe carries:
    /give @s hempdustry:wooden_pipe[hempdustry:smoke_contents={entries:[{strain:"examplepack:honeycomb",count:2}]},hempdustry:charges=2]
    
    count is the dose and charges the hits left in the bowl (a pipe's bowl is 2). More about /give and the mod's components: Commands.
  6. Look in the creative tab. The Hempdustry tab's smoking run shows a packed pipe, bong and vaporizer of every loaded strain, yours included; the search tab shows every level. A strain that reuses another strain's seeds, buds or flower does not add them twice: each item appears once.
  7. Craft the spliff from the recipe above, or look it up in JEI or REI (EMI on 1.21.1).

To take the strain out again, remove the file and restart. Anything already loaded with it does not vanish: a pipe or bong comes back empty, and a spliff becomes an inert one, with a line in the log.

Going further

  • A proper name. A resource pack can add a lang line (assets/examplepack/lang/en_us.json: "strain.examplepack.honeycomb": "Honeycomb Wax") and the strain can name that key. Players without the resource pack see the raw key, so ship it as the server's resource pack. See Resource Packs and Translating.
  • Its own spliff art. A resource pack can draw a spliff for a strain with a model_index of 100 or more and add an entry for it to the spliff's item definition (Resource Packs). Without that entry, an index of 100 wears the shared tinted spliff.
  • A plant of its own — seeds that grow, a crop, a wild plant — needs a mod. A datapack strain can name the seeds and flower of an existing plant, but then two strains share one plant's seeds and buds, and a packed bowl of those buds always comes out as the mod's own strain.
  • The rest of the balance — each device's time, cooldown and odds, the edibles, the green-out — is data too: Datapacks.

See also: Datapacks · Strains · Smoking · Modpack Guide

Clone this wiki locally