Sulfur Caves phase (MC 26.2), version-gated phase index, and phase order GUI#539
Merged
Conversation
Adds a Sulfur Caves phase at the 15000 spot with wiki-accurate mob spawn weights (Sulfur Cube 100, Creeper/Skeleton/Zombie 50 each, Slime 25, Cave Spider 20, Enderman 10, Witch/Zombie Villager 5, ambient Bat 10), sulfur and cinnabar blocks mixed with typical underground blocks, and themed chests. The goto loop moves from 15000 to 15500. Because the biome, blocks, mobs, and chest items only exist from Minecraft 26.2, phases can now declare requiredMinecraftVersion and are skipped with an info log on older servers: - New phases_index.yml is read before any phase file, so gated phases are skipped without their files ever being parsed. This matters because YamlConfiguration eagerly deserializes ItemStacks during parsing, which threw errors for unknown items. The index also carries per-phase order, length, and enabled state (start blocks are the running sum of lengths), preparing for admin phase reordering. Legacy installs get an index generated automatically; a malformed index falls back to direct file loading. - Chest files are now read with plain SnakeYAML and each item is built individually, so an item unknown to the server version is skipped with a log line instead of a stack trace. - Block and mob entries accept an object form with a weight and requiredMinecraftVersion, used for DRIED_GHAST (1.21.6) in The Nether phase. Co-Authored-By: Claude Fable 5 <noreply@anthropic.com> Claude-Session: https://claude.ai/code/session_01VahJUVuDRo5kRSDZKJHHjC
Turns the phase index into a first-class in-memory model to prepare for admin phase reordering: - New PhaseIndexEntry holds file, section, name, length, enabled, and requiredMinecraftVersion. OneBlocksManager keeps the live list (including disabled/version-skipped entries) plus gotoAtEnd, and exposes getPhaseIndex()/saveIndex() so tools can reorder entries, save, and reload. Start blocks are recomputed from the new order's lengths on reload. - Loaded phases keep a reference to their index entry. Saving a phase now writes back to its stable file name and section key instead of deriving them from the computed start block, so /oba setchest keeps working after phases move. - saveOneBlockConfig writes the index too and no longer writes a file for the synthetic end-goto phase, which gotoAtEnd covers. Co-Authored-By: Claude Fable 5 <noreply@anthropic.com> Claude-Session: https://claude.ai/code/session_01VahJUVuDRo5kRSDZKJHHjC
New admin panel (permission aoneblock.admin.phases) showing every phase index entry in order with its computed start block, length, and state. Click a phase to pick it up - the rest shrink left to fill the gap. Click a phase to shove it and everything after it right and drop the held phase there, or use the drop-at-end slot. Clicking anywhere else or closing the panel puts the phase back without saving. Right-click toggles a phase on or off. Drops and toggles save the phase index and reload the phases, so the new order takes effect immediately. Disabled phases show as gray glass and version-locked phases as barriers; both can still be reordered. Co-Authored-By: Claude Fable 5 <noreply@anthropic.com> Claude-Session: https://claude.ai/code/session_01VahJUVuDRo5kRSDZKJHHjC
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
What this does
Three features building on each other, in three commits:
1. Sulfur Caves phase + version gating (
5a987cf)phases_index.yml: read before any phase file, listing every phase withfile,section,name,length, optionalenabledandrequiredMinecraftVersion. Start blocks are the running sum of lengths, so a skipped phase collapses out of the progression.requiredMinecraftVersion: '26.2'are skipped with one info log on older servers without their files ever being parsed — this matters becauseYamlConfigurationeagerly deserializes ItemStacks during parsing, which threw stack traces for unknown items on older servers.pink_harnesson 1.21.5) are skipped with a log line instead of a stack trace.weight+requiredMinecraftVersion, used forDRIED_GHAST(1.21.6) in The Nether.2. Length-based phase model (
4f7a319)PhaseIndexEntryclass;OneBlocksManagerkeeps the live index (including disabled/version-skipped entries) plusgotoAtEnd, exposinggetPhaseIndex()/saveIndex()so tools can reorder entries, save, and reload./oba setchest) writes back to its stable file name and section key instead of deriving them from the computed start block.3. Phase order GUI (
a9b71ad)/oba phasesadmin command (permissionaoneblock.admin.phases) opens a panel showing every phase in order with computed start, length, and state.Testing
🤖 Generated with Claude Code
https://claude.ai/code/session_01VahJUVuDRo5kRSDZKJHHjC