
RandomChunk
Make me a mod that whenever a player walks into a chunk it generates the entire chunk with one random block so the entire chunk for example sand. and once...
70—fabricServer1.21.1mod
RandomChunk server mod
What it does
- Walking into a new chunk flattens and paints that entire plot into a single block theme (sand, stone, deepslate, etc.) with clear headroom for fighting.
- A random guardian mob with buffs and a custom name spawns at the chunk center; killing it drops the glass lock, hands out a brief haste buff, and unlocks progression.
- Red stained-glass walls rise around the chunk at player height, plus particles/sounds that pulse while the arena is active; anyone inside is locked to the plot and teleport-snapped back if they try to cross the border.
- Other players standing in the same chunk are auto-linked to the encounter so parties clear together; locks are cleaned up if guardians die, unload, or worlds unload.
Implementation notes
- Mod id/name: randomchunk / RandomChunk; server entrypoint: com.playergames.plugin.RandomChunkMod.
- Fabric API is bundled inside the jar, so no extra download is required at runtime.
- Each arena caches its anchor Y level for lighter teleports and a tighter, mid-height barrier instead of full-height walls; barriers and particles clean up as soon as the guardian is gone.
Known limitations / ideas
- Large one-chunk repaints can spike tick time on densely populated servers; add a cooldown or cap arena count if needed.
- Walls are glass and destructible; teleporting still enforces the lock, but swap to barrier blocks if you want an unbreakable seal.
- Chunk state is not persisted across restarts, so revisiting a chunk after reboot reshuffles its theme and guardian.
Server Validation
✅ Server validation passed - The mod was tested on a real Minecraft server and loaded successfully.