HomeJavaModsWhere's my Brain (WMB)
Where's my Brain (WMB)
ModsJava

Where's my Brain (WMB)

by Bobcat · on Modrinth

Which build do you need?

This mod ships a separate file for every mod loader and every version of the game. Pick both, then download — the wrong build installs fine and then does nothing in the game.

Mod loader

Minecraft version

⬇ Download for 1.20.1–1.21.8 · Forge⬇ Download for 1.20.1–1.20.6 · Fabric
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.

WHERE'S MY BRAIN (WMB)

A lightweight, loader-agnostic Minecraft 1.20.1 optimization mod focused on smarter mob AI scheduling, distance-aware throttling, and adaptive auto-tuning. Keep gameplay feel near players while cutting wasted CPU on far-away or idle mobs. Works on both Forge and Fabric via Architectury.

Join our Discord

Features


How It Works


Diagrams

Async Entity Tracking: Flow

[Server Tick]
  ├─ PreTick
  │   ├─ shouldSchedulePlayer?(interval + tuner + backpressure)
  │   ├─ Snapshot(Player)
  │   ├─ CollectEntitySnapshots (AABB around player)
  │   └─ Submit Task → Executor
  │        └─ [Off-thread]
  │            ├─ Filter by distance ≤ maxTrackingDistance (2D)
  │            ├─ Diff with current tracked set → {toAdd, toRemove}
  │            └─ Enqueue TrackingResult
  └─ PostTick
      ├─ Drain completed results (batched)
      ├─ Apply adds/removes to tracking sets
      ├─ Update metrics (durations, queue size, counts)
      └─ Periodic maintenance (cleanup/disconnects)

Threading Model: Global vs Per-Dimension Pools

Option A: Global Pool

  [AsyncTracker Executor (N threads)]
      ↑ tasks from all dimensions

Option B: Per-Dimension Pools

  [Overworld Executor (M)]   [Nether Executor (M)]   [End Executor (M)]
       ↑ OW tasks                  ↑ Nether tasks          ↑ End tasks

Backpressure: bounded queues + CallerRunsPolicy; scheduling slows when queues grow.

Auto‑Tuner: Control Loop

tickNanos → EMA → window(avg)
            │
            ▼
      Controller (PID or Simple)
            │
     ┌───────┴─────────────────────────────┐
     │                                     │
pathfinding.minRecalcInterval += step   trackerIntervalAddend = clamp(-step)
     │                                     │
cooldown ticks prevent rapid toggling      additive scheduling shift for tracker

DAB Bucketing and Hysteresis

distance (blocks) → 0 ── d0 ── d1 ── d2 ──▶
bucket             NEAR    MID    FAR  DISTANT
multiplier         x1      x2     x4   x8   (defaults; configurable)

hysteresisBlocks (±h) creates a deadband around d0/d1/d2 to reduce bucket flipping.

Regional TPS: Decision Pipeline

[Server Tick]
  ├─ PreTick
  │   ├─ Global TPS sample ← steady after 5+ samples; clamped [0..20]; warm‑up (≥200 ticks) before emergency checks
  │   └─ Update player→region mapping
  ├─ PostTick (per region)
  │   ├─ Accumulate AI nanos, BE & scheduled ticks, redstone updates, memory, players
  │   ├─ Windowed averages (regionalTPS.windowTicks)
  │   ├─ Decide target level using thresholds + hysteresis
  │   ├─ Smoothly adjust region multiplier toward target (±1 per tick)
  │   └─ Apply gating hooks (e.g., chunk random/scheduled ticks)
  └─ Global
      ├─ Emergency trigger if: warm‑up passed ∧ samples≥20 ∧ TPS<15 with cooldown
      └─ Periodic logging & eviction of stale regions

Heatmap: Client Flow & Interactions

/wmb heatmap [radius] → server builds window around player
                        ↓
                 send Heatmap to client
                        ↓
                HeatmapScreen (press H to reopen last)
                        ↓
   Interactions:
   - Mouse wheel: zoom
   - Right‑drag: pan
   - Left‑click on header: toggle Mode (AI ms, Mem MB, Players, Priority)
   - Click LOD: toggle merged vs per‑region view
   - Hover: tooltips (merged + region details)
   - Sidebar: detailed panel (emergency, target multiplier, good/bad streaks, etc.)
   - Global TPS shown in header

Installation

Config location by loader:


Commands

Keybinds


Configuration Reference

All options are documented inline in the generated wmb.toml. Below is a structured overview.

Distance-based AI Bucketing (DAB)

Notes:

Proximity

Pathfinding

Auto Tuning

Checks

Async Spawn

Async Entity Tracker

Culling (Optional)

Visibility (Optional)

Regional TPS


Config Versioning and Auto‑Merge

Tuning Guide


Compatibility


FAQ


Changelog

1.2 (2025-09-04)


License

See LICENSE.txt in the repository.

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