Advertisement
  1. This site uses cookies. By continuing to use this site, you are agreeing to our use of cookies. Learn More.

blocks placing

Comments in 'Plugin Development' started by Creeperface, Jan 13, 2016.

  1. Creeperface
    Offline

    Creeperface Notable Member Plugin Developer

    Joined:
    Nov 8, 2014
    Posts:
    1,346
    Plugins:
    4
    Minecraft User:
    CreeperFace
    what is the fastest way to place more blocks? (e.g. for colormatch or worldfixer)
    i think there is faster way than $level->setBlock()
  2. Hotshot_9930
    Offline

    Hotshot_9930 Notable Member Plugin Developer

    Joined:
    May 26, 2014
    Posts:
    665
    Plugins:
    2
    Minecraft User:
    HotshotHD
    setBlock() would be the fastest. Other method is by sending packets. That might he faster but I'm not sure.
  3. PEMapModder
    Offline

    PEMapModder Notable Member Plugin Developer

    Joined:
    Oct 9, 2013
    Posts:
    7,294
    Plugins:
    11
    Minecraft User:
    PEMapModder
    First: do you want to save the changes, or at least let the server know about the changes (to make server know that there is a block or a hole)?
    Yes: use setBlockIdAt(), which does not send the changes to the players. Then unload the changed chunks for the players so that the chunks will be sent to them again
    No: use sendBlocks() to send the changes to the players without modifying values server side.
  4. Creeperface
    Offline

    Creeperface Notable Member Plugin Developer

    Joined:
    Nov 8, 2014
    Posts:
    1,346
    Plugins:
    4
    Minecraft User:
    CreeperFace
    Thx And what do you use in worldeditart?
  5. PEMapModder
    Offline

    PEMapModder Notable Member Plugin Developer

    Joined:
    Oct 9, 2013
    Posts:
    7,294
    Plugins:
    11
    Minecraft User:
    PEMapModder
    These cool functions didn't exist when I initially wrote it :p
    I am now using setBlock() in my rewrite, but I do it gradually, so lag isn't a concern as long as setBlock() rate is low.

Share This Page

Advertisement