Skip to content

[Version 4.10] Game Stage

Insane96 edited this page May 25, 2024 · 2 revisions

Game Stage

  • game_stages: a list of game stages that the player has unlocked.
  • player_mode: Which player should be targeted to check if the game stages are unlocked?
    • "nearest": When a mob spawns, the game stages are checked only for the nearest player
    • "any": When a mob spawns, the game stages are checked for any player in a 128 blocks radius

Note

Game Stages in game_stages work as an AND condition. All the advancements in the list must be fulfilled.

Examples

This example makes Skeletons get Resistance II when the player has unlocked the iron_age stage.

{
    "target": "minecraft:skeleton",
    "potion_effects": [
        {
            "id": "minecraft:resistance",
            "amplifier": 1,
            "ambient": true
        }
    ],
    "conditions": {
        "game_stages_unlocked": [
            {
                "game_stages": [ "iron_age" ],
                "player_mode": "any"
            }
        ]
    }
}

This example makes Skeletons get Resistance II when the player has either unlocked the iron_age or the bronze_age stages

{
    "target": "minecraft:skeleton",
    "potion_effects": [
        {
            "id": "minecraft:resistance",
            "amplifier": 1,
            "ambient": true
        }
    ],
    "conditions": {
        "game_stages_unlocked": [
            {
                "game_stages": [ "iron_age" ],
                "player_mode": "any"
            },
            {
                "game_stages": [ "bronze_age" ],
                "player_mode": "any"
            }
        ]
    }
}

This example makes Skeletons get Resistance II when the player has unlocked the iron_age and the bronze_age stages

{
    "target": "minecraft:skeleton",
    "potion_effects": [
        {
            "id": "minecraft:resistance",
            "amplifier": 1,
            "ambient": true
        }
    ],
    "conditions": {
        "game_stages_unlocked": [
            {
                "game_stages": [ "iron_age", "bronze_age" ],
                "player_mode": "any"
            }
        ]
    }
}
Clone this wiki locally