Skip to content

🌿 작물 레지스트리 및 범용 작물 자동 탐색 엔진

Agrarian Reform은 $O(1)$ 초고속 캐시 기반의 무설정 범용 작물 자동 등록 엔진(AgrarianCropRules.java)을 탑재하고 있습니다. 모든 바닐라 및 모드 작물을 자동 식별하여 오프라인 성장에 반영하고 전용 게임 규칙을 생성합니다.


🔍 동적 작물 감지 및 분류 엔진

                               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

📊 지원 식물 인덱스 및 성장 단계 수학

분류대상 Java 클래스 / 태그바닐라 대표 예시단계당 평균 틱오프라인 성장 지원뼛가루 확장
일반 작물CropBlock, #c:crops밀, 당근, 감자, 비트$\sim 6,241\text{ 틱}$✅ 지원 (분산 대기열)바닐라 기본
키 큰 줄기SugarCaneBlock, CactusBlock사탕수수, 선인장$1,365\text{ 틱}$✅ 지원 (최대 3단)✅ 확장 지원
네더 식물NetherWartBlock네더 와트$13,650\text{ 틱}$✅ 지원 (0 $\to$ 3단계)✅ 확장 지원
꼬투리 및 열매CocoaBlock, SweetBerryBushBlock코코아 콩, 달콤한 열매$6,825\text{ 틱}$✅ 지원 (0 $\to$ 2/3단계)✅ 확장 지원
덩굴 및 잎사귀VineBlock덩굴가변적✅ 지원 (아래로 번식)✅ 확장 지원
나무 및 묘목SaplingBlock참나무, 가문비, 자작, 벚나무 묘목$95,550\text{ 틱}$✅ 지원 (나무로 성장)바닐라 기본
모드 농작물모든 #c:crops 또는 AgeBlockFarmer's Delight, Mystical Agriculture설정 가능✅ 지원 (비례 성장)동적 / 확장 지원

🌾 배율 결정 계층 구조 및 동결 상태

java
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;
}

🔄 런타임 자동 감지 및 모드 제거 안정성

  1. 인게임 실시간 감지: AgrarianCropRules가 무작위 틱과 상호작용을 감지합니다. 새로 로드된 모드 작물은 즉시 $O(1)$ 캐시에 등록되고 게임 규칙이 자동 생성됩니다.
  2. 모드 제거 시 무충돌 안전성: 규칙과 캐시는 순수 문자열 Identifier(namespace:path)로 작동합니다. 모드를 제거해도 누락된 블록을 안전하게 무시하여 ClassNotFoundException 충돌이 절대 발생하지 않습니다.

🏷️ 데이터팩 태그 연동 (AgrarianTags)

json
{
  "replace": false,
  "values": [
    "#minecraft:crops",
    "#c:crops",
    "farmersdelight:cabbage",
    "farmersdelight:tomatoes",
    "farmersdelight:onions"
  ]
}

See also: 컨티넘 (오프라인 성장 지속), 글로벌 성장 배율 및 개별 조정, and 2계층 설정 시스템.

Official documentation & web portal for Dasik Igaijinn mods.