feat: improve Survival Games chests, protection, spawns, and sidebar #8

Merged
crypt merged 1 commit from codex/sg-improvements into main 2026-10-03 18:25:34 +00:00
Owner

Summary

A broad Survival Games fidelity pass — chest tiers, loot balance, mid-game refills, protection/baseline, pedestrian spawn setup, and a cleaner sidebar/theme. Researched against classic MCGamer/MCSG conventions.

Chests

  • Tier detection by block type: trapped chest = tier 2, ender chest = tier 3 (the community convention used by SG plugins), resolved on a lazy chunk-load scan and converted to normal chests so tiers look identical. New chests.yml keys tier2Block/tier3Block (NONE disables).
  • Weight semantics: loot selection documented as weighted random (probability = weight ÷ tier total); chance kept as a legacy alias. New fillChance controls per-slot density (was a hardcoded 0.18).
  • Loot rebalance: removed raw meat/fish and cobblestone from tier 1; cut arrow frequency and stack sizes; kept apples/bread/melon.
  • Mid-game refills: gameRules.refillSeconds (default [180, 780] ≈ 3:00/13:00) re-rolls opened chests.

Protection & world baseline

  • worldProtections.mobSpawnAllowlist (default [CHICKEN]); hostile natural spawns stay blocked, allowlisted passives spawn even during grace.
  • Fixed cake placement (BlockPlaceEvent reports CAKE_BLOCK, not CAKE; config now normalises the alias) and tall-grass breaking (added DOUBLE_PLANT).
  • WorldBaseline normalises the game world on load: fixed daylight, clear weather, no mob griefing (leaves doMobSpawning on so chickens still spawn).

Spawn pedestals

PedestalResolver resolves cornucopia spawns in order: explicit cornucopiaSpawns, else marker-block detection via pedestalBlock, else a generated ring of pedestalCount (default 24) at pedestalRadius — no more hand-listing 24 coordinates unless a map needs it. Results sorted by angle.

Sidebar & theme

  • Redesigned the sidebar: green header, separator, labelled stats (Map/Alive/Stage/Kills/Coins/Time).
  • Standardised the green Willowcrest accent (§a) across chat phase/win/supply-drop announcements, welcome/end messages, and help.

Chart & docs

  • Default game.yml/chests.yml updated (refill, mob allowlist, cake/DOUBLE_PLANT, weighted loot, no raw food/cobblestone, tier-block settings).
  • chart/README.md and the design spec updated.

Verification

  • ./gradlew build (all plugin modules, Spotless): green. New tests for tier detection/conversion, refill, fillChance, weight parsing, allowlist, refill config, and pedestal resolution.
  • make lint-chart + make test-chart: green; rendered game.yml/chests.yml verified.
  • make kind-test: PASS.

Notes / follow-ups

  • The hub's /fly + /invis still use the synchronous DB fallback (unchanged).
  • Maps relying on generated pedestals should confirm the ring radius; marker-block detection requires the map maker to use the configured pedestalBlock.
