-
Notifications
You must be signed in to change notification settings - Fork 0
Datapack Structure
This page explains the folder structure and file organization for BotzMobLeveling datapacks.
your_datapack/
├── pack.mcmeta # Required: Datapack metadata
└── data/
└── botzmobleveling/ # Mod's namespace
└── mob_levels/ # All leveling rules go here
├── structures/ # Structure-based rules
│ ├── stronghold.json
│ ├── nether_fortress.json
│ └── ocean_monument.json
├── biomes/ # Biome-based rules
│ ├── desert.json
│ ├── nether.json
│ └── end.json
├── dimensions/ # Dimension-wide baseline rules
│ ├── nether.json
│ ├── the_end.json
│ └── twilight_forest.json
└── bosses/ # Boss transformation rules
├── stronghold_boss.json
└── nether_boss.json
All BotzMobLeveling rules must be placed under the botzmobleveling namespace:
data/botzmobleveling/mob_levels/...
Contains rules that apply to mobs spawning inside specific structures.
- Default Priority: 100 (highest)
-
Default
ignore_distance_scaling: true -
Requires:
structurefield
Example: structures/stronghold.json
{
"structure": "minecraft:stronghold",
"fixed_level": 100
}Contains rules that apply to mobs spawning in specific biomes or biome tags.
- Default Priority: 50 (medium)
-
Default
ignore_distance_scaling: false -
Requires:
biomeorbiome_tagsfield
Example: biomes/desert.json
{
"biome": "minecraft:desert",
"level_range": {
"min": 20,
"max": 50
}
}Contains rules that apply to all mobs in an entire dimension. Dimension rules sit below biome rules in priority, so a biome rule will override them for specific biomes. Use these to set a dimension-wide difficulty floor.
- Default Priority: 30 (below biome)
-
Default
ignore_distance_scaling: false -
Requires:
dimensionordimensionsfield
Example: dimensions/nether.json
{
"dimension": "minecraft:the_nether",
"level_range": {
"min": 50,
"max": 150
}
}Contains rules for transforming regular mobs into powerful bosses.
- Chance-based spawning
- Can be restricted to structures/biomes
- Supports boss bars, minions, immunities
Example: bosses/stronghold_overlord.json
{
"target_mobs": ["minecraft:zombie"],
"spawn_chance": 0.05,
"structures": ["minecraft:stronghold"],
"display_name": "Stronghold Overlord",
"level": 200
}- Use lowercase letters only
- Use underscores for spaces (e.g.,
nether_fortress.json) - File extension must be
.json - File name becomes the rule's internal ID
Good examples:
stronghold_zombies.jsondesert_skeleton.jsonocean_monument_guardians.json
Bad examples:
-
Stronghold Zombies.json(spaces and capitals) -
desert-skeleton.json(hyphens) -
rule.txt(wrong extension)
Every datapack requires a pack.mcmeta file in its root:
{
"pack": {
"pack_format": 15,
"description": "My custom mob leveling datapack"
}
}| Field | Description |
|---|---|
pack_format |
Use 15 for Minecraft 1.20.1 |
description |
Shows in the datapack selection screen |
- Datapacks are loaded alphabetically by folder name
- Rules within the same priority level are processed in load order
- Use the
priorityfield to explicitly control order
After making changes to your datapack:
- Save your JSON files
- Run
/reloadin-game - Changes apply immediately to newly spawning mobs
Note: Already-spawned mobs keep their existing levels. Only new spawns use the updated rules.
You can have multiple datapacks with mob leveling rules. They will merge based on:
- Different structures/biomes: Both rules apply to their respective locations
- Same structure/biome: Higher priority rule wins
- Same priority: Later-loaded datapack wins
- Check the folder structure matches exactly
- Verify JSON syntax with a validator
- Enable debug mode in the mod config
- Check game logs for error messages
- Check rule priorities
- Verify structure/biome IDs are correct
- Remember: Structure rules override biome rules by default
Enable in config (botzmobleveling-common.toml):
debugMode = trueThis logs which rules are being applied and why.
Navigation
Quick Links