config-version=3 attack-action=[ { priority=9 target { type=BLOCK id="#sword_efficient" } tools=[ { type=ITEM id="#swords" data { enchantments { id=unbreaking type=ENCHANTMENT } } }, { type=ITEM id="#swords" } ] }, { priority=11 target { type=BLOCK id="#sword_instantly_mines" } tools=[ { type=ITEM id="#swords" data { enchantments { id=unbreaking type=ENCHANTMENT } } }, { type=ITEM id="#swords" } ] }, { priority=10 target { type=BLOCK id="#mineable/axe" } tools=[ { type=ITEM id="#axes" data { enchantments { type=OR child=[ { id=efficiency type=ENCHANTMENT }, { id=unbreaking type=ENCHANTMENT }, { # Mushroom blocks prefer silk touch axes id="silk_touch" type=ENCHANTMENT } ] } } }, { type=ITEM id="#axes" } ] }, { priority=10 target { type=BLOCK id="#mineable/hoe" } tools=[ { type=ITEM id="#hoes" data { enchantments { type=OR child=[ { id=efficiency type=ENCHANTMENT }, { id=unbreaking type=ENCHANTMENT }, { id="silk_touch" type=ENCHANTMENT } ] } } }, { type=ITEM id="#hoes" } ] }, { # Target for ores to prefer a specific enchantment. # By default, prefers pickaxes with fortune over those with silk touch, unless the player is crouching, # in which case the opposite occurs with silk touch being preferred. priority=11 target { type=AND child=[ { type=BLOCK id="#c:ores" }, { type=BLOCK id="#mineable/pickaxe" } ] } tools=[ { # Prefer silk touch pickaxes when crouching type=ITEM id="#pickaxes" data { enchantments { id="silk_touch" type=ENCHANTMENT } player { isCrouching=true } } }, { type=ITEM id="#pickaxes" data { enchantments { id=fortune type=ENCHANTMENT } } }, { type=ITEM id="#pickaxes" data { enchantments { id="silk_touch" type=ENCHANTMENT } } } ] }, { priority=10 target { type=BLOCK id="#mineable/pickaxe" } tools=[ { type=ITEM id="#pickaxes" data { enchantments { type=OR child=[ { id=efficiency type=ENCHANTMENT }, { id=unbreaking type=ENCHANTMENT }, { id=fortune type=ENCHANTMENT }, { id="silk_touch" type=ENCHANTMENT } ] } } }, { type=ITEM id="#pickaxes" } ] }, { priority=10 target { type=BLOCK id="#mineable/shovel" } tools=[ { type=ITEM id="#shovels" data { enchantments { type=OR child=[ { id=efficiency type=ENCHANTMENT }, { id=unbreaking type=ENCHANTMENT }, { id=fortune type=ENCHANTMENT }, { id="silk_touch" type=ENCHANTMENT } ] } } }, { type=ITEM id="#shovels" } ] }, { priority=10 target { type=BLOCK id="#autoswitch:shears_efficient" } tools=[ { type=ITEM id="#c:tools/shear" data { enchantments { type=OR child=[ { id=efficiency type=ENCHANTMENT }, { id=unbreaking type=ENCHANTMENT }, { id="silk_touch" type=ENCHANTMENT } ] } } }, { type=ITEM id="#c:tools/shear" } ] }, { # Reeds require no tool, so switch away from one priority=10 target { type=BLOCK id="sugar_cane" } tools=[] }, { # Blocks that prefer Silk Touch hoes priority=11 target { type=OR child=[ { type=BLOCK id=sculk }, { type=BLOCK id="sculk_catalyst" }, { type=BLOCK id="sculk_sensor" }, { type=BLOCK id="calibrated_sculk_sensor" }, { type=BLOCK id="sculk_shrieker" }, { type=BLOCK id="sculk_vein" } ] } tools=[ { type=ITEM id="#hoes" data { enchantments { id="silk_touch" type=ENCHANTMENT } } } ] }, { # Blocks that prefer Silk Touch axes priority=11 target { type=OR child=[ { type=BLOCK id="#minecraft:beehives" }, { type=BLOCK id="brown_mushroom_block" }, { type=BLOCK id="red_mushroom_block" }, { type=BLOCK id="mushroom_stem" }, { type=BLOCK id="creaking_heart" } ] } tools=[ { type=ITEM id="#axes" data { enchantments { id="silk_touch" type=ENCHANTMENT } } } ] }, { # Blocks that prefer Silk Touch pickaxes priority=11 target { type=OR child=[ { type=BLOCK id="minecraft:ender_chest" }, { type=BLOCK id="#c:glass_blocks" }, { type=BLOCK id="#c:glass_panes" }, { type=BLOCK id="#ice" }, { type=BLOCK id=glowstone }, { type=BLOCK id="sea_lantern" } ] } tools=[ { type=ITEM id="#pickaxes" data { enchantments { id="silk_touch" type=ENCHANTMENT } } } ] }, { priority=10 target { type=ENTITY id="#sensitive_to_impaling" } tools=[ { type=ITEM id="#c:tools/melee_weapon" data { enchantments { id=impaling type=ENCHANTMENT } } } ] }, { priority=10 target { type=ENTITY id="#sensitive_to_bane_of_arthropods" } tools=[ { type=ITEM id="#c:tools/melee_weapon" data { enchantments { id="bane_of_arthropods" type=ENCHANTMENT } } } ] }, { priority=0 target { type=OR child=[ { type=ENTITY id="#autoswitch:any" }, { type=ENTITY id=player } ] } tools=[ { type=ITEM id="#c:tools/melee_weapon" data { enchantments { id=sharpness type=ENCHANTMENT } } }, { type=ITEM id="#c:tools/melee_weapon" } ] }, { priority=10 target { type=ENTITY id="#illager" } tools=[ { type=ITEM id="#c:tools/melee_weapon" data { enchantments { id=sharpness type=ENCHANTMENT } } } ] }, { # Use a mace or axes to break boats to prevent accidentally hitting riders priority=10 target { type=OR child=[ { type=ENTITY id="#boat" } ] } tools=[ { type=ITEM id=mace }, { type=ITEM id="#axes" } ] }, { priority=10 target { type=ENTITY id="#sensitive_to_smite" } tools=[ { type=ITEM id="#c:tools/melee_weapon" data { enchantments { id=smite type=ENCHANTMENT } } } ] } ] interact-action=[ { priority=10 target { type=ENTITY id=creeper } tools=[ { type=ITEM id="#c:tools/igniter" } ] }, { # Shearing targets priority=10 target { type=OR child=[ { id=sheep type=ENTITY }, { id="#minecraft:beehives" type=block data { blockstates { "honey_level"=5 } } } ] } tools=[ { type=ITEM id="#c:tools/shear" data { enchantments { type=OR child=[ { id=unbreaking type=ENCHANTMENT } ] } } }, { type=ITEM id="#c:tools/shear" } ] }, { priority=10 target { type=ENTITY id="iron_golem" } tools=[ { type=ITEM id="iron_ingot" } ] }, { priority=10 target { type=OR child=[ { id=goat type=ENTITY }, { id=cow type=ENTITY } ] } tools=[ { type=ITEM id=bucket } ] }, { priority=10 target { id="minecraft:strider" type=ENTITY data { equipment { saddle=saddle } } } tools=[ { type=ITEM id="minecraft:warped_fungus_on_a_stick" } ] }, { priority=10 target { id="minecraft:pig" type=ENTITY data { equipment { saddle=saddle } } } tools=[ { type=ITEM id="minecraft:carrot_on_a_stick" } ] }, { priority=10 target { id="#fire" type=BLOCK } tools=[ { type=ITEM id="splash_potion" data { components { "potion_contents"=water } } } ] } ] # Due to how statistics are handled, these only work in singleplayer stat-change-action=[ { priority=10 target { id="used:totem_of_undying" type=STAT } tools=[ { type=ITEM id="totem_of_undying" } ] }, { # Have some milk to help you sleep well. priority=10 target { id="custom:sleep_in_bed" type=STAT } tools=[ { type=ITEM id="minecraft:milk_bucket" } ] } ] feature-config { # Delay switchback until attack progress has fully charged when these targets match. # This is useful when fighting mobs, where otherwise after each attack switchback will trigger, # causing the attack progress to reset. switchback-waits-for-attack-progress=[ # Wait for attack progress for all entity attacks { action=ATTACK target { type=ENTITY id="#autoswitch:any" } }, # Wait for attack progress for all entity interactions, # prevents multiple switches when shearing sheep { action=INTERACT target { type=ENTITY id="#autoswitch:any" } } ] offhand-selectors=[ { type=ENTITIES priority=10 tool { type=OR child=[ { type=ITEM id="warped_fungus_on_a_stick" }, { type=ITEM id="carrot_on_a_stick" } ] } } ] # Switch away from the currently active tool when no tools matched for the current target. # E.g. you are holding a shovel but attack stone and have no pickaxe, if this is enabled # it will switch off of the shovel to some non-tool item. # Only triggers for the actions specified. switch-away-from-tools=[ ATTACK ] # "Prefer the tool with minimum required mining level. prefer-minimum-viable-tool=true switch-allowed=[ ENTITIES, EVENTS, BLOCKS ] # Return to the previous slot when no longer performing the action on the specified type. Leave blank to disable this behavior entirely. switch-back-allowed=[ ENTITIES, BLOCKS ] # Which actions to perform switching for. switch-actions=[ INTERACT, ATTACK, "STAT_CHANGE" ] # Disable switching when crouching. disable-when-crouched=true # Disable switching on startup. disable-on-startup=false # Don't switch tools in creative mode. switch-in-creative=false # Switch in multiplayer. switch-in-mp=true # Controls where and if the keybinding toggle message should be displayed. DEFAULT is above the hotbar, like with bed messages. CHAT is in the chat bar, like a normal chat message. Set to OFF to disable the message entirely. toggle-message-control=DEFAULT # Prevents switching for 'attack' action on a block for the specified number of ticks after attacking an entity. prevent-block-switch-after-entity-attack=5 # Delay in ticks from end of hand swinging to perform switchback action. switchback-delay=1 # If true, skip tools that are out of energy or durability. skip-depleted-items=true # If true, skip tools that are about to break. preserve-damaged-tools=false }