unbreakables-common.toml
NameDescriptionTypeDefault ValueValid Values
rulesetsIDs of inbuilt rulesets to enable. For example, "waystones:generated_waystones" makes all generated waystones breakable.List[]
rulesList of custom rules with comma-separated parameters in parentheses. Conditions can be defined as comma-separated list in square brackets. Will be applied in order.List[]

Unbreakable Rules

Unbreakable Rules are defined in the following format:

[condition1, condition2] modifier()

Example:

[is_block(minecraft:dirt)] refuse(You cannot break dirt)
[is_tag(minecraft:planks)] refuse(You cannot break planks)
[is_state(lit, true)] refuse(You cannot break lit furnaces)

These definitions are run in-order. Modifiers will only run if all conditions pass.

For example, to disallow generated waystones from being broken, you could use the following rule:

[is_tag(waystones:waystones), is_not_state(origin, player)] refuse($chat.waystones.cannot_break_waystone)

Modifiers

ModifierDescriptionExample
add_level_cost(levels)Adds the specified amount to the warp level costadd_level_cost(1)
multiply_level_cost(levels)Multiplies the warp level cost by the specified amountmultiply_level_cost(2)
scaled_add_level_cost(variable, scale)Adds levels to the cost of the warp in the amount of the specified variable and scale factorscaled_add_level_cost(distance, 0.01)
min_level_cost(levels)Clamps the level cost to the given minimum value.min_level_cost(1)
max_level_cost(levels)Clamps the level cost to the given maximum value.max_level_cost(3)
add_xp_cost(levels)Adds the specified amount to the warp XP costadd_xp_cost(1)
multiply_xp_cost(levels)Multiplies the warp XP cost by the specified amountmultiply_xp_cost(2)
scaled_add_xp_cost(variable, scale)Adds levels to the cost of the warp in the amount of the specified variable and scale factorscaled_add_xp_cost(distance, 0.01)
min_xp_cost(levels)Clamps the XP cost to the given minimum value.min_xp_cost(1)
max_xp_cost(levels)Clamps the XP cost to the given maximum value.max_xp_cost(3)
add_item_cost(item, count)Adds the specified amount to the warp item costadd_item_cost(minecraft:diamond, 1)
multiply_item_cost(item, multiplier)Multiplies the warp item cost by the specified amountmultiply_item_cost(minecraft:diamond, 2)
scaled_add_item_cost(variable, item, scale)Adds items to the cost of the warp in the amount of the specified variable and scale factorscaled_add_item_cost(distance, minecraft:diamond, 0.01)
min_item_cost(item, min)Clamps the item cost to the given minimum value.min_item_cost(minecraft:diamond, 1)
max_item_cost(item, max)Clamps the item cost to the given maximum value.max_item_cost(minecraft:diamond, 3)
refuse(message)Refuses the warp with the specified message. Prepend message with $ to use a translation key.refuse(You are not allowed to warp here.) or refuse($your.custom.translation.key)

Conditions

ConditionDescriptionExample
is_block(namespace:path)Passes if the block is the specified blockis_block(minecraft:dirt) or is_block(#minecraft:planks)
is_not_block(namespace:path)Passes if the block is not the specified blockis_not_block(minecraft:dirt)
is_tag(namespace:path)Passes if the block has the specified tagis_tag(waystones:waystones)
is_not_tag(namespace:path)Passes if the block does not have the specified tagis_not_tag(waystones:waystones)
is_state(state, value)Passes if the block has the specified stateis_state(lit, true)
is_not_state(state, value)Passes if the block does not have the specified stateis_not_state(waystones:origin, player)
is_in_dimension(namespace:path)Passes if the block is within the specified dimensionis_in_dimension(minecraft:the_nether)
is_not_in_dimension(namespace:path)Passes if the block is not within the specified dimensionis_not_in_dimension(minecraft:overworld)
is_in_biome(namespace:path)Passes if the block is within the specified biomeis_in_biome(minecraft:desert)
is_not_in_biome(namespace:path)Passes if the block is not within the specified biomeis_not_in_biome(minecraft:desert)
has_effect(namespace:path, minimumLevel)Passes if the player has the specified effecthas_effect(minecraft:strength, 1)
not_has_effect(namespace:path)Passes if the player does not have the specified effectnot_has_effect(minecraft:strength)
is_tool(namespace:path)Passes if the player is holding the specified toolis_tool(minecraft:diamond_pickaxe)
is_not_tool(namespace:path)Passes if the player is not holding the specified toolis_not_tool(minecraft:diamond_pickaxe)
is_enchanted(namespace:path, minimumLevel)Passes if the player's tool holds the given enchantmentis_enchanted(minecraft:silk_touch, 1)
is_not_enchanted(namespace:path, minimumLevel)Passes if the player's tool does not hold the given enchantmentis_not_enchanted(minecraft:silk_touch, 1)
players_nearby(distance, minimum)Passes if there are enough other players within rangeplayers_nearby(10, 1)
not_players_nearby(distance, minimum)Passes if there are enough other players within rangenot_players_nearby(10, 1)
mobs_nearby(distance, minimum)Passes if there are enough mobs within rangemobs_nearby(10, 1)
not_mobs_nearby(distance, minimum)Passes if there are enough mobs within rangenot_mobs_nearby(10, 1)
animals_nearby(distance, minimum)Passes if there are enough animals within rangeanimals_nearby(10, 1)
not_animals_nearby(distance, minimum)Passes if there are enough animals within rangenot_animals_nearby(10, 1)
entity_nearby(namespace:path, distance, minimum)Passes if there are enough entities within rangeentity_nearby(minecraft:pig, 10, 1)
not_entity_nearby(namespace:path, distance, minimum)Passes if there are enough entities within rangenot_entity_nearby(minecraft:pig, 10, 1)
is_above_y(y)Passes if the block is above the given y-levelis_above_y(100)
is_below_y(y)Passes if the block is below the given y-levelis_below_y(100)
is_within(minX, minY, minZ, maxX, maxY, maxZ)Passes if the block is within the given regionis_within(0, 0, 0, 100, 100, 100)
is_not_within(minX, minY, minZ, maxX, maxY, maxZ)Passes if the player is not within the given regionis_not_within(0, 0, 0, 100, 100, 100)
is_at(x, y, z)Passes if the block is at the given coordinatesis_at(0, 0, 0)
is_not_at(x, y, z)Passes if the block is not at the given coordinatesis_not_at(0, 0, 0)
is_near(x, y, z, distance)Passes if the block is within the given distance of the given coordinatesis_near(0, 0, 0, 10)
is_not_near(x, y, z, distance)Passes if the block is not within the given distance of the given coordinatesis_not_near(0, 0, 0, 10)