Repository navigation
Fix obsidian scoop lava/obsidian dupe by re-validating before giving lava - #3098
Merged
Merged
Conversation
The lava bucket is handed out one tick after the interact event, but that deferred step re-checked nothing. Mining the obsidian inside that tick gave the player both the obsidian and the lava, and moving the bucket out of the hand let the lava be given without using a bucket. givePlayerLava now confirms the player is online, the block is still obsidian and the hand still holds an empty bucket, reading the bucket fresh from the hand slot. The scooping message and sound move into it so they only play when lava is actually given. Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
|
Merged
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.



Problem
An admin reported a lava dupe on BSkyBlock (3.22.3).
ObsidianScoopingListenerchecks the obsidian and the bucket on the right-click, then hands out the lava one tick later ingivePlayerLava. That delayed step re-checked nothing:ItemStackcaptured from the event. If the bucket had been moved out of the hand in the meantime, lava could be given without using up a bucket.The listener is unchanged between 3.22.3 and
develop.Fix
givePlayerLavanow re-checks before doing anything, and does nothing if any check fails:The "scooping" message and the lava sound moved into
givePlayerLava, so they only play when lava is actually given. The 1-minute cooldown is still applied at click time, so a cancelled attempt still costs the cooldown.Testing
worldsettingslistener tests pass; I didn't run the full suite.🤖 Generated with Claude Code