Skip to content

Fix hose pulley deleting fluid blocks when extracting FluidStack.EMPTY#10055

Open
Apertyotis wants to merge 1 commit intoCreators-of-Create:mc1.21.1/devfrom
Apertyotis:fix/hose-pulley-deleting-fluid
Open

Fix hose pulley deleting fluid blocks when extracting FluidStack.EMPTY#10055
Apertyotis wants to merge 1 commit intoCreators-of-Create:mc1.21.1/devfrom
Apertyotis:fix/hose-pulley-deleting-fluid

Conversation

@Apertyotis
Copy link
Copy Markdown
Contributor

Description

When a pump connected to a hose pulley tries to extract fluid while its target is already full, hose pulley will delete the fluid block.
2026-03-14_00 40 34

Cause

The issue is caused by an inconsistent handling of FluidStack.EMPTY.

  1. Hose pulley extraction logic

In HosePulleyFluidHandler::drainInternal:

The hose pulley removes the fluid block (line 75) and attempts to place the remainder into its internal tank (line 94).
However, the check at line 87 compares the requested fluid (EMPTY) with the actual fluid (Water) and aborts early.

As a result, the fluid block has already been removed but no fluid is stored.

QQ20260314-004131
  1. Pump requesting FluidStack.EMPTY

Looking at FluidNetwork::tick:

During the previous simulation step, the pump already determined it needs to extract 0 mB of fluid.

Later, line 201 confirms the hose pulley can provide water. The pump then requests 0 mB of water, which effectively becomes FluidStack.EMPTY.
4c0f0500-4471-414e-ab12-02d4f190eb9c

Fix

Either side fixing the issue would work, but this PR applies both fixes:

  • Prevent pumps from requesting 0 mB fluid, since extracting zero fluid has no meaningful effect.
  • Make the hose pulley ignore FluidStack.EMPTY extraction requests, as other mods' pumps might still request empty stacks.

@VoidLeech VoidLeech added pr type: fix PR fixes a bug pr flag: simple PR has minimal changes labels Mar 13, 2026
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

pr flag: simple PR has minimal changes pr type: fix PR fixes a bug

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants