Skip to content

Latest commit

History

19 Commits

Folders and files

NameName
Last commit message
Last commit date

Repository files navigation

OracleServer

A ground-up Java implementation of the Minecraft 1.8.8 server protocol. No dependency on Bukkit, Spigot, Paper, or any other forks: the handshake, login, play loop, world tick, chunk pipeline, and entity broadcast layer are all implemented directly on top of Netty.

The project targets a stable 20 TPS under load while keeping per-tick allocations close to zero, so the JVM stays out of GC even when broadcasting thousands of entity updates per second.

Highlights

  • Pure Java, zero forks. Implements the Minecraft 1.8.8 protocol end-to-end on Netty.
  • Custom tick loop. Drives entity ticks, scheduler tasks, async chunk loading, and connection drains.
  • Allocation-aware hot path. Profiled and tuned so the per-broadcast cost is bounded by Netty's own write pipeline, not application code.
  • Custom MPSC packet queue. Unbounded chunked design with one ~8 KB chunk allocated per 1024 enqueued packets (vs. one node per packet for ConcurrentLinkedQueue).
  • Built-in profiler. Per-section CPU time and per-thread allocation tracking, accessible from the /pt command in-game.

Performance

Numbers below are from a single 10-second profile window with 1 real client (teixayo) + 1000 FakePlayers orbiting in a circle (the /benchmark load test). Hardware: local development machine, localhost loopback.

MetricBefore optimizationAfter optimizationReduction
Total allocation rate11.40 MB/s2.41 MB/s79%
Tracked-section allocation7.20 MB/s0.65 MB/s91%
broadcast.dispatch.EntityLook3.41 MB/s0.09 MB/s97%
broadcast.dispatch.EntityHeadLook3.09 MB/s0.07 MB/s98%
Main thread allocations1.73 MB/s0.53 MB/s69%
GC pauses in window1 ms0 ms
Avg tick.total1959 us1981 usunchanged

Server CPU usage during the benchmark stayed below 1.5%, and the heap stabilized at ~49 MB. See docs/PERFORMANCE.md for the full optimization journey and methodology.

Prerequisites

  • Java 21+
  • Maven 3.6+
  • Environment variable PORT (the TCP port to listen on, e.g. 25565)
  • Optional environment variable ONLINE_MODE (set to false for offline-mode development)

Quick start

Clone and build:

git clone https://github.com/teixayo/OracleServer.git
cd OracleServer
mvn clean package

Run:

PORT=25565 ONLINE_MODE=false java --enable-preview -jar target/Main-0.5.0-BETA.jar

Connect with a Minecraft 1.8.8 client and add a server at localhost:25565.

In-game commands

CommandDescription
/ptShow live performance counters in tab
/profiler start <seconds>Capture a CPU + allocation profile for N seconds, then print a report
/benchmark <count>Spawn N FakePlayers orbiting around you (load test)
/npc <name>Spawn a static NPC
/hologram <text>Create an armor-stand-based hologram
/savePersist loaded chunks to disk
/healRestore your health
/killSet your health to zero
/viewdistance <chunks>Change chunk view distance
/dropDrop a test item entity

Status

Working: handshake, login, play loop, chunk send, entity spawn/despawn, movement broadcasts, basic combat, inventory clicks, command framework, profiler, benchmark.

Work in progress: full combat mechanics, mob AI, plugin API.

License

No license file is included yet. Treat as source-available for inspection. If you want to use it elsewhere, open an issue first.

About

A high‑performance, pure‑Java Minecraft 1.8.8 server with a clean, modular architecture.

Resources

Stars

2 stars

Watchers

0 watching

Forks

Releases

Packages

Used by

Contributors

Languages