![Roost](https://media.forgecdn.net/avatars/thumbnails/120/213/256/256/636406500473842128.jpeg)
Collector code oddity
Kzorith opened this issue ยท 0 comments
This isn't an issue per say.
I was looking at the code to determine how high you could stack the roosts to have the collector collect from them. That information wasn't noted in the overview. (It's 3 if I'm reading the code right)
But looking at your the code, the collector seems to have odd behavour because of the update to the search offset before doing the gather. The search offset is initialized at zero which would mean your first collection would be at x-4, y-0, z-4 if you did the gather first. But you increment the offset first so your first collection would be at x-4, y-0, z-3. It only gets to the x-4, y-0, z-4 position after you have checked/done all the other spaces.
The code works, but I'm not sure if it's working as you intended. My feeling is that you might consider doing the gatherItems() first, then the updateSearchOffset() in your update() of the collector.
Kzorith