Development
This page covers building, testing, and the technical architecture of this fork. For a full maintainer reference see FORK.md in the repository.
Build
./gradlew buildProduces build/libs/RayTraceAntiXray-<version>.jar — one universal JAR for Paper 26.3, 26.2, 26.1.2 and 1.21.11.
| Area | This fork |
|---|---|
| Build system | Gradle multi-module (build.gradle.kts, Paperweight) |
| Git layout | Single main branch |
| Paper API | Main code: paperDevBundle 26.3; per-version NMS in paper_26_3 / paper_26_2 / paper_26_1_2 / paper_1_21_11 |
| Java bytecode | 21 (Gradle toolchain 25) |
| Output JAR | RayTraceAntiXray-<version>.jar (no classifier) |
Tests and benchmarks
# Unit tests (excludes @Tag("bench"))
./gradlew test
# Section-leap vs pure DDA micro-benchmark (stdout table)
./gradlew bench --rerun-tasksLocal test servers
./gradlew run26_3
./gradlew run26_2
./gradlew run26_1_2
./gradlew run1_21_11Multi-NMS (single JAR)
Version-specific NMS bindings live in Gradle subprojects and are selected at runtime via NmsBridge:
| Subproject | Runtime class | ChunkPacketInfo constructor |
|---|---|---|
paper_26_3 | nms.paper_26_3.NmsCompat26_3 | ChunkPacketInfo(chunk) + setChunkPacket(...) |
paper_26_2 | nms.paper_26_2.NmsCompat26_2 | ChunkPacketInfo(chunkPacket, chunk) |
paper_26_1_2 | nms.paper_26_1_2.NmsCompat26_1_2 | ChunkPacketInfo(chunkPacket, chunk) |
paper_1_21_11 | nms.paper_1_21_11.NmsCompat1_21_11 | ChunkPacketInfo(chunkPacket, chunk) |
Main code calls NmsCompat static methods — never ChunkPos.pack / asLong, ClientboundLevelChunkWithLightPacket.getChunkData() / chunkData() directly.
PacketEvents
This fork uses PacketEvents instead of ProtocolLib or custom Netty injection. PacketListener handles chunk unload, respawn, and chunk data to align player state with outgoing packets.
Folia
folia-supported: trueinplugin.yml- Ray-trace ticks use
Bukkit.getAsyncScheduler().runAtFixedRate - Per-player block updates use region-aware schedulers
Section leap
When section-leap: true, BlockOcclusionCulling skips air-only 16³ sections via SectionRayMath.sectionExitParameter and BlockIterator#reseedAfterSectionLeap. Unit tests in SectionRayMathTest and SectionLeapTraversalTest assert leap and legacy paths agree.
Contributing
- Fork the repository on GitHub.
- Create a feature branch from
main. - Run
./gradlew testbefore opening a PR. - Edit documentation under
docs/for operator-facing changes to commands, permissions, or configuration.
