Skip to content

[1.16+] Presets

Insane96 edited this page Jul 25, 2022 · 6 revisions

A preset is a way to set some specific properties to a mob.

E.g. it lets you make a boss zombie that rarely spawns.

In the config folder you'll find a presets folder, in here you want to add your presets. A preset is a Mob property file without the mob_id, group and presets keys.

Once you've created you preset you must add the preset to the mob with the presets key.

NOTE

Presets by default are exclusive to the mob (so other properties in the mob file will not be applied) unless the presets.mode is changed.

Weighted Preset

In the mob file under the presets.list key you'll have to add a Weighted preset. A weighted preset is a combination of a preset name (the preset file without the .json at end), a weight (chance to be chosen among all the presets) and a World Whitelist.

  • A weighted preset
    • name: The preset name (the preset file without the .json at end)
    • weight: The chance for the preset to be picked
    • world_whitelist: World Whitelist Object

Example

This examples shows how to make a "ghost" mob (an invisible silent zombie with glowing effect) that has 5% chance to spawn only above sea level.

In the presets folder: ghost_zombie.json

{
    "potion_effects": [
        {
            "id": "minecraft:invisibility",
            "hide_particles": true
        },
        {
            "id": "minecraft:glowing",
            "hide_particles": true
        }
    ],
    "custom_name": {
        "overrides": [ "Ghost" ]
    },
    "silent": 1
}

In the mobs folder: zombie.json

{
    "mob_id": "minecraft:zombie",
    "presets": {
        "chance": 0.05,
        "list": [
            {
                "weight": 1,
                "name": "ghost_zombie",
                "world_whitelist": {
                    "deepness": {
                        "min": 64,
                        "max": 320
                    }
                }
            }
        ]
    }
}
Clone this wiki locally