Skip to content

Conversation

@ClexaGod
Copy link
Contributor

This PR addresses two interaction bugs:

  • Ghost blocks / placement desync: Some clients don’t reliably send START_ITEM_USE_ON, so
    gating ITEM_USE_CLICK_BLOCK by isUsingItemOnBlock() skips server‑side placement. Fix:
    process ITEM_USE_CLICK_BLOCK directly.
  • Sneak + container while flying: Sneak state wasn’t updated when only explicit auth flags
    were sent. Fix: derive sneaking from explicit flags (SNEAKING, SNEAK_DOWN,
    SNEAK_TOGGLE_DOWN, PERSIST_SNEAK) and only fall back to START/STOP events if needed.

Tests

  • Mobile placement persists after respawn
  • Flying + shift doesn’t open containers, places blocks
  • Normal interaction still opens containers

@codecov
Copy link

codecov bot commented Dec 24, 2025

Codecov Report

❌ Patch coverage is 0% with 10 lines in your changes missing coverage. Please review.

Files with missing lines Patch % Lines
...or/ingame/InventoryTransactionPacketProcessor.java 0.00% 10 Missing ⚠️
Files with missing lines Coverage Δ Complexity Δ
...ocessor/ingame/PlayerAuthInputPacketProcessor.java 0.00% <ø> (ø) 0.00 <0.00> (ø)
...or/ingame/InventoryTransactionPacketProcessor.java 0.00% <0.00%> (ø) 0.00 <0.00> (ø)

... and 98 files with indirect coverage changes

🚀 New features to boost your workflow:
  • ❄️ Test Analytics: Detect flaky tests, report on failures, and find test suite problems.

// Using item on the block successfully, no need to call BlockBehavior::onInteract()
break;
}
if (itemInHand.useItemOnBlock(dimension, placeBlockPos, interactInfo)) {
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I don't like this solution very much, it's too hacky. I think I'll investigate this issue further

Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

There's a big problem with placing blocks on mobile devices. I sent you a video about it. This solution solves the problem for now.

@smartcmd
Copy link
Member

Would be great if you can move sneak state changes to another PR c:

@ClexaGod
Copy link
Contributor Author

@smartcmd done. Block deletion issue fixed in Bedrock mobile clients

@ClexaGod ClexaGod requested a review from smartcmd December 28, 2025 04:34
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.

2 participants