For Developers
Cultivation publishes a stable integration surface under com.rfizzle.cultivation.api, per the suite API standard: read-only static accessors, array-backed Fabric events, server-authoritative. Specced, pre-implementation — it lands with the first release.
Accessors
| Accessor | Returns |
|---|---|
getFertility(ServerLevel, BlockPos) | Fertility 0–100; 100 for untracked farmland; −1 if the block is not farmland |
getSoilInfo(ServerLevel, BlockPos) | Optional record of fertility, enriched chance, remaining Fertilizer dose, and last crop |
getFoodEffectiveness(ServerPlayer, ItemStack) | The 0.5–1.0 multiplier the player's next eat of this item would receive |
Events
CultivationHarvestCallback— fires server-side from the single harvest choke point after Cultivation's own drain and bonuses. Its drops list is mutable: the sanctioned mutation point for siblings and third parties to inject bonus produce. A listener that throws is caught, logged, and skipped.CultivationFoodCallback— fires after a food is consumed and fatigue applied, with the effectiveness that was used. Observation only.
Consumption is the suite pattern: compile against the jar with modCompileOnly and guard every call site with FabricLoader.getInstance().isModLoaded("cultivation"). Cultivation ships no HUD element and therefore no HUD accessors, and exposes no soil mutators — outside mods observe fertility and react; they don't write it.
Item IDs and tags for integrations
Cultivation is a provider in every current suite integration — sibling mods reference these stable IDs from their own datapacks: cultivation:fertilizer, cultivation:iron_scythe, cultivation:diamond_scythe, cultivation:netherite_scythe. The scythes join #minecraft:enchantable/durability and #minecraft:enchantable/mining plus a #cultivation:scythes tag, so enchantment mods pick them up with zero code.