
BlockBasedTransientBehavior
Replaces BlockEntityTransient with a block-based ticking implementation.
Description
<div> <div>Replaces the BlockEntityTransient grass growth system with Vintage Story's built-in random block tick system. Optionally converts dry grass from <a href="https://mods.vintagestory.at/show/mod/28845">Art of Growing Patch</a>.</div> </div> <div> <div> <div>Both the Base game grass and Art of Growing attach a BlockEntityTransient (there is a special AOGTransient to handle wetness but it is basically the same logic) to every tallgrass block to drive growth. On large worlds, this results in hundreds of thousands of active tick listeners (about 700k listeners across the loaded chunks in Chronicles of Time server), causing measurable server lag on chunk load and during normal gameplay.</div> </div> <div> </div> <div><a href="https://discord.com/channels/302152934249070593/454909656230526976/1405224979062063154">Read more about this on the Vintage Story discord</a> (I made a post a while ago)</div> <div><br /> <div>This mod eliminates those block entities entirely. Tallgrass now grows and regresses through random block ticks (ShouldReceiveServerGameTicks and OnServerGameTick)</div> <div> </div> <div>Instead of grass taking a set amount of time to grow to the next stage, now a probabilistic approach is taken. On average it should still grow at the same rate, but it is possible that multiple growth stages happen in a short while. That's just the nature of probability and dice rolls.</div> <div> </div> </div> <div>New logic:</div> <div> <div>- Grass grows through the standard AOG stages (eaten - veryshort - short - mediumshort - medium - tall - verytall) at roughly the same average rate</div> <div>- Regresses one stage at a time when the temperature drops below 0°C, or when snow-covered, or when the average rainfall of the last RainfallAveragingDays days is under the number defined by RecessionRainfall</div> <div>- Drops 1-5 dry grass when harvested with a knife or scythe, scaling with height</div> <div>- On first load of a previously unloaded chunk, simulates the missed growth/regression month by month so long absences are reflected correctly (technically achieved by storing the load time in TotalDays every chunk load)</div> <div>- On first load, any existing talldrygrass blocks (from AOG's drying mechanic) are converted to regular tallgrass. Block entities left over from the old system are cleaned up automatically.</div> <div> </div> <div>The grass growth rate multiplier and some other options can be set in ModConfig/bbtb.json on the server:</div> <div><br /> <div>``json</div> <div> <div>{</div> <div> "GrowthRateMultiplier": 1, // How fast the growth factor is </div> <div> "RecessionTemperature": 0.0, // Under this temperature the grass starts receding</div> <div> "GrowthTemperature": 8.0, // Over this temperature the grass starts growing</div> <div> "RecessionRainfall": 0.0 // If the average rainfall for the last RainfallAveragingDays days is under this number, the grass will recede (value from 0-1),</div> <div> "RainfallAveragingDays": 14 // the amount of days to average the rainfall before the current date</div> <div>}<br /><br /></div> </div> <div>``</div> </div> </div> </div>
Download
No download link is available for this entry right now.
Ratings & reviews
Sign in to leave a rating or comment.

