-
Notifications
You must be signed in to change notification settings - Fork 3
Custom Restrictions
Sygikal edited this page Nov 19, 2025
·
8 revisions
- In a datapack with your own namespace and add the
restrictiondirectory. - In the
restrictiondirectory add a json array file and add your restrictions (egcustomrestrictions.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, defaultfalse): 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": truewill be the one that is used)
- (eg. If there are two restrictions for
-
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_EQUALSSTRING_CONTAINSSTRING_ENDS_WITH
-