## Summary A broad Survival Games fidelity pass — chest tiers, loot balance, mid-game refills, protection/baseline, pedestrian spawn setup, and a cleaner sidebar/theme. Researched against classic MCGamer/MCSG conventions. ## Chests - **Tier detection by block type**: trapped chest = tier 2, ender chest = tier 3 (the community convention used by SG plugins), resolved on a lazy chunk-load scan and **converted to normal chests** so tiers look identical. New `chests.yml` keys `tier2Block`/`tier3Block` (`NONE` disables). - **Weight semantics**: loot selection documented as weighted random (probability = weight ÷ tier total); `chance` kept as a legacy alias. New `fillChance` controls per-slot density (was a hardcoded 0.18). - **Loot rebalance**: removed raw meat/fish and cobblestone from tier 1; cut arrow frequency and stack sizes; kept apples/bread/melon. - **Mid-game refills**: `gameRules.refillSeconds` (default `[180, 780]` ≈ 3:00/13:00) re-rolls opened chests. ## Protection & world baseline - `worldProtections.mobSpawnAllowlist` (default `[CHICKEN]`); hostile natural spawns stay blocked, allowlisted passives spawn even during grace. - Fixed **cake placement** (`BlockPlaceEvent` reports `CAKE_BLOCK`, not `CAKE`; config now normalises the alias) and **tall-grass breaking** (added `DOUBLE_PLANT`). - `WorldBaseline` normalises the game world on load: fixed daylight, clear weather, no mob griefing (leaves `doMobSpawning` on so chickens still spawn). ## Spawn pedestals `PedestalResolver` resolves cornucopia spawns in order: explicit `cornucopiaSpawns`, else marker-block **detection** via `pedestalBlock`, else a **generated ring** of `pedestalCount` (default 24) at `pedestalRadius` — no more hand-listing 24 coordinates unless a map needs it. Results sorted by angle. ## Sidebar & theme - Redesigned the sidebar: green header, separator, labelled stats (Map/Alive/Stage/Kills/Coins/Time). - Standardised the green Willowcrest accent (`§a`) across chat phase/win/supply-drop announcements, welcome/end messages, and help. ## Chart & docs - Default `game.yml`/`chests.yml` updated (refill, mob allowlist, cake/DOUBLE_PLANT, weighted loot, no raw food/cobblestone, tier-block settings). - `chart/README.md` and the design spec updated. ## Verification - `./gradlew build` (all plugin modules, Spotless): green. New tests for tier detection/conversion, refill, fillChance, weight parsing, allowlist, refill config, and pedestal resolution. - `make lint-chart` + `make test-chart`: green; rendered `game.yml`/`chests.yml` verified. - `make kind-test`: PASS. ## Notes / follow-ups - The hub's `/fly` + `/invis` still use the synchronous DB fallback (unchanged). - Maps relying on generated pedestals should confirm the ring radius; marker-block detection requires the map maker to use the configured `pedestalBlock`.
feat: improve Survival Games chests, protection, spawns, and sidebar
All checks were successful
/ detect (pull_request) Successful in 3s
/ commit-check (pull_request) Successful in 3s
/ controller (pull_request) Has been skipped
/ chart (pull_request) Successful in 5s
/ plugin (pull_request) Successful in 1m25s
aba3f5e8ff
Chests:
- Resolve tiers by block type: trapped chest = tier 2, ender chest = tier 3
  (community MCSG convention), converting markers to normal chests on a
  lazy chunk-load scan so tiers look identical.
- Add configurable fillChance; switch loot selection to documented weight
  semantics (probability = weight / tier total).
- Remove raw food and cobblestone from tier 1; cut arrow frequency/amounts.
- Add mid-game chest refills (gameRules.refillSeconds, default 3:00/13:00).

Protection / world baseline:
- Add worldProtections.mobSpawnAllowlist (default [CHICKEN]); hostiles stay
  blocked. Fix cake placement (CAKE_BLOCK) and tall-grass breaking
  (DOUBLE_PLANT).
- Normalise the game world on load (fixed daylight, clear weather, no mob
  griefing).

Spawns:
- PedestalResolver: explicit cornucopiaSpawns, else marker-block detection,
  else a generated 24-pedestal ring (map.yml pedestalBlock/Radius/Count).

Sidebar / theme:
- Redesign the sidebar (green header, separator, labelled stats) and
  standardise the green Willowcrest accent across chat/help/win messages.

Updates the chart default game.yml/chests.yml and docs accordingly.
crypt merged commit bc9f269954 into main 2026-10-03 18:25:34 +00:00
crypt deleted branch codex/sg-improvements 2026-10-03 18:25:34 +00:00
Sign in to join this conversation.
No reviewers
No labels
No milestone
No project
No assignees
1 participant
Notifications
Due date
The due date is invalid or out of range. Please use the format "yyyy-mm-dd".

No due date set.

Dependencies

No dependencies set

Reference
crypt/k8s-mcsg-uhc!8
No description provided.