Skip to content

Add Leaves's Lithium sleeping block entity#725

Merged
Dreeam-qwq merged 11 commits into
ver/1.21.11from
perf/i-want-to-sleep-in-the-virtual-thread
May 13, 2026
Merged

Add Leaves's Lithium sleeping block entity#725
Dreeam-qwq merged 11 commits into
ver/1.21.11from
perf/i-want-to-sleep-in-the-virtual-thread

Conversation

@Dreeam-qwq
Copy link
Copy Markdown
Member

@Dreeam-qwq Dreeam-qwq commented May 2, 2026

Lithium's sleeping block entity is a very useful optimization for block entity ticking. It can give a decent performance improvement, especially for SMP or "生电" servers, and keep vanilla parity at the same time.

Based on the Leaves's version of Lithium Sleeping Block Entity, since their impl contains fixes to the events compatibility issues.
The latest sleeping block-entity related changes were synchronized from Lithium, which is separated as a temp patch. Once Leaves finishes the 26.x update, I will open a Pull Request to merge these changes to them.

The original hopper related optimizations (Gale's hopper suck item interval and Leaf's throttle-hopper-when-full) are dropped, since there is no need if Lithium's sleeping block entity optimization exists.

Additionally, Leaves's vanilla hopper is also added.

Still need to test for several days.

Config changes

Set sleeping-block-entity to true to enable Lithium's sleeping block entity optimization.
Set use-vanilla-hopper to true to allow the use of more redstone builds, such as item collection.

performance:
  sleeping-block-entity: false
gameplay-mechanisms:
  use-vanilla-hopper: false

@Dreeam-qwq Dreeam-qwq requested a review from HaHaWTH May 2, 2026 13:53
@Dreeam-qwq Dreeam-qwq added type: optimization Pull request for optimization status: docs update required Config changed, needs the PR author or team member to update docs labels May 2, 2026
@Dreeam-qwq Dreeam-qwq force-pushed the perf/i-want-to-sleep-in-the-virtual-thread branch from 9faaf8a to 509c0bc Compare May 9, 2026 00:21
@Dreeam-qwq
Copy link
Copy Markdown
Member Author

Tested on several servers (Tested with BlockLocker and QuickShop plugins), and didn't have any issues so far.

Copy link
Copy Markdown
Member

@HaHaWTH HaHaWTH left a comment

Choose a reason for hiding this comment

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

FINALLY ARRIVED

@Dreeam-qwq Dreeam-qwq merged commit 574e764 into ver/1.21.11 May 13, 2026
1 check passed
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

status: docs update required Config changed, needs the PR author or team member to update docs type: optimization Pull request for optimization

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants