Cultivation

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.

Accessors

AccessorReturns
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 multiplier the player's next eat of this item would receive, from the configured fatigueFloor up to 1.0 (1.0 when fatigue is disabled)

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, cultivation:iron_rake. The scythes join #minecraft:enchantable/durability and #minecraft:enchantable/mining plus a #cultivation:scythes tag, and the rake joins #minecraft:enchantable/durability plus a #cultivation:rakes tag, so enchantment mods pick them up with zero code.