From minestom-skills
Load and save real Minecraft worlds in Minestom with the Anvil format — AnvilLoader, InstanceContainer.setChunkLoader, saveChunksToStorage/saveInstance, the region/ directory layout, IChunkLoader for custom storage, and async chunk load/unload. Use when loading an existing vanilla/Anvil world, persisting world edits to disk, or implementing custom chunk storage.
How this skill is triggered — by the user, by Claude, or both
Slash command
/minestom-skills:minestom-anvil-worldsThe summary Claude sees in its skill listing — used to decide when to auto-load this skill
Minestom does **not** save worlds by default — instances are in-memory. To load an existing Minecraft world or persist edits, attach a `ChunkLoader`. `AnvilLoader` reads/writes the vanilla **Anvil** region format.
Minestom does not save worlds by default — instances are in-memory. To load an existing Minecraft world or persist edits, attach a ChunkLoader. AnvilLoader reads/writes the vanilla Anvil region format.
import net.minestom.server.instance.AnvilLoader;
InstanceContainer instance = MinecraftServer.getInstanceManager().createInstanceContainer();
instance.setChunkLoader(new AnvilLoader("worlds/myworld"));
The folder needs at least a region/ subdirectory (the .mca files). Chunks are read lazily as they load. Generation and the loader coexist: chunks present on disk are loaded; missing chunks fall back to the instance Generator (set one, or unloaded areas stay empty).
instance.setGenerator(unit -> unit.modifier().fillHeight(0, 40, Block.STONE)); // fallback for ungenerated chunks
instance.saveChunksToStorage(); // all loaded chunks -> disk
instance.saveInstance(); // instance-level data + chunks
Saving only works for instances backed by a loader that supports writing (AnvilLoader does). Call it on shutdown and/or periodically from a scheduler — Minestom won't autosave.
MinecraftServer.getSchedulerManager().buildTask(instance::saveChunksToStorage)
.repeat(TaskSchedule.minutes(5))
.schedule();
instance.loadChunk(chunkX, chunkZ).thenAccept(chunk -> { /* ready */ });
instance.unloadChunk(chunkX, chunkZ); // drops from memory (save first if dirty)
Chunk load returns a CompletableFuture — I/O happens off the tick thread. Don't block on it from a tick; chain with thenAccept.
To store chunks somewhere other than Anvil files (DB, network, the Polar format), implement IChunkLoader:
public interface IChunkLoader {
CompletableFuture<Chunk> loadChunk(Instance instance, int chunkX, int chunkZ);
CompletableFuture<Void> saveChunk(Chunk chunk);
// + saveChunks / supportsParallelSaving / unload hooks
}
instance.setChunkLoader(new MyChunkLoader());
This is how alternative formats (e.g. Polar, a compact single-file format from the community) plug in — same interface, different backing store.
region/; Minestom won't run vanilla mob/redstone logic — it just serves the blocks.createInstanceContainer'd instances as empty until chunks resolve.minestom-instances-worlds for instance basics and generators, minestom-schedulers-tasks for autosave timers.npx claudepluginhub tjkdev1/minestom-skills --plugin minestom-skillsFetches up-to-date documentation from Context7 for libraries and frameworks like React, Next.js, Prisma. Use for setup questions, API references, and code examples.
Applies a firm's KYC/AML rules grid to parsed onboarding records: assigns risk rating, checks required documents, outputs rule outcomes with citations, and routes for escalation.
Generates daily or weekly digests of activity from connected sources (chat, email, docs, tasks, CRM), highlighting action items, decisions, mentions, and project updates.