Skip to content

Add lava tip hologram when scoopable obsidian forms#2915

Merged
tastybento merged 3 commits into
developfrom
copilot/add-hologram-notification-for-obsidian
Apr 6, 2026
Merged

Add lava tip hologram when scoopable obsidian forms#2915
tastybento merged 3 commits into
developfrom
copilot/add-hologram-notification-for-obsidian

Conversation

Copy link
Copy Markdown
Contributor

Copilot AI commented Apr 6, 2026

New players often don't realize obsidian can be scooped back into lava with a bucket. This adds a temporary TextDisplay hologram above newly formed obsidian when it's solitary and scoopable.

Changes

  • ObsidianScoopingListener — New BlockFormEvent handler that:

    • Fires when obsidian forms from lava/water interaction
    • Checks the block is solitary (reuses existing radius check) and OBSIDIAN_SCOOPING is enabled
    • Spawns a TextDisplay hologram at the best available adjacent air/liquid block (prefers above → sides → below)
    • Auto-removes the hologram after the configured duration via runTaskLater
  • Settings — New obsidian-scooping-lava-tip-duration config entry (default 30s; ≤0 disables)

  • en-US.yml — New lavaTip key under OBSIDIAN_SCOOPING:

    lavaTip: '<green>Scoop this up as lava with a bucket if you need it!</green>'
  • Tests — 8 new test cases covering: non-obsidian events, out-of-world, flag disabled, duration disabled, nearby obsidian, successful spawn with scheduler verification, empty locale text, and hologram placement logic.

Copilot AI and others added 2 commits April 6, 2026 01:47
When obsidian forms from lava/water interaction and is solitary (could be
scooped), a TextDisplay hologram is shown above the block for a configurable
duration. The hologram uses MiniMessage locale text from the OBSIDIAN_SCOOPING
section.

- Add obsidian-scooping-lava-tip-duration setting (default 30s, 0 disables)
- Add lavaTip locale entry in en-US.yml
- Add BlockFormEvent handler in ObsidianScoopingListener
- Add hologram placement logic (above, sides, below preference)
- Schedule hologram removal after configured duration
- Add comprehensive tests for new functionality

Agent-Logs-Url: https://github.com/BentoBoxWorld/BentoBox/sessions/9e56595b-e55a-4b06-a281-117940895a89

Co-authored-by: tastybento <4407265+tastybento@users.noreply.github.com>
Address code review feedback to avoid calling BentoBox.getInstance()
multiple times within handleObsidianForm method.

Agent-Logs-Url: https://github.com/BentoBoxWorld/BentoBox/sessions/9e56595b-e55a-4b06-a281-117940895a89

Co-authored-by: tastybento <4407265+tastybento@users.noreply.github.com>
Copilot AI changed the title [WIP] Add hologram notification for obsidian recovery Add lava tip hologram when scoopable obsidian forms Apr 6, 2026
Copilot AI requested a review from tastybento April 6, 2026 01:52
@tastybento tastybento marked this pull request as ready for review April 6, 2026 04:02
@sonarqubecloud
Copy link
Copy Markdown

sonarqubecloud Bot commented Apr 6, 2026

@tastybento tastybento merged commit ac334e0 into develop Apr 6, 2026
3 checks passed
@tastybento tastybento deleted the copilot/add-hologram-notification-for-obsidian branch April 19, 2026 12:49
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

Info about possibility to recover lava from obsidian

2 participants