loop blocks around some point.

Discussion in 'Plugin Development' started by Smerfa, Jul 10, 2014.

Thread Status:
Not open for further replies.
  1. Offline

    Smerfa

    I trying to create code that will be checking all blocks around some location - only on this same Y axis.

    EQ: I must found nearest yellow block from that diamond-block, but i don't know where are yellow blocks: (any of that 3 near center)
    [​IMG]

    I can checking larger, and larger area every time... but that isn't fast :p - checking this same blocks multiple time.
     
  2. Offline

    _Filip

    Try rewording your post, I don't understand what you want.
    Do you want a method that generates spirals?
     
  3. Offline

    Smerfa

    not generate, only loop.
    Just find that nearest yellow block :<
    Show Spoiler

    [​IMG]

    So i must checking that blocks until I find one of yellow-blocks (I don't know location of any yellow-block)
    [​IMG]
    But how?
    Checking areas like 3x3, then 5x5, 7x7 will be too slow - it will be checking this same blocks many times.


    So how to do that faster?

    anyone?

    EDIT by Moderator: merged posts, please use the edit button instead of double posting.
     
    Last edited by a moderator: Jun 9, 2016
Thread Status:
Not open for further replies.

Share This Page