Skip to content

Fix delayed block breaking sync with renderer/server #442#487

Closed
ModMaker101 wants to merge 2 commits intosmartcmd:mainfrom
ModMaker101:fix/block-breaking-sync-renderer-442
Closed

Fix delayed block breaking sync with renderer/server #442#487
ModMaker101 wants to merge 2 commits intosmartcmd:mainfrom
ModMaker101:fix/block-breaking-sync-renderer-442

Conversation

@ModMaker101
Copy link
Contributor

Description

Fixes delayed block breaking by syncing renderer state, reducing redundant destroy progress updates, and modernizing parts of MultiPlayerGameMode.

Changes

Previous Behavior

  • Block breaking appeared delayed
  • Renderer wasn't notified early enough
  • destroyTileProgress was spammed every tick.
  • removeTile caused client desync.
  • C-style casts, NULL, and raw shared_ptr were used.

Root Cause

Renderer and client destroy states weren't synced properly, and legacy LCE code spammed progress updates and removed tiles inconsistently.

New Behavior

  • Renderer is notified immediately via destroyingTileAt.
  • Destroy progress only sent when changed.
  • setTileAndData used for consistent updates.
  • C++ modernization across file.

Fix Implementation

  • Added lastSentDestroyState caching.
  • Added destroyingTileAt before client destruction.
  • Replaced C‑style casts -> static_cast.
  • Replaced NULL -> nullptr.
  • Replaced shared_ptr<T> -> std::make_shared<T>.

Related Issues

@codeHusky
Copy link
Collaborator

Does not fix it, this issue still occurs with your changes

2026-03-04.16-22-31.mp4

@ModMaker101
Copy link
Contributor Author

Yeah, that's my bad I miss read the issue I fixed something else 😅 I'll push a commit to fix that though

@ModMaker101
Copy link
Contributor Author

@codeHusky It was working on my machine after my last commit, so if you could test it yourself that would be great.

@MarvelcoOGFN
Copy link
Contributor

@codeHusky It was working on my machine after my last commit, so if you could test it yourself that would be great.

#537

check my pr it was a very very simple fix, you just needed to delete one line lol, i am not sure why it was made to return early in the first place

@void2012 void2012 closed this Mar 5, 2026
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.

Block placement/breaking is delayed

4 participants