Open benda95280 opened 4 years ago
New attempt to show difference :
Increase your maximum memory allocation in the pocketmine.yml
Already done (While trying to get it works with others plugins). WorldStyler do not use so much memory, other plugins was over 3Gb of memory and crash) Currently it's 4GB in PHP and PocketMine configuration files.
Tried to add a pause after LoadChuck, result is always different
There isn't really an easy way to solve this. Chunk generation is asynchronous. The plugin would need to wait until the chunk being modified is generated so the world generator doesn't overwrite the changes - will need to probably do something that https://github.com/Wumpotamus/libChunkLoader does.
I'm not able to understand/find a way how to implement it :/
Tried implentation like that in Schematic.php, line 90 :
$yPos = $y + $rely;
ChunkRegion::onChunkGenerated($level, $xPos >> 4, $zPos >> 4, function() use($iterator, $xPos, $yPos, $zPos, $id, $damage){
$iterator->moveTo($xPos, $yPos, $zPos);
$iterator->currentSubChunk->setBlock($xPos & 0x0f, $yPos & 0x0f, $zPos & 0x0f, $id, $damage);
});
After, server shutdown when over 4Gb of memory ...
EDIT: It seems to have done near 1/4 of the work :
Hello,
I've tried to load a 'Large' schematic (near 2Mb), and was having error like that :
I've been able to fix it by do a modification on "BlockIterator.php" :
But now, i've a message saying everything has been done, but there is missing parts. Tried multiple time, sometimes the result is not the same. The first time, never got the message saying it was finished ...
Is it possible to have support ?