Skip to content

Retire nether terraforming: split NetherTerraFormEvents, keep fortress + ghast-neuter, ship terraform-enabled: false #152

Description

@minoneer

Summary: NetherTerraFormEvents bundles three unrelated nether mechanics in one listener. The block-break terraform regen is being retired for 4.0, but a naive delete of the whole listener would also orphan the ghast-fireball neuter and the nether-fortress mob replacement that the named 4.0 fortress mechanic and challenges netherfortress/witherhunter depend on. This issue splits the listener so the terraform code can be removed cleanly while the two kept mechanics survive.

Why this blocks 4.0

The 4.0 readiness survey retires nether terraforming (breaking nether blocks to spawn new blocks by probability) as a non-vanilla mechanic, but the same class also implements the fortress spawn mechanic the 4.0 challenge redesign treats as a real, preserved feature: the redesign draft states the nether fortress mechanic "enables blaze and wither skeleton spawning via plugin's custom nether brick detection" and challenges 5.6 netherfortress, 5.7 blazehunter, and 6.1 witherhunter are explicitly built on it. Because all three concerns live in NetherTerraFormEvents, the terraform removal cannot be done by deleting the listener — it must be a deliberate split. Config still ships terraform-enabled: true, so a fresh 4.0 install would enable a retired mechanic by default unless the default is also flipped.

Current state

On feature/immutable-challenge-catalog, uSkyBlock-Core/src/main/java/us/talabrek/ultimateskyblock/event/NetherTerraFormEvents.java holds all three concerns:

  • (a) Terraform regen — to be DELETED. The terraFormMap field (line 46), gated by terraformEnabled (line 53), and the onBlockBreak handler (line 81) that probabilistically spawns replacement blocks around mined nether blocks, plus its helpers (getYield, spawnBlock, findAirSpawnLocation, findSolidSpawnLocation, getLocationsInPlane, getToolWeight, cone-scan logic).
  • (b) Ghast-fireball neuter — to be KEPT. onGhastExplode(EntityExplodeEvent) (line 219) clears incendiary/fire on ghast fireballs in the skynether and cancels the explosion. Independent of terraformEnabled.
  • (c) Fortress mob replacement — to be KEPT. onCreatureSpawn(CreatureSpawnEvent) (line 235), gated by spawnEnabled, replaces natural PigZombie spawns on nether-brick walkways with wither skeleton / blaze / skeleton by spawn-chances probabilities. This is the spawning behavior the fortress challenges rely on.
  • Config still ships terraform-enabled: true at uSkyBlock-Core/src/main/resources/config.yml:467. The full terraform block (terraform-distance, pitch range, terraform: probabilities, terraform-weight:) and the separate spawn-chances: block both live in the nether: section.
  • The runtime config exposes RuntimeConfig.Terraform and RuntimeConfig.SpawnChances as distinct records (uSkyBlock-Core/src/main/java/us/talabrek/ultimateskyblock/config/runtime/RuntimeConfig.java:168 and :178); terraform and spawn-chance config are already separated at the config layer.
  • The listener is a single Guice singleton injected and registered once in uSkyBlock-Core/src/main/java/us/talabrek/ultimateskyblock/bootstrap/Listeners.java (field line 48, registration line 133).

Scope

  • Extract the ghast-neuter (onGhastExplode) and fortress spawn replacement (onCreatureSpawn, isNetherFortressWalkway, the spawnEnabled/chanceWither/chanceBlaze/chanceSkeleton fields, RND) into a kept listener (e.g. rename NetherTerraFormEvents to a fortress/nether-spawn listener, or move these two handlers into a new class). Note RND is currently shared with the deleted getYield, so it must survive for onCreatureSpawn.
  • Delete the terraform regen code: onBlockBreak, terraFormMap, the terraformEnabled/minPitch/maxPitch/maxScan/toolWeights fields, and the now-unused helpers (getYield, spawnBlock, findAirSpawnLocation, findSolidSpawnLocation, isAdjacentToSolid, isInIslandRegion, getLocationsInPlane, getToolWeight).
  • Remove the now-orphaned terraform config keys from config.yml (terraform-enabled, terraform-distance, terraform-min-pitch, terraform-max-pitch, terraform:, terraform-weight:) OR, if config is kept for back-compat, ship terraform-enabled: false and document the deprecation. Decide explicitly rather than leaving terraform-enabled: true.
  • Remove the RuntimeConfig.Terraform record and its wiring (runtimeConfigs.current().nether().terraform()) if the terraform config is dropped; keep RuntimeConfig.SpawnChances intact.
  • Update Listeners.java injection/registration to reference the kept listener.
  • Drop unused imports in the kept class (BlockBreakEvent, GameMode, Vector, ProtectedCuboidRegion, WorldGuardHandler, LocationUtil, MaterialUtil, etc.) so no dead imports remain.
  • Verify in-game (or via tests) that ghast fireballs no longer set fire and that nether-brick fortress spawning still replaces piglins with blaze/wither skeleton/skeleton.

References

  • Related: 4.0 gameplay changes: level progression, scoring, and challenges #128 (4.0 gameplay changes)
  • Design draft: docs/challenge-redesign/uskyblock-v2-challenge-redesign.md (currently untracked / do-not-commit) — "The nether fortress mechanic is real" (sec. header line 27), challenge 5.6 netherfortress (header line 455; the "enables blaze and wither skeleton spawning via plugin's custom nether brick detection" rationale is at line 460), 6.1 witherhunter (header line 490, requires netherfortress).
  • Key files (on feature/immutable-challenge-catalog): uSkyBlock-Core/src/main/java/us/talabrek/ultimateskyblock/event/NetherTerraFormEvents.java, uSkyBlock-Core/src/main/resources/config.yml (line 467), uSkyBlock-Core/src/main/java/us/talabrek/ultimateskyblock/config/runtime/RuntimeConfig.java (lines 168, 178), uSkyBlock-Core/src/main/java/us/talabrek/ultimateskyblock/bootstrap/Listeners.java (lines 48, 133).

Category: gameplay-world-code · Effort: small · Source: 4.0 readiness survey.

Metadata

Metadata

Assignees

No one assigned

    Labels

    4.0Targeted for the 4.0 release (challenge system rework)maintenanceMaintenance chores, e.g., migrate deprecated API's

    Type

    No type

    Projects

    No projects

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions