[Yet unsolved] AsyncWorldEdit paste schematic

Discussion in 'Plugin Development' started by nubebuster, Oct 26, 2014.

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

    nubebuster

    Hello,
    I wanted to paste a scematic file. I figured out how, but the server freezes during the process.
    I want to do this using AsyncWorldEdit, but I dont know how.

    My Current Code:
    Code:java
    1. EditSession es = new EditSession(new BukkitWorld(world), 999999999);
    2. @SuppressWarnings("deprecation")
    3. CuboidClipboard cc = CuboidClipboard.loadSchematic(file);
    4. cc.setOffset(new Vector(0, 0, 0));
    5. cc.paste(es, origin, true);


    How do I do this? Thanks already.
     
  2. Offline

    mythbusterma

    nubebuster

    You can't modify the world from a separate thread, that will cause all sorts of issues, instead you should spread the world changes over multiple ticks, giving the server a chance to deal with the immense amount of processing it has to do.
     
  3. Offline

    nubebuster

    That's why I am using asyncworldedit -_-
     
  4. Offline

    fireblast709

    nubebuster you simply use WE like you used to. Afaik AWE handles this behind the scenes.
     
  5. Offline

    nubebuster

    The problem is that the server still freezes during the progress - I know for a fact that awe is not helping with my placement

    [EDIT] I tested it with bats, bats freeze when I place my schematic
     
  6. Offline

    lewysryan

    Is the schematic to large ?
    idk the coding behind how to do it but try it with a small schematic
     
  7. Offline

    nubebuster

    nope
     
  8. Offline

    mythbusterma

Thread Status:
Not open for further replies.

Share This Page