Advanced Rules
Client Tweaks exposes some of its tweaks as Shogi rules for further customization.
Rules for the clienttweaks:rules scope go in:
config/clienttweaks.rules.json
If no rule overrides a value, Client Tweaks uses its built-in default for that check.
Exposed Values
| Value | Used by | Default behavior |
|---|---|---|
clienttweaks:is_torch | Offhand torch tweaks and Do Not Use Last Torch | Any block item whose block emits light. |
clienttweaks:is_berry | Berry Placement Requires Shift | Sweet berries or items in #c:foods/berry. |
clienttweaks:is_tool | Offhand Torch With Tool Only | Items with Minecraft's TOOL component. |
clienttweaks:is_food | No Offhand Torch With Food and No Offhand Use With Food | Items with Minecraft's FOOD component. |
clienttweaks:is_firework | No Offhand Fireworks With Elytra Unless Airborne | Items with Minecraft's FIREWORKS component. |
clienttweaks:is_weapon | Hide Shield Unless Holding Weapon | Items with Minecraft's WEAPON component. |
clienttweaks:requires_shift_to_mine | Prevent Accidental Mining | Budding amethyst, amethyst buds, suspicious sand, and suspicious gravel. |
Item Checks
Item checks are evaluated with the item stack being tested as the Shogi context, so item conditions such as is_item(...) can be used.
For example, this makes Client Tweaks treat only normal torches, soul torches, and redstone torches as torches for the offhand torch tweaks:
{
"clienttweaks:is_torch": "any(is_item('minecraft:torch'), is_item('minecraft:soul_torch'), is_item('minecraft:redstone_torch'))"
}
This makes Hide Shield Unless Holding Weapon accept tridents and bows even if another mod or Minecraft version does not mark them with the weapon component:
{
"clienttweaks:is_weapon": "any(is_item('minecraft:trident'), is_item('minecraft:bow'), is_item('minecraft:crossbow'))"
}
Tags can be used when a modpack already groups custom items:
{
"clienttweaks:is_berry": "is_item('#c:foods/berry')"
}
Mining Check
clienttweaks:requires_shift_to_mine controls which blocks are protected by Prevent Accidental Mining. It receives the mined block state as its context.
Use this value when you want to replace the default protection set entirely. For example, this makes Prevent Accidental Mining require sneaking for reinforced deepslate and ancient debris instead of the default fragile blocks:
{
"clienttweaks:requires_shift_to_mine": "any(is_block('minecraft:reinforced_deepslate'), is_block('minecraft:ancient_debris'))"
}
Refer to the Shogi guide for syntax, conditions, and built-in helpers.