Compact Machines

Compact Machines

68M Downloads

Item tunnels don't function correctly

Yadokingu opened this issue · 8 comments

commented

I am not using performance mods.

  • Confirm

Description

I can't seem to transfer items through item tunnels with mekanism logistical transporters at all, unless on the ouside of the machine a vanilla hopper pumps items in and there is only a transporter on the inside sucking. On the outside the trasporter won't connect and just putting an inventory on top of the compact machine and sucking from the inside is somehow not enough.
AE2 storage buses can't see attached inventories through tunnels when they could in older versions. Also sometimes AE2 sees the tunnel as an inventory itself, where items can be put in and withdrawn, but as soon as the compact machine is broken, the items inside the tunnel get deleted. That one I couldn't reliably reproduce though.
Even transfering items with vanilla hoppers, I need one on the outside of the machine that pushes and one on the inside that pulls. Otherwise no items come through.
Do item tunnels now have their own inventories? I can't explain all that weirdness any other way.

Mod Version

4.3.0

Forge Version

1.18.2 - 40.1.60

Link to Crashlog

No response

Screenshot (if available)

No response

How to reproduce

  1. try to use item tunnels with AE2 storage bus, mekanism mechanical transporter or even vanilla hoppers
commented

In the newest nightly for 1.18.2, 4.3.0.16, I got a vanilla hopper to transfer items into a compact machine, without them ever reaching the attached inventory (a vanilla barrel) inside.
2022-07-20_11 06 06
2022-07-20_11 06 10
2022-07-20_11 06 18
2022-07-20_11 06 22

commented

Tunnels do indeed work like a buffer inventory in 1.18+. This is due to changes in underlying apis and has been documented in multiple issues here. Please try using pipes on either end to insert/extract.

commented

Thanks for the answer and your work.
That is a bit disappointing, since there is now quite a bit of functionality missing that was there before, especially when paired with AE2. Previously you could connect a whole drawer-system inside the compact machine through a tunnel and an AE2 storage bus. But I guess it can't be helped?
Mekanism logistical transporters are a bit weird in that they sometimes will connect and sometimes won't on the outside. I think there has to be an inventory or other transporter connected on the inside beforehand, which is behaviour I wouldn't expect if we are dealing with a buffer inventory in the compact machine itself. (They sometimes did refuse to connect anyway even if there was a connected inventory, but I can't reproduce it now. That was after much jjiggery pokery)
Also it's a bit unintuitive, that items just get stuck in the compact machine walls, so to speak, if you don't pump them out. Couldn't the tunnels just have a "push"-function like a lot of machines do?
Other than that it does work with logistical transporters or hoppers attached on the outside and inside of the machine.

Edit: In 4.3.0 logistical transporters on the outside of compact machines also disconnect after a server restart. Haven't tested in nightly yet.

commented

The problem is unfortunately out of my control, due to underlying changes in Forge's capability system. In 1.12, there was an additional method - hasCapability - that allowed stuff like tunnels and pipes to say they supported each other without needing an actual implementation (say, an inventory). In 1.15+ that method does not exist, as LazyOptional took over.

So, without hasCapability I have no way of telling pipes to just connect, and it'll work out. They demand an actual inventory or are hardcoded to look for other pipe blocks of their type. Hence, buffers. Because pipe support.

commented

I can confirm that 100% of time when server restarts compact machine item tunel does not connect to outside. I have to get inside break and place again internal part and then replace outside logistical pipes (or any other method of pumping items in or out). Seems that after restart maybe overworld loads first and inside of machine somehow does not "recreate" this buffer inventory outside of machine (inside items still go into it and when i break tunel they drop so that side of things seems to work as expected).

Great mod btw, hope this will be possible to fix 🤞

commented

Have you updated to 4.4.0 yet? This should fix the issue where tunnels weren't being read from disk correctly.

commented

Not yet, iam running FTB Direwolf20 1.18 pack in version 1.8.0 currently where 4.3.0 of compact machines is. I will ask them for update and let you know if it fixes it. Thank you!

commented

The problem is unfortunately out of my control, due to underlying changes in Forge's capability system. In 1.12, there was an additional method - hasCapability - that allowed stuff like tunnels and pipes to say they supported each other without needing an actual implementation (say, an inventory). In 1.15+ that method does not exist, as LazyOptional took over.

So, without hasCapability I have no way of telling pipes to just connect, and it'll work out. They demand an actual inventory or are hardcoded to look for other pipe blocks of their type. Hence, buffers. Because pipe support.

This might be too much work, or a feature you don't actually want, but couldn't you do something like the mod Entangled? It entangles two blocks so that the "Entangled Block" acts like the block you entangled it with. Even works through dimensions.
So basically entangle the block that is next to the compact machine the tunnel points to. This also has some limitations, like entangling pipes doesn't seem to work great at the moment, but entangling inventories (for items, fluids, etc.) and pointing pipes into the entanglement block, attaching an AE2 storage bus, works great.
Seems a bit more in keeping with the lore to me, where the inventory is just a few centimeters away, behind the compact machine wall, just shrunk down (even when mechanically it is of course another dimension). But I recognise that it might be too much work or have some problems I don't know about.