Modding API

Current source version: 0.4.0. Install the mod on the server and clients. The server resolves all tint rules and syncs the selected blocks when a player joins or the server runs /reload.

Java registration

Other mods can call com.fyxe.ffexpandedbiometint.BiomeTintAPI during mod construction to supply defaults. Require FF Expanded Biome Tint 0.4.0 or newer and load after it. Registrations close when server datapacks first load; a later call throws IllegalStateException. Strength must be finite and between 0.0 and 1.0.

import com.fyxe.ffexpandedbiometint.BiomeTintAPI;
import net.minecraft.resources.ResourceLocation;

BiomeTintAPI.registerBlock(ResourceLocation.parse("examplemod:blue_stone"),
        BiomeTintAPI.Channel.WATER, 0.35);
BiomeTintAPI.registerTag(ResourceLocation.parse("examplemod:forest_stones"),
        BiomeTintAPI.Channel.GRASS, 0.5);
BiomeTintAPI.registerRegex("examplemod:.*_leaves",
        BiomeTintAPI.Channel.FOLIAGE, 0.8);

registerBlock accepts an exact block ID, registerTag a block tag ID without #, and registerRegex a Java pattern matched against the entire block ID. Invalid regular expressions throw PatternSyntaxException. Use registry IDs rather than block instances so rules can be registered before blocks are resolved.

[[dependencies.yourmod]]
    modId="ffexpandedbiometint"
    type="required"
    versionRange="[0.4.0,)"
    ordering="AFTER"
    side="BOTH"

Datapack rules

Rule files

Put a JSON file at data/<namespace>/ffexpandedbiometint/tint_rules/<name>.json. Each entry in rules has exactly one selector: block for an exact block ID, tag for a block tag ID without #, or regex for a Java regular expression matched against the full block ID. Set tint to grass, foliage, or water. Optional strength ranges from 0.0 to 1.0 and defaults to 1.0.

{
  "rules": [
    { "block": "minecraft:clay", "tint": "water", "strength": 0.35 },
    { "tag": "minecraft:base_stone_overworld", "tint": "grass", "strength": 0.45 },
    { "regex": "examplemod:.*_leaves", "tint": "foliage", "strength": 0.75 }
  ]
}

Order and overrides

The bundled default file is applied first, Java API registrations next in registration order, then other datapack rule files in resource ID order. Entries in each file run top to bottom. The last matching rule sets the block's channel and strength. To replace bundled defaults, override data/ffexpandedbiometint/ffexpandedbiometint/tint_rules/default.json with a higher priority datapack file at the same path. This does not remove Java API registrations.

Bundled modded ore patterns

The bundled JSON names the vanilla deepslate family and its eight ore variants explicitly. This includes cobbled, polished, brick, tile, chiseled, reinforced, and infested deepslate blocks, plus stairs, slabs, and walls for each available style. They use grass tint at 0.25 strength.

Four default regex selectors cover non-Minecraft ore IDs ending in _ore or beginning with ore_. Names containing deepslate use grass at 0.25 strength; other matching ores use grass at 0.45. All skip IDs containing common Nether or End material names. Names cannot prove a block's dimension, so add later rules or replace the defaults for exceptions.

Existing model tint indices are preserved. Rules choose the biome color for the entire selected block, including its already tinted faces and block-breaking particles. Inventory previews have no biome to sample.