
Incompatability with Hopper Fill Bundles.
HydraheadHunter opened this issue · 5 comments
Version Information
Lithium v0.15.1+mc1.21.4
Hopper-bundels-0.1.0-1.21.4, github (Incompatability).
Expected Behavior
Hoppers Fill Bundles is a small mod which allows for hoppers to insert items into and extract items from bundles held in decorated pots.
When a hopper points into a decorated pot that has a bundle in it, the hopper should attempt to insert an item from its inventory into to decorated pot's bundle'sbundle_contents
item component every 'hopper tick.'
When a hopper draws from a decorated pot that has a bundle in it, the hopper should attempt to extract an item from thebundle_contents
item component into its inventory every hopper tick. Once the bundle is empty, the hopper should then pull the bundle out of the decorated pot.
Actual Behavior
Lithium's rewrites of the hopper's functionality in a way that conflicts with the intended item insertion behavior. Items which should be inserted into the
bundle_contents
component instead sit in the hopper.
Lithium does not conflict with the intended extraction behavior.
Reproduction Steps
Install both mods and the latest mc version-correct fabric api, at time of writing (0.119.2+1.21.4).
Launch game and load a world.
From the creative redstone menu, select the plain decorated pot and hopper.
Point the hopper into the decorated pot.
Put an empty bundle into the decorated pot.
Fill the hopper with various partial stacks.
Observe that the items do not flow out of the hopper and into the bundle.Close the game and uninstall Lithium.
Relaunch the game and load the same world.
Observe that the items now flow as intended.
Other Information
Github issue which brought the incompatability to my attention.
Thank you for your time.
Workaround is to put the line mixin.block.hopper=false
in the lithium.properties file in the config folder.
From looking at your mod I wonder why you implement the bundle behavior of the decorated pot by modifying the hopper instead of the decorated pot.
I think the following would be compatible:
The decorated pot presents an inventory with 64 slots, and implements the insertion conditions similar to brewing stands or furnaces. Upon breaking or upon every inventory update, the bundle contents are updated.
I modified the hopper's insert-extract code because that seemed like the most obvious vector of attack, and I was able to get it feature-functional in a vaccuum in under 24 hours.
For presenting X slots, the naïve approach of a flat 64 could cause potential conflicts with the countless max-stack-size component of everything is 99
datapacks on modrinth as well as one of my other mods, Data Driven Stacks which increases the cap on max-stack-size from 99 to 2048. It could definitely work, but I've a gut feeling it'd be much more fragile and prone to incompatabilities.
I'll look into that idea though: Thank you for the suggestion.
Won't take action on this repository, but you can also disable the lithium setting in your mod automatically