-
Notifications
You must be signed in to change notification settings - Fork 0
Architecture and Mixins
This document outlines package architecture, test suites, and provides an exhaustive breakdown of all Java Mixin injection targets in Agrarian Reform.
net.instantgratification.agrarianreform
โโโ AgrarianGameRules.java # 15 static GameRules & transient debug mode
โโโ AgrarianReformFabric.java # ModInitializer entrypoint, lifecycle hooks, 6D use-block
โโโ client
โ โโโ AgrarianReformClient.java # ClientModInitializer & morning moisture tint
โโโ config
โ โโโ AgrarianConfig.java # Global JSON config template (Schema v2) & dirty-tracking
โ โโโ ModMenuIntegration.java # ModMenu API integration
โ โโโ YaclScreenHelper.java # Isolated 3-tab YACL v3 client GUI builder
โโโ continuum
โ โโโ ContinuumData.java # SavedDataType dimension persistence & 30-day pruning
โ โโโ ContinuumManager.java # ServerChunkEvents listeners & 5-crops/tick queue
โ โโโ CropScanner.java # Sub-chunk palette pre-filtering & speed estimator
โโโ crop
โ โโโ AgrarianCropRules.java # O(1) universal crop auto-population & dynamic GameRules
โโโ mixin
โ โโโ BlockColorsMixin.java # Client block color provider intercept
โ โโโ BlockStateBaseMixin.java # Random tick speedup/slowdown & max-age early-break
โ โโโ CropBlockMixin.java # Growth speed, rain spurt, rustle sound mixin
โ โโโ FarmlandBlockMixin.java # Soft Step trample & Chebyshev concentric hydration
โโโ util
โ โโโ AgrarianTags.java # Datapack tag keys (#c:crops, #soft_step_boots)
โ โโโ GrowthHelper.java # Concentric Chebyshev math, bare-foot trample logic
โ โโโ ModVersionGuard.java # Startup API class check guard (Knot resolution)
โ โโโ SoundHelper.java # Audio debouncing & primitive Int2Long collections
net.instantgratification.agrarianreform
โโโ config
โ โโโ AgrarianConfigTest.java # Schema stability, multiplier hierarchy, dirty tracking
โโโ continuum
โโโ ContinuumMathTest.java # Delta math, frozen scaling, 30-day pruning, Chebyshev geometry
| Mixin Class | Target Minecraft Class | Annotation & Injection Point | Purpose |
|---|---|---|---|
FarmlandBlockMixin |
net.minecraft.world.level.block.FarmlandBlock |
@Inject(method = "fallOn", at = @At("HEAD"), cancellable = true) |
Intercepts trample with bare-foot fast-fail, Soft Step, and trample_immunity_players_only gating. |
FarmlandBlockMixin |
net.minecraft.world.level.block.FarmlandBlock |
@Inject(method = "isNearWater", at = @At("HEAD"), cancellable = true) |
Replaces 4-block water check with expanding Concentric Chebyshev shells ( |
CropBlockMixin |
net.minecraft.world.level.block.CropBlock |
@ModifyReturnValue(method = "getGrowthSpeed", at = @At("RETURN")) |
Applies +10% polyculture biodiversity growth bonus for adjacent diverse crops. |
CropBlockMixin |
net.minecraft.world.level.block.CropBlock |
@Inject(method = "randomTick", at = @At("HEAD"), cancellable = true) |
Pre-tick rain spurt acceleration (advances stage during rainfall). |
CropBlockMixin |
net.minecraft.world.level.block.CropBlock |
@Inject(method = "randomTick", at = @At("RETURN")) |
Post-tick vitality Happy Villager green sparkles when stage changes. |
CropBlockMixin |
net.minecraft.world.level.block.CropBlock |
@Inject(method = "entityInside", at = @At("HEAD")) |
Triggers crop rustle sound effect with debounced entity cooldowns. |
BlockStateBaseMixin |
net.minecraft.world.level.block.state.BlockBehaviour$BlockStateBase |
@Inject(method = "randomTick", at = @At("HEAD"), cancellable = true) |
Intercepts plant random ticks to scale speed per-crop and breaks early upon reaching max age. |
BlockColorsMixin |
net.minecraft.client.color.block.BlockColors |
@Inject(method = "createDefault", at = @At("RETURN")) |
Registers morning moisture soil tinting (ticks 23000 to 2000). |
Agrarian Reform strictly decouples its persistent timestamp data from individual chunk files:
โโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโ
โ STORAGE SEPARATION โ
โโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโค
โ 1. DIMENSION STORAGE (data/agrarian_reform_continuum.dat) โ
โ โโโ ContinuumData (SavedDataType) โ
โ โโโ Stores Map<ChunkPos (Long), UnloadTimestamp (Long)> โ
โ โโโ Auto-prunes entries older than 30 days on save โ
โ โโโ Zero impact on chunk NBT or chunk dirty flags โ
โ โ
โ 2. CHUNK STORAGE (region/r.X.Z.mca) โ
โ โโโ LevelChunk NBT (Block States, Tile Entities) โ
โ โโโ ChunkAccess.unsaved flag โ
โ โโโ Only marked TRUE when setBlock() changes a state โ
โโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโ
See also: The Continuum (Offline Growth), Performance & Queue Throttling, and Developer Setup & Building.
๐ 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