62832 / MEGACells

ME Greater Accumulation Cells - For when kilobytes just won't do.
https://www.curseforge.com/minecraft/mc-mods/mega-cells
GNU Lesser General Public License v3.0
28 stars 11 forks source link

Does not properly register mega interface for fabric transfer api #114

Closed solonovamax closed 5 months ago

solonovamax commented 5 months ago

When using the mod on fabric, it will not properly interact with the fabric transfer api.

I believe that this is because it is not properly registered for that.

in ae2, the interfaces are all registered to the fabric storage api here.

Steps to reproduce:

  1. Install ae2, mega cells, and modern industrialization (+ dependencies)
  2. launch game
  3. place down mega interface & normal interface
  4. attempt to place fluid pipe/item pipe going into/out of the normal interface: connects properly. Works as expected.
  5. attempt to place fluid pipe/item pipe going into/out of the mega interface: does not connect. Not working as expected.

I believe that the fix would be to add the following:

GenericInternalInventory.SIDED.registerForBlockEntity((be, context) -> be.getInterfaceLogic().getStorage(), MEGABlockEntities.MEGA_INTERFACE);

This is because, I can properly insert into the mega pattern provider using MI's item/fluid pipes, with no issue. I do not know what the PartApiLookup and MEStorage registries do however, so perhaps those are needed as well.

Note: I am unfamiliar with fabric's transfer api, so this could be incorrect. This is all based on some digging through the code.

solonovamax commented 5 months ago

update: I tested this change, and the pipe now connects properly. I'm assuming that it works.

solonovamax commented 5 months ago

update part two: I confirmed, it does properly send fluids/items into it

62832 commented 5 months ago

In that case, I suspect that the release I've just pushed should also work, since it does the same thing.