RoboTricker / Transport-Pipes

Buildcraft without mods!
https://www.spigotmc.org/resources/transport-pipes.20873/
MIT License
27 stars 28 forks source link

Pipes don't connect to chests placed by other plugin #32

Closed daniel-vd closed 7 years ago

daniel-vd commented 7 years ago

A plugin of mine places a chest by using setType(), pipes do not connect to this chest. But after a server reload or rejoining the pipe does connect. The weird thing is that hoppers do always connect to the chest and don't have this problem.

I'm not sure if it's your plugin that is causing this problem, but the fact that hoppers do work just fine makes it probable.

sgdc3 commented 7 years ago

i think you can just use the transportpipes api to update the pipes connected faces

daniel-vd commented 7 years ago

But using the api would mean all users of my plugin would need the Transport Pipes plugin, so i don't think that is a suitable solution.

RoboTricker commented 7 years ago

No, you simply can use TransportPipes as soft dependency and notify the block placement only if TransportPipes is enabled

daniel-vd commented 7 years ago

I now tried to register the chest as a container by using the API. Now the extraction pipe does connect to the chest, but still no blocks are going through the pipe, they only do after a server reload.

RoboTricker commented 7 years ago

did you use this method to notify TransportPipes about the block placement: de.robotricker.transportpipes.pipeutils.ContainerBlockUtils#updatePipeNeighborBlockSync(Block toUpdate, boolean add) If not please try this method.

daniel-vd commented 7 years ago

That solved the issue, thanks.