Wiki 9Minecraft Wiki 9Minecraft

Link Module Parts to Material Properties via Contexts

Java EditionModGuides 4FAQ 10Related mods 60
DownloadTetra Material Overhaul Mod

Get the files on 9Minecraft

Contents (3)
  1. Understand the Context Link
  2. Create Matching Context Keys
  3. Verify Compatibility

Understand the Context Link

Contexts act as a bridge between materials and modules. When a module variant lists a context name in its contexts array, it only gains bonuses if the material being used has that same context defined.

Create Matching Context Keys

Choose a descriptive context name and use it consistently. For example, if you're creating a "fire-aligned" material set:

In your material JSON:

`json

"contexts": {

"fire_aligned": {

"attributes": { "generic.attack_damage": 2.0 },

"effects": { "fire_aspect": [0, 0] }

}

}

`

In your module JSON:

`json

"contexts": ["fire_aligned"]

`

Verify Compatibility

The context name must match exactly (case-sensitive). If a module requests a context that doesn't exist in the material, the bonus simply won't apply—no error occurs. Use this to create material families: all "fire" materials share fire contexts, all "ice" materials share ice contexts, letting modules automatically adapt to what's available.

More guides for this mod