- Java 100%
| Filename | Latest commit message | Latest commit date |
|---|---|---|
| docs/superpowers | ||
| src | ||
| .gitignore | ||
| build.gradle | ||
| gradle.properties | ||
| README.md | ||
| settings.gradle | ||
Fake Players
Server-only load-test mod for Minecraft 1.21.1 and NeoForge 21.1.228. It creates real ServerPlayer instances on lightweight embedded channels, so they enter the player list, appear in tab, tick, and drive chunk loading with the server's view and simulation distances.
Command
Requires permission level 2:
/fakeplayers <count>
/fakeplayers 20activates saved slots 1–20.- Running it again restores the same UUIDs, names, dimensions, and coordinates.
/fakeplayers 100keeps slots 1–20 and creates slots 21–100./fakeplayers 0disconnects all fakes without deleting their roster.- Lower counts disconnect higher slots but keep them for later restoration.
One player is added or removed per tick to prevent login bursts from dominating a server tick. There is no mod-defined count ceiling. New records use random overworld chunk centers up to 4,992 blocks from the chunk containing the configured world spawn and save surface coordinates in world/data/fakeplayers_roster.dat. After /setworldspawn, rerun /fakeplayers; saved coordinates regenerate lazily while UUIDs and names stay unchanged.
Fake players remain stationary and invulnerable. Outgoing packets are fully encoded in memory and discarded after serialization, while chunk batches are acknowledged at nine chunks per tick. Every two to six seconds each fake sends realistic hotbar-change and arm-swing actions through the server's packet handlers. This exercises server chunk generation, tracking, simulation, packet handling, packet creation, and encoding; it cannot reproduce physical network bandwidth, client GPU rendering, or client processing because no Minecraft client exists.
Joining and removal use vanilla player-list paths, including tab-list updates and yellow join/leave chat messages. Newly created slots receive random gamertag-style names; saved slots keep their existing names.
The target count is intentionally not saved. After a restart or crash, rerun the command to restore the same roster.
Build
Requires Java 21:
$env:JAVA_HOME='C:\Program Files\Eclipse Adoptium\jdk-21.0.9.10-hotspot'
& 'C:\Tools\Gradle\gradle-8.12\bin\gradle.bat' clean test build
Install build/libs/FakePlayers-1.0.5.jar in the server's mods directory.
Server check
- Start a dedicated server with the mod installed.
- Run
/fakeplayers 20and confirm 20 generated names appear in tab with join messages. - Confirm those players are spread across the overworld and their surrounding chunks load to configured view/simulation distances.
- Restart, rerun
/fakeplayers 20, and confirm names and coordinates match. - Run
/fakeplayers 100, confirm only 80 new roster entries appear, then use/fakeplayers 0to disconnect them.