CaffeineMC / lithium-fabric

A Fabric mod designed to improve the general performance of Minecraft without breaking things
GNU Lesser General Public License v3.0
1.94k stars 190 forks source link

Hoppers not interacting with expanded-storage's containers #415

Closed BrekiTomasson closed 1 year ago

BrekiTomasson commented 2 years ago

Version Information

Lithium 0.10.2 for Fabric 1.18.2

Expected Behavior

The Hoppers should pull items from the container above them.

Actual Behavior & Reproduction Steps

Every so often, the Hoppers stop pulling items from the container above them. They continue to pull items thrown on top of them, but do not pull items out of chests. This happens randomly, but can be somewhat reproduced if you place additional Hoppers under additional containers (with items in them), as it seems to reach some kind of max limit when the oldest ones break.

Removing the hopper and replacing it makes it start pulling items again.

2No2Name commented 2 years ago

Can you elaborate further? Hoppers cannot pick up items if there is a container on top of them. Are you saying they are picking up items intead of pulling items from the container? Also there should not be any side effects from other inventories that are not directly touching the hopper.

If you could post a sequence of screenshots or a video that reproduces the issue that would be very helpful

BrekiTomasson commented 2 years ago

No, what I meant is that they stop pulling items from out of the chest. Easiest way to reproduce this is to place double-wide chests in a zig/zag pattern on top of each other with hoppers pulling from the chest above and pushing into the chest on its own level. Something like this ( < and > for hoppers, C for Chests):

 CC
CC<
>CC
CC<
>CC
CC<

Put things in the top chest, and they should slowly funnel down into the bottom chest. However, with the latest version of Lithium, they do not always do this, with the entire thing breaking after a while with things gathering in one of the chests and not being pulled out. I downgraded to Lithium v0.7.10 and it all started working again.

2No2Name commented 2 years ago

Thanks, I will look into it

2No2Name commented 2 years ago

I cannot reproduce the issue. Can you post the list of mods you have installed?

BrekiTomasson commented 2 years ago
BrekiTomasson commented 2 years ago

Reminder, though - the problem began only after I upgraded to the latest version of Lithium for 1.18.2 and disappeared once I downgraded again. No other changes to any mods were made.

2No2Name commented 2 years ago

I think it will be helpful if you post a screenshot of the setup of chests and hoppers that break and a description of steps what to do. Maybe it is a lithium-only issue, or it is a combination with a mod that interacts with lithium's code, which is unlikely to work at all

BrekiTomasson commented 2 years ago

It broke in many different combinations, both hoppers pulling from chests down into the top of a furnace and hoppers pulling from chests into other chests, etc. It seems like any combination of hoppers pulling out of containers was vulnerable, while hoppers were still able to pick things up when thrown on top of them.

If it's any difference, this happened when playing on a server. I did not attempt to reproduce it in single-player mode as the error was so clearly related to the upgrade of Lithium and I just wanted the server to be back up and running.

BrekiTomasson commented 2 years ago

After some additional testing, I was able to reproduce it in singleplayer mode, but only with the chests from the expandedstorage mod. Unsure if this was also the case when running on the server.

Fourmisain commented 2 years ago

Did some testing on this, I can confirm that this does seem to exclusively happen with Expanded Storage chests. I tested this in isolation with just Lithium 0.10.2, Expanded Storage and the required Fabric API and Ellemes' Container Library.

To reproduce: Place a hopper and an Expanded Storage chest on top, then put items in it. It will pull all items from the chest until it is empty. Once empty, newly added items will not be pulled until the hopper below it is replaced.

Looks like some failing empty chest optimization?

I was gonna scout through the code but it looks like the source for Ellemes' Container Library is currently unavailable (it appears repos were recently moved from Github to Gitlab).

I'll open an issue on Expanded Storage's issue tracker. There we go: https://gitlab.com/Ellemes/expanded-storage/-/issues/1

2No2Name commented 2 years ago

This is probably an issue that has to be fixed in lithium, not in expanded storage

FatQuickscope41 commented 2 years ago

I am having this same issue, but I am using Fabric. Here is a video demonstrating the issue https://youtu.be/84e26ZdPmvo, don't mind the music

MoonliteDelight commented 1 year ago

Can confirm this is still happening with version 0.10.4 As a work around, I was able to fix it by diabling the following mixins: mixin.blocker.hopper mixin.world.block_entity_ticking.sleeping.hopper Honestly not sure which one is the problem child, but hopefully this helps you narrow down between the two

2No2Name commented 1 year ago

Probably fixed in https://github.com/CaffeineMC/lithium-fabric/commit/c5cbd18270ac905cd778089a27b36119f38c7bf6