Item Phased Teleport Pipe Not Working
wizzbangca opened this issue ยท 7 comments
Minecraft 1.7.10
Mods:
Buildcraft 7.0.14
Buildcraft Compat 7.0.8
Additional Pipes 4.6.0 (not developer)
Forge 10.13.4.1448
On a server or a local session, the phased item teleport pipe doesn't work as I believe it should. At my home base I have a 9 chest automatic sort setup using standard buildcraft cobblestone, stone, and diamond transport pipes.Connected to the sorter is a teleport pipe with frequency 1, set to private, and receive only. 700 blocks away is a chest loaded with stuff. A wood pipe is connected to the chest and teleport pipe connected to the wood pipe set to frequency 1, send only, and private. A redstone engine is underneath the wood pipe.
When a redstone torch is put underneath the redstone engine, items start disappearing through the teleport pipe. Gong back to the base, the items appear in the proper location in the chest, but more items cannot be seen going through the sort systems. Going back to the sending pipe, items are being dropped out of the teleport pipe. The total count between the items that made it back to the base and the dropped items show i have lost some stuff. Stop the redstone engine, pick up the items, put them back in the chest. When the redstone engine is started up again, items are dropped out of the teleport pipe, nothing goes to the base.
Not sure if I am doing something wrong, or there's just a limitation in the teleport pipes.
I'll look into it. The item teleport pipes work in my test world, but that's when they're right next to each other.
You found a legitimate bug, and thanks for your help. I've incorporated your fix, as well as a new unit test to check for the issue.
However, this bug can't be causing wizzbanca's issue, because he said that he had the pipe set to "Send Only", not "Send & Receive". So, I guess we'll have to keep looking.
Finally, if you have a Google account, you can send me a Google Talk message at [email protected]
.
I would love to have had your IM info, I have a lot I would have liked to talk over with you that is not included here, and some more comments about the AP/LP goings on.
I am not going to go into all the scenarios and testing I have done, but there seems to be one issue that is causing most if not all the grief... When the call to getConnectedPipes goes out, if the pipe is in Send+Receive mode, it returns itself in the listing. This causes the send function to attempt to send a packet to itself, which does not fully work, causes a collision, rarely dumps the objects out but normally just causes them to disappear.
The pipes operate perfectly if one is set on send only, and the other on receive only.
I would suggest the following line be modified (Line 164 of TeleportManager.java)
Original:
if((((other.state & 0x2) > 0 && includeReceive) || ((other.state & 0x1) > 0 && includeSend)) && (pipe.isPublic ? other.isPublic : (other.ownerUUID != null && other.ownerUUID.equals(pipe.ownerUUID))))
{
connected.add(other);
}
Proposed:
if( (other != pipe) &&
( ((other.state & 0x2) > 0 && includeReceive) || ((other.state & 0x1) > 0 && includeSend) ) &&
(pipe.isPublic ? other.isPublic : (other.ownerUUID != null && other.ownerUUID.equals(pipe.ownerUUID)))
)
{
connected.add(other);
}
I have modified/compiled/tested this change, and it works beautifully!
Multiplemonomials, I would still like to talk via IMs at some point.
Hmm. Yes, I do agree, that would not be the issue @wizzbangca is having. It really sounds like chunk loading/unloading to me... At the moment I can't remember what the chunk loading of a player is... And I know there are several mods that affect the loadin/loadout depending on the players facing as well! And that's not to mention the chunk loading capabilities of the pipes... Which I haven't had any time to go over. Sorry I'm not to much help at the moment with that issue... But I will keep it in mind as I do more checkouts!
@wizzbangca, could you send me your world file, and a list of the mods you're using, if possible? thanks.
I apologize for not replying sooner, I have been really busy with life stuff. I was able to get the teleport pipes to work. All that was needed was a chunk loader mod. One chunk loader went by the receiver pipe while the other loader went by the send pipe. Tried this on several worlds, multiplayer survival, single player survival, single player creative. All of the tutorials I saw never mentioned a chunk loader. maybe the teleport pipes could be chunk loaders, with a configuration for servers?