Skip to content

Game Stages Conditions

Adds a condition predicate to be used in data-driven files

86k downloads Updated

No ratings yet

Be the first to rate it.

Rate it

Community listing page

Community listing page, reviews may not be monitored by the author.

About

Description

Game Stage Conditions

Adds a condition predicate to be used in data-driven files such as loot tables, so that certain aspects trigger based on the stage that the player has.
Useful for loot tables if you want to generate items for players based on the progress that they are at.

Recommended Lootr
Requires Game Stages

Example for stage1 and stage2 and default (in case no stage is applied)
Json loot table
v Written copy-paste helping text version of the image below v

{  
  "type": "minecraft:chest",  
  "pools": [  
    {  
      "rolls": 1,  
      "entries": [  
        {  
          "type": "minecraft:alternatives",  
          "children": [  
            {  
              "type": "minecraft:loot_table",
              "name": "minecraft:chests/end_city_treasure",
              "conditions": [
                {
                  "condition": "gamestageconditions:stage",
                  "stage": "stage_2"
                }
              ]
            },
            {
              "type": "minecraft:loot_table",
              "name": "minecraft:chests/ruined_portal",
              "conditions": [
                {
                  "condition": "gamestageconditions:stage",
                  "stage": "stage_1"
                }
              ]
            },
            {
              "type": "minecraft:loot_table",
              "name": "minecraft:chests/jungle_temple"
            }
          ]
        }
      ]
    }
  ]
}

Since v1.2 there are also Triggers that you can apply to advancements and such:

Gamestage Added Trigger Example Gamestage Removed Trigger Example