Skip to content

BharatCore Architecture

BharatCore is the foundational server engine for all game modes across the BharatMC Network (Lifesteal, Survival, Practice, Hub). It manages everything from player profile state sync, economy, crate rewards, Bedrock UI dialogs, combat tagging, and store integration.

+--------------------------------------------+
| Velocity Proxy |
+--------------------------------------------+
|
Redis Pub/Sub Sync
|
+-------------------+--------------------+
| |
+------------------+ +------------------+
| Lifesteal Server | | Survival Server |
| (BharatCore) | | (BharatCore) |
+------------------+ +------------------+
| |
+-------------------+--------------------+
|
PostgreSQL & Redis

BharatCore is structured as modular components that can be toggled on or off per server type:

Module Configuration Purpose
Store Module store.yml Web store order execution, BMC coins balance, kit deliveries, donation broadcasts
Vote Module vote.yml Vote reminders, vote party milestones, Vote Piñata minigame event & rewards
Profile Sync config.yml Player rank, coins, playtime, and persistent data synchronization via Redis
Combat System combat.yml Combat tagging, PvP timer, pearl cooldowns, anti-combat logging
Bedrock Bridge bedrock.yml Floodgate / Geyser integration and Cumulus UI dialogs

To allow independent server-specific customization without modifying Java code or breaking centralized settings:

  1. store.yml: Contains store URLs, web API keys, donation broadcast templates, BMC Coin wallet settings, and sound cues.
  2. vote.yml: Contains vote links, vote reminder intervals, party thresholds, and the complete Vote Piñata entity attributes and reward drop tables.

  • Redis Connections: Handled via pooled Jedis / Lettuce connections. All pub/sub listeners run asynchronously on dedicated daemon worker threads.
  • Fail-safe Dispatch: If store/vote reward commands fail due to server lag or invalid keys, an error is reported back to Redis and logged with exact command IDs for auditability.