-
Notifications
You must be signed in to change notification settings - Fork 0
Plant Registry and Crop Types
Agrarian Reform features a zero-configuration Universal Crop Auto-Population Engine (AgrarianCropRules.java) powered by an
Whenever a block is ticked, loaded, or inspected, AgrarianCropRules evaluates the block using a 3-tier inspection pipeline:
BLOCK INSPECTION
โ
โโโโโโโโโโโโโโโโโโดโโโโโโโโโโโโโโโโโ
โผ โผ
Known Cached Crop (O(1)) Uncached Block Type
โ โ
โผ โผ
Return Multiplier 3-Tier Discovery Pipeline
1. Class Hierarchy: CropBlock, SaplingBlock, BonemealableBlock
2. Tag Membership: #c:crops, #minecraft:crops, #farmersdelight:wild_crops
3. Property Inspection: BlockState with "age" IntegerProperty
โ
โผ (If Match Found)
DYNAMIC REGISTRATION
- Cache in DYNAMIC_CROPS Set
- Register GameRule: agrarian_reform:crop_growth_multiplier_<id>
- Mark AgrarianConfig dirty = true
| Category | Java Class Target / Tag | Vanilla Examples | Average Ticks / Stage | Continuum Catch-up | Universal Bone Meal |
|---|---|---|---|---|---|
| Standard Crops |
CropBlock, #c:crops
|
Wheat, Carrots, Potatoes, Beetroots | โ Yes (Throttled Queue) | Vanilla Native | |
| Tall Stalks |
SugarCaneBlock, CactusBlock
|
Sugar Cane, Cactus | โ Yes (Height capped 3) | โ Extended Support | |
| Nether Flora | NetherWartBlock |
Nether Wart | โ
Yes (Stage 0 |
โ Extended Support | |
| Stem & Pod Crops |
CocoaBlock, SweetBerryBushBlock
|
Cocoa Beans, Sweet Berries | โ
Yes (Stage 0 |
โ Extended Support | |
| Vines & Foliage | VineBlock |
Vines | Variable | โ Yes (Downward spread) | โ Extended Support |
| Trees & Saplings | SaplingBlock |
Oak, Spruce, Birch, Cherry Saplings | โ Yes (Tree advance) | Vanilla Native | |
| Modded Agriculture | Any #c:crops or AgeBlock
|
Farmer's Delight, Mystical Agriculture | Configurable | โ Yes (Scaled delta) | Dynamic / Extended |
Every crop's effective growth speed is calculated on-demand:
public static int getEffectiveGrowthMultiplier(Level level, Block block) {
Identifier id = BuiltInRegistries.BLOCK.getKey(block);
// 1. Check world-specific GameRule
GameRule<Integer> dynamicRule = DYNAMIC_GAMERULES.get(id);
if (dynamicRule != null && level instanceof ServerLevel serverLevel) {
int val = DynamicGameRuleManager.getInt(serverLevel, dynamicRule);
if (val > 0) return val; // Positive override
if (val == -1) return 0; // -1 = Frozen (0% growth)
}
// 2. Fall back to Global Multiplier
if (level instanceof ServerLevel serverLevel) {
return DynamicGameRuleManager.getInt(serverLevel, AgrarianGameRules.GLOBAL_GROWTH_MULTIPLIER);
}
return 100;
}-
Mid-Game Dynamic Discovery:
-
AgrarianCropRuleshooks into random ticks, Continuum chunk loading sweeps, and block interaction events. - When a previously unregistered modded crop is loaded or interacted with mid-session, it is discovered on-the-fly, registered into the
$O(1)$ block cache, and given a dynamic GameRule with zero reload latency.
-
-
Mod Removal & Zero-Crash Safety:
- Dynamic crop rules and caches rely strictly on standard Minecraft
Identifierstrings (namespace:path) rather than direct compiled class types. - When a crop mod is uninstalled,
AgrarianCropRules.isCropBlocksafely ignores missing blocks, producing 0ClassNotFoundExceptionorNoClassDefFoundErrorcrashes. - If missing blocks exist in saved chunk palettes, Vanilla replaces them with air/fallback blocks, while the corresponding GameRule remains dormant until the mod is re-added.
- Dynamic crop rules and caches rely strictly on standard Minecraft
Datapack creators can also explicitly declare custom crops via standard conventional tags (#c:crops / #minecraft:crops) or the dedicated #agrarian_reform:continuum_plants tag:
{
"replace": false,
"values": [
"#minecraft:crops",
"#c:crops",
"farmersdelight:cabbage",
"farmersdelight:tomatoes",
"farmersdelight:onions"
]
}See also: The Continuum (Offline Growth), Global Growth Multiplier, and Configuration.
๐ Repository Source Disclaimer: The documentation in this Wiki reflects the current source code state in the repository, which may include recent unreleased commits or developmental features ahead of public release builds on CurseForge and Modrinth.
Agrarian Reform: The Living Earth | Instant Gratification & Vanilla Outsider Collections
Developed with โค๏ธ by Dasik (Rifaditya) | Licensed under GPLv3
๐พ Agrarian Reform Wiki
- The Continuum (Offline Growth)
- Plant Registry & Universal Crops
- Hydro-Dynamics & Irrigation
- Soil Resilience & Trample Logic
- Right-Click Harvest & Replant
- Polyculture & Biodiversity
- Seed Sowing & Grass Cultivation
- Universal Bone Meal
- Global Growth Multiplier
- Performance & Queue Throttling
- GameRules
- Commands
- Configuration
- Aesthetics & Ambient Feedback
- Advancements