-
Notifications
You must be signed in to change notification settings - Fork 192
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Hopper does not pull items from modded containers that subclass vanilla containers and override their functions without super calls #444
Comments
Maybe related to #415 |
You might be able to help me to come to a better understanding why modders do things the way they do it. This should help me adapt lithium's assumptions to fit better to other mods. Why are you using fabric-api and that "ImplementedInventory" interface to implement Inventories? (My first attempt would be to do whatever the vanilla BarrelBlockEntity does. Implementing LithiumInventory is NOT needed but it will allow lithium to run some optimizations (IF the insert/extract conditions of the inventory are only changed when the inventory contents change) |
After some further reading it is unclear to me why lithium does not work correctly with your mod. I will look into it |
Probably fixed in c5cbd18 |
Needs info whether the issue still occurs after the mentioned commit |
Tested using the artifact from Actions (https://github.com/CaffeineMC/lithium-fabric/actions/runs/4069499962), and it did not resolve the issue, as the hopper is still not initalized.
The current |
Can you try without implementing LithiumInventory? |
In case this doesn't help, can you link your latest build? Does it only affect your custom double chests or also the custom single chests? Lithium handles DoubleInventory quite different from other inventories, so I assume that the code might not expect custom double chests |
To clarify this affects both single and double chests at the moment. Latest release is here: https://www.curseforge.com/minecraft/mc-mods/mythicmetals-decorations/files/4377089 An issue I have had with Lithium is that without the Mixin that applies the crash-2023-02-08_17.25.56-server.txt This release has a |
I think the main issue is that you |
Cleaned up a bunch of the Block Entity in Noaaan/MythicMetalsDecorations@e335359, thanks for the comment. The single chests are now working as intended, and hoppered items are falling through, although double chests are not being properly respected. |
The double chests do not work due Lithium using its own way to retrieve Inventories from the world. The method that vanilla hoppers use combines accessing blocks and entities. Lithium separates those accesses for optimization purposes. I think I cannot really change it on lithium's side. |
The solution doesn't generalize but it should work for your case |
Personally I am fine with doing something similar to before - Interface injecting into my own mod if Lithium is present, especially if the optimizations are good. |
Together with your changes this issue should be fixed in Lithium 0.11.0 |
Will test it out tomorrow 👍 |
Instructions
This is very similar to issue #417, albeit in a different nature.
Most notably I do not use Fabric Carpet here.
Hoppers with Mythic Metals Decorations do not work properly when Lithium is installed. The issue only seems to happen on extraction rather than inserting into the containers.
I have tried both using Fabrics Item Transfer API (see https://github.com/Noaaan/MythicMetalsDecorations/blob/333319ba22f1d65bf3caa50e168ce05a8cc4d763/src/main/java/nourl/mythicmetalsdecorations/MythicMetalsDecorations.java#L66).
My containers do support
LithiumInventory
(via https://github.com/Noaaan/MythicMetalsDecorations/blob/1.19/src/main/java/nourl/mythicmetalsdecorations/mixin/MythicChestBlockEntityLithiumCompatMixin.java#L11), yet the hoppers do not respect the chests.Version Information
Using lithium-fabric-mc1.19.3-0.10.4 and Mythic Metals Decorations 0.5.1+1.19.3 (unreleased), and is reproducible outside of a development environment.
This issue also happens with lithium-fabric-mc1.19.2-0.10.2 and mythicmetals-decorations 0.5.1+1.19.2 (also unreleased)Turns out this is not the case, my apologies.Tested it against the backport of lithium-fabric-mc.1.19.2**-0.10.4** and it does NOT work. This might exclusively be an issue with the later versions of Lithium (>0.10.2).
Expected Behavior
The items from the top hopper should fall through to the bottom hopper
Actual Behavior
The items stop inside the chest.
Reproduction Steps
Other Information
If the state of the hopper changes (for example by updating the stack, placing a block above/below it), then the hopper will start extracting items again.
Full modlist:
TLDR:
The text was updated successfully, but these errors were encountered: