ReGen Chunk in selfmade World
#7
The WorldEdit plugin has a //copy and //paste commands that basically do what you want to do.
Simply put, you need to create a cBlockArea object, Read data into it (from within a cWorld:ChunkStay() to make sure the chunks are loaded) and then Write() it to the destination, again in a cWorld:ChunkStay(). Note that it's a bad idea to call a ChunkStay from another world's ChunkStay handler, because that could result in a deadlock. Use cWorld:QueueTask on the second world to avoid the deadlock.
local ba = cBlockArea()
srcWorld:ChunkStay(chunkCoords, nil,
  function()
    ba:Read(srcWorld, ...)
    dstWorld:QueueTask(
      function()
        ba:Write(dstWorld, ...)
        ba:Clear()
      end
    )
  end
)
Reply
Thanks given by:


Messages In This Thread
ReGen Chunk in selfmade World - by moiko89 - 12-17-2016, 10:13 PM
RE: ReGen Chunk in selfmade World - by NiLSPACE - 12-17-2016, 10:32 PM
RE: ReGen Chunk in selfmade World - by xoft - 12-17-2016, 10:42 PM
RE: ReGen Chunk in selfmade World - by moiko89 - 05-14-2017, 10:01 PM
RE: ReGen Chunk in selfmade World - by xoft - 05-15-2017, 05:18 AM
RE: ReGen Chunk in selfmade World - by moiko89 - 05-16-2017, 04:16 AM
RE: ReGen Chunk in selfmade World - by xoft - 05-16-2017, 07:41 AM
RE: ReGen Chunk in selfmade World - by moiko89 - 05-17-2017, 05:04 AM
RE: ReGen Chunk in selfmade World - by xoft - 05-17-2017, 07:56 AM



Users browsing this thread: 1 Guest(s)