Get block data in a scheduleAsyncDelayedTask

Discussion in 'Plugin Development' started by Moon_werewolf, Jan 2, 2012.

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

    Moon_werewolf

    Would it be safe to use this code in a scheduleAsyncDelayedTask

    Code:
    int nextId = family.getWorld().getBlockTypeIdAt(l.getBlockX(),l.getBlockY(),l.getBlockZ());
    byte nextData = family.getWorld().getBlockAt(l.getBlockX(),l.getBlockY(),l.getBlockZ()).getData();
    nextId and nextData are later stored like this
    Code:
    family.getPreMembers().add(new NanoSearch(family,nextId,nextData,l));
     
  2. Offline

    Moon_werewolf

  3. Offline

    Moon_werewolf

    Hmm :/ well i think i keep the getBlockAt and see if its interfere anywhere, in that thread its only store data it never edits it (that happens outside the thread)
     
Thread Status:
Not open for further replies.

Share This Page