Modding API
Current source version: 0.7.0, for Minecraft 1.20.1 (Fabric, Forge), 1.20.6 (Fabric, NeoForge), 1.21.1 (Fabric, NeoForge), 1.21.11 (Fabric, NeoForge), 26.1, 26.1.1 and 26.3 (Fabric), and 26.1.2 and 26.2 (Fabric, NeoForge). The API classes are identical on every target. 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 (the @Mod constructor on NeoForge and Forge, onInitialize on Fabric) to supply defaults. Require FFExpandedBiomeTint 0.4.0 or newer on NeoForge 1.21.1, 0.5.0 or newer on Fabric 1.21.1, and 0.6.0 or newer on 1.20.1, 1.20.6 and 1.21.11, 0.7.0 or newer on 26.x, 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);
ResourceLocation.parse exists from Minecraft 1.21. On 1.20.1 and 1.20.6 use new ResourceLocation("examplemod:blue_stone"). On 1.21.11 the class is named Identifier, so call Identifier.parse(...); the API methods take an Identifier there.
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.
On NeoForge, declare the dependency in neoforge.mods.toml:
[[dependencies.yourmod]]
modId="ffexpandedbiometint"
type="required"
versionRange="[0.7.0,)"
ordering="AFTER"
side="BOTH"
On Forge 1.20.1, declare it in META-INF/mods.toml:
[[dependencies.yourmod]]
modId="ffexpandedbiometint"
mandatory=true
versionRange="[0.7.0,)"
ordering="AFTER"
side="BOTH"
On Fabric, add it to depends in fabric.mod.json:
"depends": {
"ffexpandedbiometint": ">=0.7.0"
}
Compile-time coordinates
Each target is published to the Fyxe Gitea Maven registry as com.fyxe.ffexpandedbiometint:ffexpandedbiometint-<minecraft>-<loader>:<version>. For 0.7.0 the artifacts are ffexpandedbiometint-1.20.1-fabric, ffexpandedbiometint-1.20.1-forge, ffexpandedbiometint-1.20.6-fabric, ffexpandedbiometint-1.20.6-neoforge, ffexpandedbiometint-1.21.1-fabric, ffexpandedbiometint-1.21.1-neoforge, ffexpandedbiometint-1.21.11-fabric, ffexpandedbiometint-1.21.11-neoforge, ffexpandedbiometint-26.1-fabric, ffexpandedbiometint-26.1.1-fabric, ffexpandedbiometint-26.1.2-fabric, ffexpandedbiometint-26.1.2-neoforge, ffexpandedbiometint-26.2-fabric, ffexpandedbiometint-26.2-neoforge and ffexpandedbiometint-26.3-fabric. Use them as compile-only dependencies (compileOnly on NeoForge, modCompileOnly on Forge and Fabric); players install the mod separately, and it is not bundled into other mods.
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.