Advanced Rules

Customize Client Tweaks item and block checks using Shogi.

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

ValueUsed byDefault behavior
clienttweaks:is_torchOffhand torch tweaks and Do Not Use Last TorchAny block item whose block emits light.
clienttweaks:is_berryBerry Placement Requires ShiftSweet berries or items in #c:foods/berry.
clienttweaks:is_toolOffhand Torch With Tool OnlyItems with Minecraft's TOOL component.
clienttweaks:is_foodNo Offhand Torch With Food and No Offhand Use With FoodItems with Minecraft's FOOD component.
clienttweaks:is_fireworkNo Offhand Fireworks With Elytra Unless AirborneItems with Minecraft's FIREWORKS component.
clienttweaks:is_weaponHide Shield Unless Holding WeaponItems with Minecraft's WEAPON component.
clienttweaks:requires_shift_to_minePrevent Accidental MiningBudding 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.