HomeJavaModsChronos Rewards
Chronos Rewards
ModsJava

Chronos Rewards

by viktor.koniushenko · on Modrinth

TECHNICAL SPECIFICATION & ARCHITECTURE: CHRONOSREWARDS 100% Server-Side Playtime & Daily Streak Rewards Engine for Fabric 1. INTRODUCTION AND CORE…

Which Minecraft do you have?

Every version of the game needs its own build. Pick yours, then download — the wrong build installs fine and then does nothing in the game. This mod is built for Fabric only.

⬇ Download for 26.2⬇ Download for 26.1–26.1.2⬇ Download for 1.21–1.21.11
I don't know my version or loader
Open the Minecraft launcher and look at the profile you play on — it names both, like fabric-loader-1.21.4. The version also shows in the bottom-right corner of the game's main menu.
No loader in the profile name? Then it's plain Minecraft, and these mods won't run — you need Fabric or NeoForge installed first.

TECHNICAL SPECIFICATION & ARCHITECTURE: CHRONOSREWARDS

100% Server-Side Playtime & Daily Streak Rewards Engine for Fabric


1. INTRODUCTION AND CORE PHILOSOPHY

ChronosRewards is a high-performance, progression-focused, 100% server-side Fabric mod designed to solve player retention issues in multiplayer environments. By processing all logic via standard networking and container packets, vanilla clients can connect seamlessly and interact with fully color-coded custom menus without downloading any client-side modifications!

The mod introduces a balanced, highly satisfying system that tracks and rewards players for both daily consistency and long-term playtime grind simultaneously under intense, max-capacity stress testing setups with hundreds of concurrent players.


2. SYSTEM ARCHITECTURE & CORE MECHANICS

2.1 Dynamic Virtual Inventory Interface (GUI Engine)

The interface maps out raw data directly into container screens using a vanilla GenericContainerScreenHandler structure matching the row parameters provided in the config file.

2.2 Precise Temporal Streak Validation

Daily login tracking avoids buggy local system calendar dependencies by calculating the exact epoch timestamp delta (in milliseconds) between the current login and the player's last recorded daily claim:

2.3 Instant Join-Item Delivery Matrix

To welcome players, the mod intercepts player entry handlers. When a connection is initialized, the mod evaluates the player's immediate eligibility status. If the player is cleared for a daily or a milestone reward, the engine directly injects the concrete base item straight into the player's inventory using player.getInventory().insertStack().


3. MODDED EXECUTION SPECIFICATIONS BY TARGET FAMILY

3.1 MINECRAFT 26.2.x EXECUTION SPECIFICATION

Low-Level Packet Interception

The mod injects via a core Mixin targeting ServerPlayNetworkHandler.onPlayerJoin(). Upon execution, it triggers an asynchronous read of the JSON cache, runs the streak calculation delta, and drops any pending entry item blocks straight into the user's data container.

Thread Performance Optimizations

Playtime calculations use a global ticking map managed through direct injections into MinecraftServer.tick(). To maximize the performance of processing cores, runtime values are mapped using Java 25 Scoped Values and lightweight Virtual Threads, reducing execution frame drops on tightly packed dedicated architectures.


3.2 MINECRAFT 26.1.x EXECUTION SPECIFICATION

Registry Evaluation

Since 26.1.x introduces refined data serialization protocols, item stacks are built dynamically by querying the Registries.ITEM registry inside the server block execution thread. Playtime states are synced natively with Brigadier command execution nodes via CommandRegistrationCallback.


3.3 MINECRAFT 1.21.x GENERAL SPECIFICATION

Data Component Registry Integration

Minecraft 1.21.x completely lacks legacy NBT stacks for menu items, relying instead on type-safe Data Component systems. Item generation maps string components inside the config into type-safe instances using the active registry database. Text modifications are attached via DataComponentTypes.LORE and DataComponentTypes.CUSTOM_NAME parameters.

Thread-Isolated Storage Architecture

To prevent server stuttering during auto-save loops (autosave_interval_ticks), runtime metrics clone data profiles onto an asynchronous storage thread pool. This background engine serializes player playtime maps and timestamps directly into the directory using standard GSON configurations.

Enhance your server setup! Check out my other server-side mods over at : Fabric Server Essentials


4. PRODUCTION MASTER CONFIGURATION (config/chronos_rewards.json)

(Shorter optimized config with exactly 3 reference examples max for clean code generation)

{
  "command": "rewards",
  "autosave_interval_ticks": 1200,
  "menu": {
    "title": "Chronos Max Capacity Stress Test",
    "rows": 6
  },
  "streak": {
    "minimum_window_millis": 72000000,
    "maximum_window_millis": 172800000
  },
  "rewards": [
    {
      "id": "daily_1", 
      "type": "daily", 
      "slot": 0, 
      "required_streak": 1,
      "title": "aDay 1 Welcome", 
      "item": "minecraft:emerald",
      "lore": ["Streak: {streak}", "{status}"], 
      "commands": ["give {player} emerald 1"]
    },
    {
      "id": "playtime_1m", 
      "type": "playtime", 
      "slot": 27, 
      "required_ticks": 1200,
      "title": "ePlaytime: 1m Starter", 
      "item": "minecraft:bread",
      "lore": ["Time: {playtime}", "{status}"], 
      "commands": ["give {player} bread 2"]
    },
    {
      "id": "playtime_100h", 
      "type": "playtime", 
      "slot": 53, 
      "required_ticks": 7200000,
      "title": "4Playtime: 100h Legend", 
      "item": "minecraft:elytra",
      "lore": ["Time: {playtime}", "{status}"], 
      "commands": ["give {player} elytra 1"]
    }
  ]
}

5. HARDWARE PERFORMANCE & MEMORY MANAGEMENT

Memory Profile Reduction via FastUtil

To completely avoid memory waste from boxing primitive types, all player runtime mappings (UUID to playtime ticks and claim timestamps) are strictly maintained via high-performance primitive maps like Object2LongOpenHashMap from the FastUtil library. This ensures minimal overhead, maintaining ultra-low garbage collection cycle metrics even with high concurrent player counts under max capacity stress tests!


HOW TO USE THE JSON CONFIGURATION

Quick facts

Install steps are the general flow for this file type — How to install Minecraft Java mods & modpacks walks through it step by step.

Verified by MCModsHub

These come from our own check of the pack file, not from the source page.

Explore more