[GH-ISSUE #5194] Native mods: move a block's fluids to another block, refused fluid returned to the source #1586

Closed
opened 2026-11-02 15:48:11 +07:00 by bsakaguchi · 1 comment
Owner

Originally created by @Qwerner88880 on GitHub (Oct 31, 2026).
Original GitHub issue: https://github.com/horizon-rust/horizon/issues/5194

Originally assigned to: @Qwerner88880 on GitHub.

🤖 Filed by Qwerner88880's AI agent (ZCode, GLM-5.3), not by Qwerner88880 personally.

Part of #4953's capabilities (the fluid handler's move, after #5134's fill/drain) and #3911 (Mods).

The fluid handler (#5134, #5188) reads, fills and drains a block's tanks — but moving fluid between two blocks is left to the mod: drain into its own hands, insert, and if the target refuses, put the rest back itself. With a cauldron in the chain that's easy to get wrong: a drain gives whole thirds of a bucket (asking 400 gives 666), so a careless drain-then-refused-insert loses a third.

What I plan, one helper with no new hook points, native_move_items's shape:

  • native_move_fluids(dimension, from, from_face, to, to_face, max): moves up to max millibuckets between two blocks, one fluid (whatever the source's side gives first). What the target won't take goes back into the source, past the fill sides' leave — the source just gave the fluid up, so it has the room; a cauldron levels back up by the thirds it gave. The fluid and how much moved; none where native_fluid_tanks is none at the source, where nothing drainable is, where the target holds no fluids, and within one block.
Originally created by @Qwerner88880 on GitHub (Oct 31, 2026). Original GitHub issue: https://github.com/horizon-rust/horizon/issues/5194 Originally assigned to: @Qwerner88880 on GitHub. > 🤖 Filed by Qwerner88880's AI agent (ZCode, GLM-5.3), not by Qwerner88880 personally. Part of #4953's capabilities (the fluid handler's move, after #5134's fill/drain) and #3911 (Mods). The fluid handler (#5134, #5188) reads, fills and drains a block's tanks — but moving fluid between two blocks is left to the mod: drain into its own hands, insert, and if the target refuses, put the rest back itself. With a cauldron in the chain that's easy to get wrong: a drain gives whole thirds of a bucket (asking 400 gives 666), so a careless drain-then-refused-insert loses a third. What I plan, one helper with no new hook points, `native_move_items`'s shape: - **`native_move_fluids(dimension, from, from_face, to, to_face, max)`:** moves up to `max` millibuckets between two blocks, one fluid (whatever the source's side gives first). What the target won't take goes **back into the source, past the fill sides' leave** — the source just gave the fluid up, so it has the room; a cauldron levels back up by the thirds it gave. The fluid and how much moved; none where `native_fluid_tanks` is none at the source, where nothing drainable is, where the target holds no fluids, and within one block.
Author
Owner

@Qwerner88880 commented on GitHub (Oct 31, 2026):

🤖 Agent: /claim

<!-- gh-comment-id:6544954752 --> @Qwerner88880 commented on GitHub (Oct 31, 2026): 🤖 Agent: /claim
Sign in to join this conversation.
No milestone
No project
No assignees
1 participant
Notifications
Due date
The due date is invalid or out of range. Please use the format "yyyy-mm-dd".

No due date set.

Dependencies

No dependencies set.

Reference
horizon-rust/horizon#1586
No description provided.