[ci skip] more detail for World API changes on PM4

This commit is contained in:
Dylan K. Taylor 2020-11-09 14:01:27 +00:00
parent 66955d4b99
commit 1d02829d6f

View File

@ -707,12 +707,41 @@ This version features substantial changes to the network system, improving coher
- `BlockTransaction`: allows creating batch commits of block changes with validation conditions - if any block can't be applied, the whole transaction fails to apply.
- `ChunkListenerNoOpTrait`: contains default no-op stubs for chunk listener implementations
- `ChunkListener`: interface allowing subscribing to events happening on a given chunk
- The following classes have been renamed:
- `pocketmine\world\utils\SubChunkIteratorManager` -> `pocketmine\world\utils\SubChunkExplorer`
- The following API methods have been added:
- `World->registerChunkListener()`
- `World->unregisterChunkListener()`
- The following API methods have been removed:
- `ChunkLoader->getLoaderId()` (now object ID is used)
- `World->isFullBlock()`
- `World->getFullBlock()`
- `World->getBlockIdAt()`
- `World->setBlockIdAt()`
- `World->getBlockDataAt()`
- `World->setBlockDataAt()`
- `World->setBlockLightAt()`
- `World->setBlockSkyLightAt()`
- `World->getBlockSkyLightAt()` (use `World->getRealBlockSkyLightAt()` or `World->getPotentialBlockSkyLightAt()`, depending on use-case)
- `World->getHeightMap()` (misleading name, only actually useful for sky light calculation - you probably want `getHighestBlockAt()` instead)
- `World->setHeightMap()` (misleading name, only actually useful for sky light calculation)
- `World->getChunkEntities()`
- `World->getChunkTiles()`
- `World->getTileById()`
- `World->checkSpawnProtection()`
- `World->updateBlockLight()`
- `World->updateSkyLight()`
- `World->isFullBlock()` (use `Block->isFullCube()` instead)
- `World->sendBlocks()`
- `World->sendTime()`
- `World->addGlobalPacket()`
- `World->broadcastGlobalPacket()`
- `World->addChunkPacket()`
- `World->broadcastLevelSoundEvent()`
- `World->broadcastLevelEvent()`
- `World->getTickRate()`
- `World->setTickRate()`
- `World::generateChunkLoaderId()`
- The following API methods have changed signatures:
- `World->addParticle()` now has the signature `addParticle(Vector3 $pos, Particle $particle, ?Player[] $players = null) : void`
- `World->addSound()` now has the signature `addSound(?Vector3 $pos, Sound $sound, ?Player[] $players = null) : void`
@ -720,8 +749,12 @@ This version features substantial changes to the network system, improving coher
- `World->addRandomTickedBlock()` now accepts `Block` instead of `int, int`.
- `World->removeRandomTickedBlock()` now accepts `Block` instead of `int, int`.
- `World->setBlock()` has had the `$direct` parameter removed.
- `World->loadChunk()` now returns `?Chunk`, and the `$create` parameter is mandatory.
- `World->getChunk()` no longer accepts a `$create` parameter.
- `World->updateAllLight()` now accepts `int, int, int` instead of `Vector3`.
- The following API methods have been renamed / moved:
- `Level->getCollisionCubes()` -> `World->getCollisionBoxes()`
- `World->getName()` -> `World->getDisplayName()`
- Extracted a unit `pocketmine\world\format\io\FastChunkSerializer` from `Chunk`:
- `Chunk->fastDeserialize()` -> `FastChunkSerializer::deserialize()`
- `Chunk->fastSerialize()` -> `FastChunkSerializer::serialize()`