Skip to content

Avoid hoppers looking for items if there are no items#23

Closed
Techcable wants to merge 1 commit into
PaperMC:masterfrom
Techcable:idle-hoppers
Closed

Avoid hoppers looking for items if there are no items#23
Techcable wants to merge 1 commit into
PaperMC:masterfrom
Techcable:idle-hoppers

Conversation

@Techcable
Copy link
Copy Markdown
Contributor

Usually hoppers aren't near items so we can avoid this lookup.
Also avoid looking for minecarts if there are none, which there usually aren't

These two lookups are the biggest cause of hopper lag, and these should help significantly.

Big thanks to @CullanP for suggesting this and providing me the initial patch.
This patch is a very simple and very effective patch, that @CullanP claims has large improvements (even before avoiding the minecarts).

I've tested, formatted and double-checked this PR.

Usually hoppers aren't near items so we can avoid this lookup.
Also avoid looking for minecarts if there are none, which there usually aren't

These two lookups are the biggest cause of hopper lag, and these should help signifigantly.
zachbr pushed a commit that referenced this pull request Feb 14, 2016
@zachbr zachbr closed this Feb 14, 2016
LeonTG pushed a commit to LeonTG/Paper that referenced this pull request May 17, 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.

3 participants