mirror of
https://github.com/pmmp/PocketMine-MP.git
synced 2025-09-03 08:35:20 +00:00
Clean up terminology around block state IDs and their handling
This commit is contained in:
@ -34,17 +34,17 @@ class SubChunkTest extends TestCase{
|
||||
public function testClone() : void{
|
||||
$sub1 = new SubChunk(0, [], new PalettedBlockArray(BiomeIds::OCEAN));
|
||||
|
||||
$sub1->setFullBlock(0, 0, 0, 1);
|
||||
$sub1->setBlockStateId(0, 0, 0, 1);
|
||||
$sub1->getBlockLightArray()->set(0, 0, 0, 1);
|
||||
$sub1->getBlockSkyLightArray()->set(0, 0, 0, 1);
|
||||
|
||||
$sub2 = clone $sub1;
|
||||
|
||||
$sub2->setFullBlock(0, 0, 0, 2);
|
||||
$sub2->setBlockStateId(0, 0, 0, 2);
|
||||
$sub2->getBlockLightArray()->set(0, 0, 0, 2);
|
||||
$sub2->getBlockSkyLightArray()->set(0, 0, 0, 2);
|
||||
|
||||
self::assertNotSame($sub1->getFullBlock(0, 0, 0), $sub2->getFullBlock(0, 0, 0));
|
||||
self::assertNotSame($sub1->getBlockStateId(0, 0, 0), $sub2->getBlockStateId(0, 0, 0));
|
||||
self::assertNotSame($sub1->getBlockLightArray()->get(0, 0, 0), $sub2->getBlockLightArray()->get(0, 0, 0));
|
||||
self::assertNotSame($sub1->getBlockSkyLightArray()->get(0, 0, 0), $sub2->getBlockSkyLightArray()->get(0, 0, 0));
|
||||
}
|
||||
|
Reference in New Issue
Block a user