A Minecraft Fabric mod that automatically replants crops when harvested, eliminating the tedious task of manually replanting seeds after breaking crops.

CropBlockmods folderThe mod creates a configuration file at config/autoreplanter.json on first run. You can edit this file to customise the mod's behaviour.
{
"validToolTags": ["minecraft:hoes", "farmersdelight:tools/knives"],
"validTools": ["minecraft:diamond_hoe", "farmersdelight:flint_knife"],
"enableAutoReplanting": true,
"damageTools": true,
"requireTool": true,
"useValidToolTags": true,
"useValidTools": false,
"onlyDamageOnMatureCrop": true,
"sneakMode": "ALWAYS"
}
| Option | Type | Default | Description |
|---|---|---|---|
validToolTags |
Array | ["minecraft:hoes", "farmersdelight:tools/knives"] |
List of item tags that are considered valid tools for auto-replanting. Only takes effect when useValidToolTags is true |
validTools |
Array | ["minecraft:diamond_hoe", "farmersdelight:flint_knife"] |
List of specific item IDs that are considered valid tools for auto-replanting. Only takes effect when useValidTools is true |
enableAutoReplanting |
Boolean | true |
Master switch to enable/disable the mod |
damageTools |
Boolean | true |
Whether tools should take durability damage when used |
requireTool |
Boolean | true |
Whether a valid tool is required for auto-replanting to occur |
useValidToolTags |
Boolean | true |
Whether to use tag-based tool validation. When false, the validToolTags list is ignored |
useValidTools |
Boolean | false |
Whether to use specific item-based tool validation. When false, the validTools list is ignored |
onlyDamageOnMatureCrop |
Boolean | true |
Whether tools should only take damage when harvesting mature crops |
sneakMode |
String | "ALWAYS" |
Controls when auto-replanting occurs based on sneak state. Options: "ALWAYS", "ONLY_SNEAKING", "ONLY_STANDING" |
The sneakMode setting controls when auto-replanting should occur based on whether the player is sneaking:
"ALWAYS" (default): Auto-replanting works regardless of sneak state"ONLY_SNEAKING": Auto-replanting only works while the player is sneaking"ONLY_STANDING": Auto-replanting only works while the player is NOT sneakingThe mod offers two complementary tool validation systems that can be used independently or together:
validToolTags)The validToolTags option accepts item tags in the following formats:
"minecraft:hoes""farmersdelight:tools/knives"You can add tags from any mod to customise which tools trigger auto-replanting. This list only takes effect when useValidToolTags is set to true.
validTools)The validTools option accepts specific item IDs in the format:
"namespace:item_id" (e.g., "minecraft:diamond_hoe", "farmersdelight:flint_knife")This allows you to specify exact tools that should work with auto-replanting. This list only takes effect when useValidTools is set to true.
You can use both validation systems simultaneously by setting both useValidToolTags and useValidTools to true. In this case, a tool is considered valid if it matches either the tag-based criteria or the specific item criteria.
minecraft:hoes tag) or knife (from the farmersdelight:tools/knives tag)Set "sneakMode": "ONLY_SNEAKING" to only auto-replant while sneaking. This gives you precise control over when crops are replanted, preventing accidental replanting when walking through your farm.
Set "sneakMode": "ONLY_STANDING" to only auto-replant while not sneaking. This allows you to disable auto-replanting by holding sneak, useful when you want to manually break crops without replanting (e.g., when relocating your farm).
Set "useValidTools": false to only use tag-based validation. The validTools list will be ignored.
Set "useValidToolTags": false to only use specific item validation. The validToolTags list will be ignored.
Set "requireTool": false to enable auto-replanting regardless of what tool is used (or no tool at all). When this is disabled, both validation systems are bypassed.
Set "damageTools": false to prevent tools from taking any durability damage.
Set "onlyDamageOnMatureCrop": true (default) to only damage tools when actually harvesting mature crops, not when replanting immature ones. This saves needless tool durability loss when accidentally breaking crops that are not fully grown when they are automatically replanted.
The mod works with:
CropBlock classCropBlock class.PlayerBlockBreakEvents.BEFORE to intercept crop breakingA: Yes! The mod works on both single-player and multiplayer servers.
A: No, you need to restart Minecraft (or the server) for config changes to take effect.
A: Yes, as long as the modded crops extend Minecraft's CropBlock class, then this should work.
A: Yes! The mod uses Minecraft's built-in durability system, so all enchantments work normally.
validTools but they don't work. Why?A: Make sure useValidTools is set to true in your config. If it's false, the validTools list is ignored.
A: Yes! Set both useValidToolTags and useValidTools to true. A tool will be considered valid if it matches either system.
A: Set either useValidToolTags or useValidTools to false to disable that respective validation system. The corresponding list (validToolTags or validTools) will then be ignored.
A: "ALWAYS" works regardless of sneaking, "ONLY_SNEAKING" only works while sneaking (for precise control), and "ONLY_STANDING" only works while not sneaking (so you can disable it by sneaking).
A: If you set an invalid sneak mode in the config, the mod will fall back to "ALWAYS" behavior.
This project is licensed under the Creative Commons Licence - see the LICENCE file for details.
Contributions are welcome! Please feel free to submit a Pull Request on GitHub.
If you encounter any issues or have suggestions, please:
useValidToolTags and useValidTools) are enabledsneakMode setting is one of the valid optionsAuthor: jackclarke95
Version: 1.1.0
Minecraft: 1.21.1
Mod Loader: Fabric