Skip to content

Custom Restrictions

Sygikal edited this page Nov 19, 2025 · 8 revisions
  • In a datapack with your own namespace and add the restriction directory.
  • In the restriction directory add a json array file and add your restrictions (eg customrestrictions.json).
{
   "restrictions": [
     {
       "replace": false,
       "skills": [
          {
             "skill": "customskills:archeology",
             "level": 5
          }
       ],
       "blocks": [],
       "crafting": [],
       "entities": [],
       "items": [
         "minecraft:brush"
       ],
       "mining": []
     },
     {
       "replace": false,
       "skills": [
          {
             "skill": "customskills:foraging",
             "level": 1
          }
       ],
       "blocks": [
          "minecraft:sweet_berry_bush"
       ],
       "crafting": [],
       "entities": [],
       "items": [],
       "mining": []
     }
   ]
}
  • replace (Optional) (Boolean, default false): is whether or not this restriction should override others with the same entries
    • (eg. If there are two restrictions for minecraft:brush, the one that has "replace": true will be the one that is used)
  • skills (Object Array): Array of skills you want this restriction to become available at (there can be multiple):
    • skill (String): Id of skill
    • level (Integer): Level to restrict to
  • blocks (Optional) (String Array): List of blocks to restrict placing & interacting
  • crafting (Optional) (String Array): List of items or blocks to restrict crafting
  • entities (Optional) (String Array): List of entities to restrict interaction (or spawn egg usage)
  • items (Optional) (String Array): List of items to restrict usage
  • mining (Optional) (String Array): List of blocks to restrict mining
  • enchantments (Optional) (Object Array): Array of enchantments to restrict usage for
    • name (String): Name of enchantment
    • level (Integer): Level of enchantment to restrict
  • nbt (Optional) (Object Array): Array of NBT to restrict an item based on
    • type (String): Type of nbt restriction. Must use key in this field and add it as another key. Supported types are:
      • item (Identifier): Id of the item to read NBT from
    • key (String): The key of the nbt to read. Can be split by using \" for depth.
    • value (String): Value the key should match, currently only supports strings.
    • condition (String): Condition for nbt matching:
      • STRING_EQUALS
      • STRING_CONTAINS
      • STRING_ENDS_WITH

Clone this wiki locally