P3pp3rF1y / SophisticatedStorage

GNU General Public License v3.0
30 stars 29 forks source link

Chest Variations Do Not Work in Create Moving Contraptions #315

Closed Darkosto closed 1 month ago

Darkosto commented 11 months ago

Hello!

When using Sophisticated Storage blocks with Create Contraptions, many of the chest variants will not work both visibly and functionally.

I've been under the impression that they have all worked until a recent Sophisticated Storage and Core update but after further investigation some have never worked since the first release of Sophisticated Storage. We checked back to the first release for 1.18.2 and confirmed that all Netherite variants do not function while the remaining storage work correctly. The base storage chests have only recently stopped functioning which, I believe, happens after sophisticatedstorage-1.20.1-0.8.51.605 & sophisticatedcore-1.20.1-0.5.89.425

I can't find anything that separates the chests that work and the ones that do not so I can't offer any assistance on that end. But, if possible, I can help test versions with more logging to help pinpoint the issue. Let me know if you have any questions.

Darkosto

P3pp3rF1y commented 11 months ago

So here's the rundown of some of the main rules that create uses to determine if a storage can be used or open while the contraption is running.

When the contraption is being formed it checks every storage for:

Now when contraption actually works there's another rule for whether gui can be shown - will only open for storages that have a multiple of 9 of inventory slots.

So out of this you get following:

Best solution would be create allowing anything that includes barrel / chest in name to be treated as such and allowing any number of slots to be shown in gui.

As an alternative you can fix netherite chest/barrel gui to be shown by setting the number of slots to be a multiple of 9.

And I will think about returning item handler that's not optimized for filled inventory if this is asked for without a side provided (all pipes / storage buses I can think of should be providing a side they are trying to insert from so that should likely handle that part). This would fix the wood tier chest/barrel.

P3pp3rF1y commented 11 months ago

Also one more thing I realized when looking at my implementation there are other things that can affect if the inventory could be detected solely based on the type of item handler used - for example if filter upgrade is used that also uses a wrapper on top and Create in that case will again fall back to detecting whether it is inventory by _chest / _barrel in its name, but this one is likely less of a worry because upgrades anyway won't work in any way in contraptions and players are likely to just use storages without any upgrades at all.

P3pp3rF1y commented 11 months ago

just released an update in which I am no longer trying to optimize item handler if it was asked for without a side so wooden tier barrels/chests now work in create contraptions. I will still leave this open as I would like to see if I can do something about proper compat being added to create to support cases like stack upgrades in storage