Skip to content

feat: add difficulty setting, shared inventory fixes, completed run config#8

Merged
Niravanaa merged 1 commit into
mainfrom
feature/3-difficulty-setting
May 11, 2026
Merged

feat: add difficulty setting, shared inventory fixes, completed run config#8
Niravanaa merged 1 commit into
mainfrom
feature/3-difficulty-setting

Conversation

@Niravanaa
Copy link
Copy Markdown
Member

Proposed Changes:

Adds difficulty selection, persistent run save/restore, shared inventory reliability fixes, completed run mechanics display, configurable database naming, and game mode enforcement for lobby and training worlds. Also addresses pre-commit Javadoc violations across several service files.

Details:

  • Added Easy / Normal / Hard difficulty selector to the prep GUI; difficulty is applied to the active Minecraft world and recorded with each completed run
  • Added persistent save/restore flow: participants vote unanimously with /challenge saverun, snapshotting full player state (position, inventory, health, XP, potion effects) to disk; admins restore with /challenge restore; run timer correctly excludes lobby time between save and restore
  • Fixed shared inventory sync timing: inventory click, drag, and several item-interaction events (buckets, boats, block place) now defer the sync by one tick so Bukkit completes the mutation before state is broadcast to other participants
  • Fixed un-equipping armor not appearing in other players' inventories due to incorrect per-target armor subtraction; fixed two-set armor disappearance caused by sync firing before wearable detect
  • Fixed cursor-held item vanishing when another player edits the shared inventory
  • Fixed right-click drag not immediately updating other players' inventories
  • Added enabled mechanics list to each completed run entry in the run history screen
  • Added configurable database filename (records.db-name in config) for safe dev/test separation from production run history
  • Lobby and training worlds now enforce Adventure game mode on entry; bridge training challenge overrides to Survival; game mode is restored on lobby re-entry
  • Natural regen block (HEALTH_REFILL off) now only cancels saturation-based regen; Regeneration status effect from potions and beacons remains active
  • Half-heart max health is now restored when a player enters a lobby world via world change, not only on join
  • Resolved all Javadoc / Checkstyle violations (15 errors across 5 files, plus missing package-info.java)

Related Issues:

@Niravanaa Niravanaa self-assigned this May 11, 2026
@Niravanaa Niravanaa added the enhancement New feature or request label May 11, 2026
@Niravanaa Niravanaa force-pushed the feature/3-difficulty-setting branch 2 times, most recently from 9fb3480 to 95fdd1a Compare May 11, 2026 02:54
@Niravanaa Niravanaa force-pushed the feature/3-difficulty-setting branch from 95fdd1a to 1dd424c Compare May 11, 2026 03:29
@Niravanaa Niravanaa merged commit 0d06d73 into main May 11, 2026
2 checks passed
@codecov-commenter
Copy link
Copy Markdown

Codecov Report

❌ Patch coverage is 64.50331% with 268 lines in your changes missing coverage. Please review.

Files with missing lines Patch % Lines
...ev/deepcore/challenge/ChallengeSessionManager.java 3.92% 98 Missing ⚠️
...hallenge/inventory/SharedInventorySyncService.java 42.66% 39 Missing and 4 partials ⚠️
...epcore/challenge/session/SavedRunStateService.java 85.50% 18 Missing and 11 partials ⚠️
...nventory/InventoryMechanicsCoordinatorService.java 58.06% 18 Missing and 8 partials ⚠️
...ava/dev/deepcore/challenge/ui/PrepGuiRenderer.java 68.00% 10 Missing and 6 partials ⚠️
...deepcore/challenge/session/PrepGuiFlowService.java 30.76% 5 Missing and 4 partials ⚠️
...allenge/session/SessionPlayerLifecycleService.java 76.47% 3 Missing and 5 partials ⚠️
...v/deepcore/challenge/training/TrainingManager.java 33.33% 7 Missing and 1 partial ⚠️
...e/challenge/session/PrepGuiCoordinatorService.java 45.45% 5 Missing and 1 partial ⚠️
...va/dev/deepcore/challenge/ChallengeDifficulty.java 75.00% 3 Missing and 1 partial ⚠️
... and 11 more
Files with missing lines Coverage Δ Complexity Δ
.../java/dev/deepcore/challenge/ChallengeRuntime.java 100.00% <ø> (ø) 6.00 <0.00> (ø)
...eepcore/challenge/ChallengeRuntimeInitializer.java 100.00% <100.00%> (ø) 6.00 <0.00> (ø)
...v/deepcore/challenge/command/ChallengeCommand.java 84.61% <ø> (ø) 5.00 <0.00> (?)
...challenge/command/ChallengeCoreCommandHandler.java 85.65% <100.00%> (ø) 69.00 <0.00> (?)
...challenge/command/ChallengeLogsCommandHandler.java 84.54% <ø> (ø) 33.00 <0.00> (?)
...a/dev/deepcore/challenge/command/LobbyCommand.java 100.00% <ø> (ø) 4.00 <0.00> (?)
...epcore/challenge/session/RunCompletionService.java 80.32% <100.00%> (+2.14%) 13.00 <3.00> (ø)
...challenge/session/RunHealthCoordinatorService.java 88.28% <100.00%> (+1.01%) 35.00 <0.00> (+2.00)
...deepcore/challenge/session/RunProgressService.java 90.59% <100.00%> (+10.79%) 43.00 <5.00> (+7.00)
...pcore/challenge/session/SessionFailureService.java 73.91% <100.00%> (+1.18%) 9.00 <0.00> (+1.00)
... and 26 more
🚀 New features to boost your workflow:
  • ❄️ Test Analytics: Detect flaky tests, report on failures, and find test suite problems.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

enhancement New feature or request

Projects

None yet

2 participants