Repository navigation
Add AOneBlock phase requirement for generators (#121) - #162
Merged
Merged
Conversation
Generators can now require an AOneBlock phase to be reached before they unlock, enabling OneBlock progression-gated generators. - Adds aoneblock as a provided-scope dependency (mirrors level/bank). - GeneratorTierObject.requiredPhase (String, @expose, cloned, empty by default; null-normalised). - checkGeneratorUnlockStatus only unlocks a phase-gated generator once the island's block count has reached the required phase's starting block, via AOneBlock's getOneBlockManager().getPhase(name) and getOneBlocksIsland(island).getBlockNumber(). Non-AOneBlock worlds never satisfy a phase requirement. - Requirements lore shows a "Required Phase" line ([phase]) with new en-US locale strings. Configurable via generator export/import for now; an admin GUI editor can follow (the edit panel is currently full). Co-Authored-By: Claude Opus 4.8 (1M context) <noreply@anthropic.com> Claude-Session: https://claude.ai/code/session_01D7NWPeGXmsUJnnX42X24Rd
|
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.



Closes #121
Feature
Generators can now require an AOneBlock phase to be reached before they unlock, so OneBlock servers can gate generators behind progression (the ask in #121). This is the phase-only subset of #117.
Change
world.bentobox:aoneblockas aprovided-scope dependency, mirroring how Level/Bank are integrated.GeneratorTierObject.requiredPhase(String,@Expose, cloned, empty by default, null-normalised).checkGeneratorUnlockStatusgains a phase filter. A phase-gated generator unlocks once the island's block count has reached the required phase's starting block:Required Phaseline ([phase]), with new en-US locale strings. Phase-name matching is case/space-insensitive (AOneBlock'sgetPhase).Tests
GeneratorTierObjectTest:requiredPhasedefault/set/get/null-normalise/clone.StoneGeneratorManagerTest(mocking AOneBlock): unlocks when the phase is reached; stays locked when not reached; stays locked in a non-AOneBlock world.Full suite: 113 tests pass.
Scope note
requiredPhaseis configurable via generator export/import JSON for now. An admin GUI editor is a sensible follow-up — the generator edit panel is currently at capacity (all inner slots used after #88/#106), so adding a button needs a small layout change I kept out of this PR.🤖 Generated with Claude Code