McJtyMods / XNet

Advanced item/liquid/energy/... networking
MIT License
91 stars 49 forks source link

Create basin items disappearing #522

Closed StevenDoesStuffs closed 2 years ago

StevenDoesStuffs commented 2 years ago

Issue description: If a network tries to move an entire stack of items into a basin, sometimes it disappears.

Steps to reproduce: Try to move a stack of an item (I used nether wart, the issue exists for some items but not others) from a chest into a basin.

Versions:

Possibly incompatible mods and versions: none (issue reproduced in minimal environment with just XNet and create)

Relevant logs, if any: None

This appears to be caused by the basin's IItemHandler giving inaccurate results when inserting items on simulation. When simulating an insert, the basin reports that it can take the entire stack of items, but when actually inserting it can only take 16. I'm hesitant to call this a bug on Create's part, since I'm pretty sure simulate isn't required to be accurate (well... at least one other dev believes this). Also, I've tested some other pips, like pretty pipes, and they seem to handle it fine, so I think XNet should stop relying on simulate. Anyhow, I can fix this in a PR if you'd like (I'm already going to code it anyways just for my own use).

EDIT: IItemHandler simulation is accurate, ItemHandlerHelper simulation is causing the problem.

McJty commented 2 years ago

I cannot stop relying on simulate. Simulate IS supposed to be accurate. This is not a bug in XNet