Skip to content

Datapack Custom Strains

Tijl Moreau edited this page Nov 16, 2026 · 1 revision

Adding your own strains with a datapack

Strains in Smokeleaf Industries are data. The 25 built-in strains are JSON files, and a datapack can add new ones, or change the built-in ones, without writing any code.

1. Where the file goes

your_datapack/
├── pack.mcmeta
└── data/
    └── <your_namespace>/
        └── smokeleafindustries/
            └── strain/
                └── midnight_mint.json

The file name is the strain ID (midnight_mint). Only the file name counts, not the namespace, so a file named white_widow.json in any namespace replaces the built-in White Widow.

pack.mcmeta for 1.21.1:

{ "pack": { "pack_format": 48, "description": "My Smokeleaf strains" } }

2. The strain file

{
  "name": "Midnight Mint",
  "identified": true,

  "color": -9520996,
  "leaf_color": -13744573,

  "thc": 22,
  "cbd": 4,

  "n": 12,
  "p": 9,
  "k": 16,

  "effects": [
    "smokeleafindustries:chillout",
    "minecraft:night_vision"
  ],
  "amp": 1,
  "dur": 220
}
Field Required Meaning
name yes Display name shown on items and tooltips
identified yes true for a named strain. false makes it show as "Unidentified"
color yes Accent colour (the bud/flower highlights)
leaf_color no Leaf colour. Defaults to a hemp green
thc yes THC level. Higher THC grants more extra effects when consumed
cbd yes CBD level. Higher CBD makes effects last longer
n, p, k yes The nitrogen, phosphorus and potassium levels the plant wants. Players reach these with fertilizers for the best yield
effects yes List of effect IDs applied when consumed. Any mod's effects work
amp yes Effect amplifier (0 = level I, 1 = level II)
dur yes Base effect duration in ticks (20 ticks = 1 second)
weed_color, weed_leaf_color no Override colours for ground weed
seeds_color, seeds_leaf_color no Override colours for seeds
extract_color, extract_leaf_color no Override colours for extract and oil
base_strain_1, base_strain_2 no Parent strain IDs, for lineage

Colours

Colours are ARGB written as a signed integer. To convert a hex colour such as #6EB89C:

value = 0xFF6EB89C - 4294967296 = -9520996

Or in a browser console: (0xFF6EB89C | 0).

Effects added by the mod

stoned, bubbled, uplifted, paranoia, relaxed, shy, aroused, breathing, sleepy, melted, dizzy, scrambled_mouth, rainbow, brain_melt, high_flyer, dry_eyes, dry_mouth, chillout, zombified, echo_location, friend_or_foe, linguists_high, sticky_icky, r_trees, vein_high

Prefix each with smokeleafindustries:.

3. Making the strain obtainable

A strain file defines the strain. Players still need a way to get it. Pick one or more:

Sequencer recipe (survival-friendly). Add data/<namespace>/recipe/midnight_mint_sequencer.json:

{
  "type": "smokeleafindustries:sequencer",
  "dna": { "item": "smokeleafindustries:dna_strand" },
  "base_extract": { "item": "smokeleafindustries:base_extract" },
  "required_reagents": [
    { "item": "minecraft:kelp" },
    { "item": "minecraft:ink_sac" },
    { "item": "minecraft:glow_berries" }
  ],
  "result": { "id": "smokeleafindustries:extract", "count": 1 },
  "strain_id": "midnight_mint"
}

The three reagents are what the player loads into a DNA Strand in the Synthesizer. The Sequencer then turns it into extract of your strain, which enters the normal chain from there (Liquifier, Mixer, Mutator).

Loot tables, recipes or KubeJS trades. Anything that can produce an item with components can hand out seeds directly. The stack must carry the full smokeleafindustries:strain_data component as well as smokeleafindustries:strain_id (same shape as the command below); the ID alone is not enough.

Commands, for testing or quest rewards:

/give @s smokeleafindustries:seeds[smokeleafindustries:strain_id="midnight_mint",smokeleafindustries:strain_data={name:"Midnight Mint",identified:1b,color:-9520996,leaf_color:-13744573,thc:22,cbd:4,n:12,p:9,k:16,effects:["smokeleafindustries:chillout","minecraft:night_vision"],amp:1,dur:220}]

4. Loading and testing

  1. Put the datapack in world/datapacks/ (or ship it with your pack through a global datapack mod or KubeJS's data folder).
  2. Restart the world or server. Strains are a datapack registry, so /reload does not pick up new or changed strain files.
  3. Check the log for StrainRegistry reloaded: N strains available. N should be 25 plus the number you added.

Good to know

  • The creative tab lists the 25 built-in strains only. Datapack strains do not appear there, but they do appear in JEI's strain lists.
  • To rebalance a built-in strain, copy its file from the mod jar (data/smokeleafindustries/smokeleafindustries/strain/), change the numbers and keep the file name.
  • Player-bred strains made in the Mixer and Mutator are separate from datapack strains and are saved with the world.
  • All machine recipes are ordinary datapack recipes too (drying, grinder, extractor, liquifier, mutator, synthesizer, sequencer, gummy_machine, generator).

Clone this wiki locally