Skip to content

fix: guard fast easy place ticks against invalid entity/block lookups#23

Merged
ForestOfLight merged 1 commit intoForestOfLight:mainfrom
saschabuehrle:fix-issue-18
Apr 22, 2026
Merged

fix: guard fast easy place ticks against invalid entity/block lookups#23
ForestOfLight merged 1 commit intoForestOfLight:mainfrom
saschabuehrle:fix-issue-18

Conversation

@saschabuehrle
Copy link
Copy Markdown
Contributor

Fixes #18

This hardens the fast easy place tick path in two spots:

  • Return early when dimension.getBlock() returns no block.
  • Wrap mainhand equipment lookup in isHoldingActionItem() with a safe fallback to prevent InvalidEntityError from bubbling and spamming logs.

The placement behavior remains unchanged for valid entities/targets, but noisy backend errors are suppressed for transient invalid states.

Greetings, saschabuehrle

@codacy-production
Copy link
Copy Markdown

Up to standards ✅

🟢 Issues 0 issues

Results:
0 new issues

View in Codacy

🟢 Metrics 4 complexity · 0 duplication

Metric Results
Complexity 4
Duplication 0

View in Codacy

TIP This summary will be updated as you push new changes. Give us feedback

@ForestOfLight
Copy link
Copy Markdown
Owner

Looking good, thank you!

@ForestOfLight ForestOfLight merged commit 590915c into ForestOfLight:main Apr 22, 2026
1 check passed
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.

When the crosshair is aimed at flowing water or air blocks, the game backend reports errors like crazy, but it does not affect the use of the mod.

2 participants