mirror of
https://github.com/pmmp/PocketMine-MP.git
synced 2025-06-26 05:14:05 +00:00
Merge 'minor-next' into 'major-next'
Automatic merge performed by: https://github.com/pmmp/RestrictedActions/actions/runs/15800888918
This commit is contained in:
commit
68126b308a
@ -2606,6 +2606,16 @@ class World implements ChunkManager{
|
||||
}
|
||||
|
||||
public function setChunk(int $chunkX, int $chunkZ, Chunk $chunk) : void{
|
||||
foreach($chunk->getSubChunks() as $subChunk){
|
||||
foreach($subChunk->getBlockLayers() as $blockLayer){
|
||||
foreach($blockLayer->getPalette() as $blockStateId){
|
||||
if(!$this->blockStateRegistry->hasStateId($blockStateId)){
|
||||
throw new \InvalidArgumentException("Provided chunk contains unknown/unregistered blocks (found unknown state ID $blockStateId)");
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
$chunkHash = World::chunkHash($chunkX, $chunkZ);
|
||||
$oldChunk = $this->loadChunk($chunkX, $chunkZ);
|
||||
if($oldChunk !== null && $oldChunk !== $chunk){
|
||||
|
Loading…
x
Reference in New Issue
Block a user