-
Notifications
You must be signed in to change notification settings - Fork 0
Stochastic and Math Utilities
Rifa edited this page Aug 9, 2026
·
1 revision
| Utility Class | Purpose |
|---|---|
net.dasik.social.util.FastRandom |
Singleton zero-allocation RandomSource backed by ThreadLocalRandom
|
net.dasik.social.util.StochasticUtil |
Permille, decile, and percentage probability rolls |
net.dasik.social.util.TimeUtil |
Day count calculations (gameTime / 24000L) and cycle distance math |
FastRandom provides a thread-safe singleton RandomSource (FastRandom.INSTANCE) delegating to ThreadLocalRandom:
FastRandom random = FastRandom.INSTANCE;
float val = random.nextFloat(); // [0.0f, 1.0f)long currentDay = TimeUtil.getGameDay(level.getGameTime());
long ticksToTarget = TimeUtil.getCycleDistance(currentTime, targetTime, 24000L);
Dasik Library | Social AI & Infrastructure Engine
Developed with โค๏ธ by Dasik (Rifaditya) | Licensed under LGPL-3.0
๐ Documentation reflects active repository source code state.
- Hive Mind Social System
- Social Scheduler & Events
- Animal Genetics Engine
- Genetics API & Pedigree
- Genetics Loot Modifiers
- Leader Follower & Flocking
- Dynamic GameRules Manager
- GameRule Codec & Serialization
- Client GameRule & GUI Helpers
- Dynamic Enchantments & Vision
- Stochastic & Math Utilities
- Stale Attribute Purging & Scale
- ModVersionGuard & Startup Safety
- Developer Setup & Building
- Architecture & Package Layout
- Mixin Reference & Hooks
- Behavior Profiles & Conditions
- Consumer Mods Integration Guide