🌾 GlymeraCropSpread v1.1.0 🌾
Mature crops automatically spread to adjacent empty farmland blocks. Natural farm expansion without player interaction!
Most actual version only working for Hytale stable 5 ! Don't miss my other exciting projects — take a look at GlymeraCraft's Profile Discord: https://discord.gg/s5NRFWfxgy
â—† What is GlymeraCropSpread?
GlymeraCropSpread is a farming automation plugin for Hytale servers. When a crop reaches full maturity (StageFinal), it has a chance to spread to adjacent empty farmland blocks - just like grass spreading in nature. The newly placed crop starts as a baby plant and grows up naturally through Hytale's built-in FarmingBlock system. No custom growth tracking, no tick manipulation - just natural farm expansion.
Plant a few seeds, wait, and watch your farm grow on its own.
â—† How It Works
The plugin runs a scan cycle at a configurable interval (default: every 60 seconds). During each cycle:
- All loaded chunks are scanned for mature crops (StageFinal)
- For each mature crop found, a random chance is rolled (default: 25%)
- If the chance succeeds, the plugin checks the 4 adjacent blocks (North, South, East, West)
- A valid spread target must have empty air above and tilled farmland below
- One random valid target is chosen and a new baby crop of the same type is placed
- Hytale's native FarmingBlock system takes over and grows the new plant naturally
â–¸ Spread Rules
- Only mature crops spread - Growing crops (Stage1, Stage2, etc.) do not spread. Only fully grown StageFinal plants trigger spreading.
- Farmland required - Both the source crop and the target position must have tilled farmland (Soil_Dirt_Tilled) below. Watered and fertilized farmland variants are also recognized.
- Empty space required - The target block must be empty (air). Crops will not overwrite existing blocks.
- Cardinal directions only - Crops spread North, South, East, or West. No diagonal spreading.
- Cross-chunk spreading - Crops at chunk borders can spread into adjacent loaded chunks.
- Random target selection - If multiple adjacent blocks are valid, one is chosen randomly.
- Max spreads per cycle - A configurable cap prevents performance issues on large farms (default: 50 per cycle).
â—† Supported Crops (16)
All 16 crop types are enabled by default. Each can be individually enabled or disabled in the config.
- Wheat
- Corn
- Carrot
- Potato
- Tomato
- Onion
- Lettuce
- Cauliflower
- Aubergine
- Chilli
- Turnip
- Pumpkin
- Rice
- Cotton
- Berry
- Apple
â—† Configuration
On first start, a config file is automatically created at: mods/GlymeraCropSpread/config.json
Stop the server, edit the file with any text editor, and restart the server to apply changes. The default config:
{
"spreadIntervalSeconds": 60,
"spreadChancePercent": 25,
"maxSpreadsPerCycle": 50,
"crops": {
"Plant_Crop_Wheat_Block": true,
"Plant_Crop_Corn_Block": true,
"Plant_Crop_Carrot_Block": true,
"Plant_Crop_Potato_Block": true,
"Plant_Crop_Tomato_Block": true,
"Plant_Crop_Onion_Block": true,
"Plant_Crop_Lettuce_Block": true,
"Plant_Crop_Cauliflower_Block": true,
"Plant_Crop_Aubergine_Block": true,
"Plant_Crop_Chilli_Block": true,
"Plant_Crop_Turnip_Block": true,
"Plant_Crop_Pumpkin_Block": true,
"Plant_Crop_Rice_Block": true,
"Plant_Crop_Cotton_Block": true,
"Plant_Crop_Berry_Block": true,
"Plant_Crop_Apple_Block": true
}
}
â–¸ spreadIntervalSeconds
How often the plugin scans for mature crops and attempts to spread them. Lower values mean faster spreading but slightly more server load. Default: 60 | Minimum: 5
â–¸ spreadChancePercent
The percentage chance that each mature crop will attempt to spread during a scan cycle. At 25%, roughly 1 in 4 mature crops will try to spread each cycle. Default: 25 | Range: 1-100
â–¸ maxSpreadsPerCycle
The maximum number of new crops that can be placed in a single scan cycle. This prevents performance issues on servers with very large farms. Default: 50 | Minimum: 1
â–¸ crops
Per-crop toggle. Set any crop to false to prevent it from spreading. Useful if you want only certain crops to auto-expand. Example - disable wheat and corn spreading:
"crops": {
"Plant_Crop_Wheat_Block": false,
"Plant_Crop_Corn_Block": false,
...
}
â—† Performance
GlymeraCropSpread is designed for minimal server impact:
- Chunk-level filtering - Chunks without mature crops are skipped entirely before any block-level scanning begins
- Section-level filtering - Within chunks, sections (32x32x32) without mature crops are also skipped
- FastUtil collections - Uses high-performance integer hash sets for block ID lookups instead of standard Java collections
- Capped spreads - The maxSpreadsPerCycle setting ensures scan cycles terminate early once the limit is reached
- Y-range limited - Only scans between Y=30 and Y=200, skipping underground and sky sections
- No tick manipulation - Does not modify Hytale's internal tick rate or farming system. Growth after placement is 100% native.
â—† Installation
- Stop your Hytale server
- Copy GlymeraCropSpread-1.1.0.jar into your server's mods/ folder
- Start the server
- The config file will be created automatically at mods/GlymeraCropSpread/config.json
- Check the server log for: "[GlymeraCropSpread] Started v1.1.0 - Interval: 60s, Chance: 25%, Max/Cycle: 50"
server/
└── mods/
└── GlymeraCropSpread-1.1.0.jar
No pack required. No dependencies. Just one JAR file.
â—† Server Log Output
Example log messages:
[GlymeraCropSpread] Config loaded
[GlymeraCropSpread] Farmland 'Soil_Dirt_Tilled' -> ID 3421
[GlymeraCropSpread] Crop 'Plant_Crop_Wheat_Block' -> StageFinal ID 5102
[GlymeraCropSpread] Crop 'Plant_Crop_Corn_Block' -> StageFinal ID 5118
[GlymeraCropSpread] Resolved 16 crop types, 4 farmland IDs
[GlymeraCropSpread] Started v1.1.0 - Interval: 60s, Chance: 25%, Max/Cycle: 50, Crops: 16, Farmland IDs: 4
[GlymeraCropSpread] Spread 12 new plants
[GlymeraCropSpread] Spread 8 new plants
[GlymeraCropSpread] Stopped.
â—† Technical Details
- No ECS systems registered - the plugin uses a scheduled executor task independent of Hytale's entity system
- Block placement via BlockAccessor.setBlock() with the base crop block name - Hytale's FarmingBlock system handles all growth stages natively
- Mature crops are detected by their StageFinal interaction state block ID (e.g. *Plant_Crop_Wheat_Block_State_Definitions_StageFinal)
- Farmland detection includes all tilled soil variants: base, watered, fertilized, and fertilized+watered
- Block operations are deferred to the world thread via world.execute() to avoid concurrency issues
- All block ID lookups use FastUtil IntOpenHashSet and Int2ObjectOpenHashMap for O(1) performance
- Scan range is limited to Y=30-200 with section-level pre-filtering (sections are 32 blocks tall)
â—† Summary
- 16 crop types supported, all individually toggleable
- Automatic spreading - mature crops spread to adjacent empty farmland
- Native growth - new plants grow through Hytale's built-in FarmingBlock system
- Configurable - interval, chance, max spreads, per-crop toggle
- Performance optimized - chunk and section pre-filtering, FastUtil collections, spread cap
- Cross-chunk capable - crops at chunk borders spread into neighboring chunks
- Zero dependencies - one JAR, no pack required, no external libraries
- Farmland-aware - recognizes base, watered, fertilized, and fertilized+watered farmland
â—† Changelog
â–¸ v1.1.0
- Added section-level pre-filtering for improved scan performance
- Added farmland variant detection (watered, fertilized)
- Config validation with minimum value enforcement
â–¸ v1.0.0 - Initial Release
- Automatic crop spreading with configurable interval, chance, and cap
- 16 crop types with per-crop toggle
- JSON config with auto-generation
â—† Support
Having issues or questions? Leave a message here or visit our Discord!
Developed by GlymeraCraft