ReGen Chunk in selfmade World
#4
(12-17-2016, 10:42 PM)xoft Wrote: - keep a copy of the world and copy from there

The second is a perfect example of using multiworld as an advantage - make Cuberite load both worlds, but don't let players into the "backup" world. Then simply copy any area from the backup to the main world.

At first i think the second option is the best.
How i can log if a entity has modify a chunk?

How i can copy the chunk from backup world to main world?
Okay, i looked in the WorldEdit Plugin, is this the best way?

PHP Code:
function copy(World,chX,chZ)
    print(
"Start Copy for:",chX,chZ)

    
local startX math.floor(chX 16)
    
local endX math.floor(chX 16) + 16
    local startZ 
math.floor(chZ 16)
    
local endZ math.floor(chZ 16) + 16

    
print(startX,endX,startZ,endZ)

    for 
startXendX do
        for 
0255 do
            for 
startZendZ do
                
local BlockType World:GetBlock(XYZ)
                if(
BlockType ~= 0then
                    local BlockMeta 
World:GetBlockMeta(XYZ)
                    print(
"Copy Block",X,Y,Z,"BlockID;"BlockType)
                    -- 
Test Copy to the next X Chunk
                    World
:SetBlock(X+16YZBlockTypeBlockMetafalse)
                
end
            end
        end
    end
end 




I doesnt find a function and hook in wiki.
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: 5 Guest(s)