This file provides guidance to Claude Code (claude.ai/code) when working with code in this repository.
Dynmap is a dynamic web mapping plugin/mod for Minecraft servers. It's a multi-platform project supporting Spigot/PaperMC, Forge, and Fabric across multiple Minecraft versions (1.12.2 - 1.21.x).
# Build all platforms (requires JDK 21 as default)
./gradlew setup build
# Build outputs go to /target directory
# Build specific module (for faster iteration, but NOT for PR submissions)
./gradlew :DynmapCore:build
# Run unit tests (DynmapCore only — JUnit 4)
./gradlew :DynmapCore:test
# Forge 1.12.2 (requires JDK 8 - set JAVA_HOME accordingly)
cd oldgradle
./gradlew setup buildJDK Requirements:
- Default: JDK 21
- Forge 1.12.2 (oldgradle): JDK 8 strictly required
- Runtime targets: JDK 8 (1.16-), JDK 16 (1.17.x), JDK 17 (1.18-1.20.4), JDK 21 (1.20.5+)
Build notes:
gradle.propertiessetsorg.gradle.parallel=falseandorg.gradle.daemon=false— do not change thesesnakeyamlis pinned at 1.23 intentionally — newer versions break on Windows-encoded config files
Core Shared Modules:
DynmapCoreAPI/- Stable public API for external plugins/mods (markers, mod support, rendering). Published torepo.mikeprimm.com. Theorg.dynmap.rendererpackage here definesDynmapBlockState— the central block state abstraction used everywhere.DynmapCore/- Internal shared implementation (NOT stable - subject to breaking changes)dynmap-api/- Bukkit-specific public API
Platform Implementations:
spigot/- Bukkit/PaperMC implementation (DynmapPlugin.java)bukkit-helper-*- Version-specific NMS code (one per MC version: 1.13-1.21)fabric-*- Fabric mod implementations (1.14.4-1.21.x)forge-*- Forge mod implementations (1.14.4-1.21.x);forge-1.12.2lives inoldgradle/
External Plugins/Mods
↓
DynmapCoreAPI (stable, published to repo.mikeprimm.com)
↓
DynmapCore (internal, unstable)
↓
Platform-specific modules (Spigot, Fabric, Forge)
DynmapCore.java— Main coordination hub (~3,100 lines); bootstrapped by each platformMapManager.java— Tile rendering orchestration; owns the render thread pool andFullWorldRenderStatequeuehdmap/— HD map rendering pipeline:IsoHDPerspective— Isometric raytrace engine (the hot rendering path)HDBlockModels/HDScaledBlockModels— Block geometry (patch/volumetric/scaled models)TexturePack/TexturePackLoader— Texture resolution from resource packshdmap/renderer/— Custom block renderers (stairs, fences, doors, etc.) implementingCustomRenderer- Shaders (
DefaultHDShader,CaveHDShader,TopoHDShader, etc.) — post-process pixel color - Lighting (
DefaultHDLighting,ShadowHDLighting, etc.) — light level calculation
storage/— Storage backends (FileTree, MySQL, MariaDB, PostgreSQL, SQLite, MSSQL, AWS S3)web/— Embedded Jetty 9 server with custom HTTP routing (no standard servlet container)markers/impl/— Full marker system implementation; public interface is inDynmapCoreAPIutils/MapChunkCache+utils/MapIterator— Abstract interfaces that each platform implements to feed world data into the renderer
Each platform module (Spigot bukkit-helper-*, Fabric, Forge) must implement:
MapChunkCache— Loads and caches chunk data for a tile's required chunksMapIterator— Block-by-block iteration over the loaded chunk cache- A platform entry point (e.g.,
DynmapPluginfor Spigot) that bootstrapsDynmapCore
The bukkit-helper-* modules contain version-specific NMS code; spigot/ delegates to the appropriate helper at runtime via reflection.
Unit tests exist in DynmapCore/src/test/ (JUnit 4) covering Matrix3D, Vector3D, IpAddressMatcher, DynIntHashMap, and BufferInputStream. Run with ./gradlew :DynmapCore:test.
Full verification requires:
- Building all platforms:
./gradlew setup buildANDcd oldgradle && ./gradlew setup build - Manual testing on target Minecraft server platforms
PRs must build and test on ALL platforms including oldgradle. Changes to DynmapCore/DynmapCoreAPI require testing on all platforms.
- Java 8 compatibility required — Code must compile and run on Java 8
- Java only — No Kotlin, Scala, or other JVM languages
- No dependency updates — Library versions are tied to platform compatibility
- No platform-specific code — Must work on Windows, Linux (x86/ARM), macOS, Docker
- Small PRs only — One feature per PR, no style/formatting changes
- No mod-specific code — Use Dynmap APIs instead; external mods should depend on DynmapCoreAPI
- Apache License v2 — All code must be compatible
- DynmapCoreAPI is the only stable API — Do not add external dependencies on DynmapCore internals