Skip to content
This repository was archived by the owner on Sep 12, 2022. It is now read-only.
This repository was archived by the owner on Sep 12, 2022. It is now read-only.

Loading large Schematic #20

Description

@benda95280

Hello,

I've tried to load a 'Large' schematic (near 2Mb), and was having error like that :

2020-06-01 [22:26:40] [Server thread/CRITICAL]: Error: "Call to a member function getSubChunk() on null" (EXCEPTION) in "plugins/WorldStyler_dev-11.phar/src/muqsit/worldstyler/utils/BlockIterator" at line 17
2020-06-01 [22:26:40] [Server thread/DEBUG]: #0 plugins/WorldStyler_dev-11.phar/src/muqsit/worldstyler/schematics/Schematic(89): muqsit\worldstyler\utils\BlockIterator->moveTo(integer 352, integer 65, integer 448)
2020-06-01 [22:26:40] [Server thread/DEBUG]: #1 plugins/WorldStyler_dev-11.phar/src/muqsit/worldstyler/executors/SchemCommandExecutor(75): muqsit\worldstyler\schematics\Schematic->paste(object pocketmine\level\Level, object pocketmine\math\Vector3, boolean 1, object Closure)
2020-06-01 [22:26:40] [Server thread/DEBUG]: #2 plugins/WorldStyler_dev-11.phar/src/muqsit/worldstyler/executors/BaseCommandExecutor(85): muqsit\worldstyler\executors\SchemCommandExecutor->onCommandExecute(object pocketmine\Player, object pocketmine\command\PluginCommand, string[6] /schem, array[2], array[0])

I've been able to fix it by do a modification on "BlockIterator.php" :

			if (!$this->level->isChunkLoaded( $this->currentX, $this->currentZ )) {
					$this->level->loadChunk ( $this->currentX, $this->currentZ );
			}
			$this->currentSubChunk = $this->level->getChunk($this->currentX, $this->currentZ)->getSubChunk($y >> 4, $this->allocateEmptySubs);
            return true;

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 ?
Minecraft 01_06_2020 23_56_40

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions