Skip to content

Portable Tank GUI / pipe interactions #739

Description

@jshipley

Issue description

First / last bucket issue: When an item is being filled with the last fluid in the tank, or when an item is emptied and completely fills the tank, they never move from the input slots to the output slot.

This looks like it's caused by the logic in the processInput() and processOutput() functions. The items are being filled/emptied in-place, and then they're moved during the next tick if they're completely full/empty.

On the next tick, the function terminates early if there's nothing to do to fill/empty the item. This means that the filled/emptied item is never actually moved to the output slot.

Stack issue: Stacks of items are never processed.

Since the items are processed in place in the input slots, it makes sense to do nothing when more than one item is in the input slot. However this makes it impossible to fill items by piping them in to the tank.

As a proposed fix, the input slots should be limited so that their max stack size is always 1.

No-op issue: when an item can not be filled because the tank is empty, or an item can not be emptied because the tank is full, then the item immediately moves to the output slot. This could end up piping an entire inventory of empty buckets through an empty tank, and coming out empty.

The items should wait in the input slots until the fluid levels in the tank allow them to be processed.

As part of this, items that can never be filled or emptied should also stay in the input slots, just like they do now. This makes it easy to block one of the input slots to control which slot items get pipe into.

Steps to reproduce

No response

Minecraft version

1.21.1 (Latest)

Platform

Neoforge

Loader version

21.1.226

Oritech version

1.2.0

Other relevant versions

No response

If a (crash)log is relevant for this issue, link it here: (It's almost always relevant)

No response

Metadata

Metadata

Assignees

No one assigned

    Labels

    enhancementNew feature or request

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions