CraftBook 3

CraftBook 3

139k Downloads

Multi-out pipes

LadyCailinBot opened this issue ยท 5 comments

commented

CRAFTBOOK-2357 - Reported by iarspider

First of all, thanks a lot for the pipes. They are a great help already. However, they could be even better if they were multi-out. A
multi-out pipe will split a stack evenly among all its outputs. Also, we could have an IC to handle the splitting ourselves (say, by using a redstone pulse to switch output pipes).

commented

Comment by iarspider

Also, there is something weird with this bugtracker: I can't change the project for the issue.

commented

Comment by wizjany

you are supposed to get it right the first time

commented

Comment by me4502

Making multi pipes evenly split items would be the biggest pain possible... The pipes don't know that they've even split. But a distribution IC could work.... I will make a distribution IC's.

commented

Comment by me4502

Done.

commented

Comment by iarspider

I had to look into the source to figure this one out - correct me if I did it wrong, I'm not good at Java.

The IC has two parameters (read from line 3, split by ":"): "left" and "right". It also has a counter (stored at line 4, default -1). For each item stack this IC processes, it increments the counter, and if it is in (left, left+right] sends the stack right; otherwise, sends it left. Also, once the counter goes over left+right+1, it is reset back to 0.

Well, this will do. But a stack-splitting IC will also be good.