-
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 cache invalidation broken when inventory blocks are placed without block updates (WorldEdit) #417
Comments
This issue is caused by lithium assuming that the placement of an inventory block will send block updates to sourrounding hoppers. The block updates are used to invalidate the cached information which says that the hopper has no inventory block to interact with. |
For a fix we probably have to check how carpet and world edit implement the update suppression. At some point we can probably get an update out of the block creation, however this might decrease the performance of large fills. |
Hello @2No2Name, Same issue on Farmer's Delight Fabric port, without Lithium, the cooking pot is working well, but if last version of Lithium is installed (I've not yet tested with older version), hoppers cannot pull or push items in the cooking pot until they are updated themself. My first guess is that I'm doing something wrong in the code that break the interaction, but it work well without Lithium, and the code is the same than a furnace block. If you need any information to understand what's wrong, I'm available. This will maybe fixed by this action https://github.com/CaffeineMC/lithium-fabric/actions/runs/3504930287, so in next release, but I prefered notify that the bug. |
Ideas how to fix update suppressed placement of inventories near hoppers not updating the hopper's caching:
I think I will look into 1. as the other options are probably more work and less maintainable |
@Fallen-Breath I think the build at https://github.com/CaffeineMC/lithium-fabric/actions/runs/3554890604 might be able to fix the issue. If you test it, your feedback will be appreciated a lot. |
The way it is fixed may or may not work with world edit, since I only read the fabric-carpet code in detail so far |
The github action failed, might due to this client-side only import |
Ugh, should have... tested it or waited for the build to finish. |
Again, not testing before commenting: |
Works for fabric carpet's For worldedit's implemetation, you can check these 2 classes. Basically worldedit directly sets block in chunk, and then performs side-effects by itself |
Also included compatibility for worledit, but there is no general solution yet. |
Instructions
If a inventory block with contents inside is placed without updates next to a hopper, the hopper will not pull / push items from / to the inventory block
Version Information
Reproduction Steps
/carpet fillUpdates false
command to enable a carpet rule that removes block updates when during/setblock
or/clone
commands/clone
command to clone the placed chest to the top of the hopperExpected Behavior
Hopper starts pulling items from the chest
Actual Behavior
Hopper does nothing and refuse to pull items from the chest. Seems like the hopper is not notified
Other Information
With
/carpet fillUpdates false
, using/setblock
command to set a chest with inventory also doesn't make the hopper workIf you use worldedit and do
//perf neighbors off
to disable block updates from worldedit operation, then worldedit operations with inventory blocks also doesn't notify the hopper. Reproduced with worldedit 7.2.12 in mc1.19.2lithium 0.10.2 for mc1.18.2 has this issue too
reloading the chunk fixes the "broken" hopper
The text was updated successfully, but these errors were encountered: