PaperMC / PaperMC/Paper

Optimize-Hoppers.patch causes inconsistent behavior when hoppers collect Drops

Open
#13,018 0 comments 0 reactions 0 assignees View on GitHub

Nobody has claimed this yet.

status: needs triage
Dominant language
Java
Stars
12.7k
Forks
3.5k
Avg merge
3d 13h
Merged PRs (30d)
11

Description

Expected behavior

Hoppers should always check for and collect drops once per tick.

Observed/Actual behavior

If a hopper fails to inject items into its target container, it will no longer check for and collect drops every tick.

Steps/models to reproduce
  1. Place some simple blocks.
Image Image Image
  1. Then drop any items at the water source, and you’ll notice that the hopper frequently fails to pick them up.

https://github.com/user-attachments/assets/fc6f2e1a-2f23-4fe4-af72-a613596cd2ba

Plugin and Datapack List

null

Paper version

paper1.21.8#49

Other

The configuration file is freshly generated and has not been modified.
Testing shows the issue is related to the hopper-cooldown-when-full option; setting it to false restores normal behavior.
This issue usually breaks dual-speed hopper sorting systems.

When a hopper fails to inject items into its target container, it should perhaps avoid entering a cooldown that skips the per-tick check for collecting drops. In the current situation, neither the chest nor the hopper itself is full.
When I tested the Lithium mod, no similar issue occurred.
Perhaps in the future we should find a way to preserve the hopper optimizations in Optimize-Hoppers.patch while reducing its behavioral intrusiveness so it behaves more like vanilla—just as Lithium does for hoppers—but this will probably be a slog that demands considerable time for testing.

Contributor guide

Open the contributing guide

First steps

  1. Read the whole issue, then the project's contributing guide.
  2. Comment on the issue to say you are picking it up — it saves two people doing the same work.
  3. Fork the repository and make your change on a branch.
  4. Open a pull request that references the issue number.

Research direction

Start by inspecting Optimize-Hoppers.patch and reproduce the behavior with hopper-cooldown-when-full enabled, then compare it with the option disabled. Verify that a hopper checks for and collects drops once per tick even when injection into its target container fails, without regressing the optimization.

Written by the indexing model from the issue text.

Assessment

Tech stack
java
Domain
game-dev, performance
Issue type
Bug
Difficulty
4/5
Estimated time
3-5 days
Activity status
Stale
Clarity
Mostly clear
Newbie friendliness
35/100

Get new issues in your inbox

A short digest of beginner-friendly GitHub issues.