non-exhaustive updates to changelog [ci skip]

This commit is contained in:
Dylan K. Taylor 2020-10-27 19:35:03 +00:00
parent 797e0996f4
commit 587a4c0095

View File

@ -7,6 +7,7 @@ This major version features substantial changes throughout the core, including s
- A new "plugin greylist" feature has been introduced, which allows whitelisting or blacklisting plugins from loading.
- The `/reload` command has been removed.
- The `/effect` command no longer supports numeric IDs - it's now required to use names.
- The `/enchant` command no longer supports numeric IDs - it's now required to use names.
- Remote console (RCON) has been removed. The [RconServer](https://github.com/pmmp/RconServer) plugin is provided as a substitute.
- Spawn protection has been removed. The [BasicSpawnProtection](https://github.com/pmmp/BasicSpawnProtection) plugin is provided as a substitute.
- CTRL+C signal handling has been removed. The [PcntlSignalHandler](https://github.com/pmmp/PcntlSignalHandler) plugin is provided as a substitute.
@ -15,6 +16,7 @@ This major version features substantial changes throughout the core, including s
- New PHP extensions are required by this version:
- [ds](https://github.com/php-ds/ext-ds)
- [chunkutils2](https://github.com/pmmp/ext-chunkutils2)
- [morton](https://github.com/pmmp/ext-morton)
### World handling
#### Functional
@ -28,10 +30,12 @@ This major version features substantial changes throughout the core, including s
- Extended blocks are now supported (facilitated by automatic conversion).
- Unsupported world formats no longer causes a crash, but a graceful shutdown instead.
- World corruption no longer causes a crash, but a graceful shutdown instead.
- Lighting is no longer stored or loaded from disk - instead, it's calculated on the fly as-needed. This fixes many long-standing bugs.
#### Performance
- `leveldb` is now the primary supported world format. It is inherently faster than region-based formats thanks to better design.
- Partial chunk saves (only saving modified subcomponents of chunks) has been implemented. This drastically reduces the amount of data that is usually necessary to write on chunk save, which in turn **drastically reduces the time to complete world saves**. This is possible thanks to the modular design of the `leveldb` world format - this enhancement is not possible with region-based formats.
- Lighting is no longer guaranteed to be available on every chunk. It's now calculated on the fly as-needed.
### Logger revamp
- Many components now have a dedicated logger which automatically adds [prefixes] to their messages.
@ -237,13 +241,19 @@ This version features substantial changes to the network system, improving coher
- `SlownessEffect`
- `SpeedEffect`
- `WitherEffect`
- `VanillaEffects` class has been added. This exposes all vanilla effect types as static methods, replacing the old `Effect::getEffect()` nastiness.
- Example: `Effect::getEffect(Effect::NIGHT_VISION)` can be replaced by `VanillaEffects::NIGHT_VISION()`.
- Negative effect amplifiers are now explicitly disallowed due to undefined behaviour they created.
- The following API methods have been renamed:
- `Effect::registerEffect()` -> `Effect::register()`
- `Effect::getEffect()` -> `Effect::get()`
- `Effect::getEffectByName()` -> `Effect::fromString()`
- Static getter methods for all registered enchantment types have been added. `Effect::getEffect(Effect::WHATEVER)` should be replaced by `VanillaEffects::WHATEVER()`.
- All effect registry functionality has been removed from the `Effect` base class and migrated to the `VanillaEffects` class.
- The boundaries between MCPE effect IDs and PocketMine-MP internals are now more clear.
- ID handling is moved to `pocketmine\data\bedrock\EffectIdMap`.
- All effect ID constants have been removed from `Effect`. `pocketmine\data\bedrock\EffectIds` if you still need legacy effect IDs for some reason.
- The following API methods have been moved:
- `Effect->getId()` -> `EffectIdMap->toId()`
- `Effect::registerEffect()` -> `EffectIdMap->register()`
- `Effect::getEffect()` -> `EffectIdMap->fromId()`
- `Effect::getEffectByName()` -> `VanillaEffects::fromString()`
- The following API methods have been added:
- `Effect->getRuntimeId()`: this is a **dynamic ID** which can be used for effect type comparisons. **This cannot be stored, so don't use it in configs or NBT!**
#### Removal of runtime entity NBT
- Entities no longer keep their NBT alive at runtime.
@ -252,21 +262,21 @@ This version features substantial changes to the network system, improving coher
- `Entity->initEntity()` now accepts a `CompoundTag` parameter.
#### Entity creation
- Entity class overriding is now explicitly supported, without needing to touch save IDs.
- Entity classes can be overridden using `EntityFactory::override()`. The provided replacement class **must** be a subclass of the existing class. If the existing class isn't there, an exception will be thrown.
- Attempting to register an entity to a save ID that is already registered will now cause an exception to be thrown.
- Runtime entity creation no longer requires `EntityFactory` - just use `new YourEntity` instead.
- Entity constructors no longer require `CompoundTag`. You can now make your entity constructors have any signature you want.
- `EntityFactory` now requires a creation callback (usually a closure) with the signature `function(World, CompoundTag) : Entity` to construct entities loaded from disk. This is required to allow entity classes to have custom constructor signatures. This callback should do any necessary actions to transform NBT into constructor parameters.
- Example: `ItemEntity` now requires an `Item` in its constructor, so its creation callback decodes the `Item` from the NBT to be passed to the constructor.
- Example: `Painting` now requires a `PaintingMotive` in its constructor, so its creation callback decides which `PaintingMotive` to provide based on the NBT it receives.
- See `EntityFactory` for more examples.
- `EntityFactory`'s responsibility as runtime entity creator has been removed. It's now solely responsible for restoring entities saved on disk.
- Registering entities will now throw exceptions on error cases instead of returning `false`.
- Entity creation has now been split into two paths:
- `EntityFactory::create()`: Creates an entity by the given class. This accepts arguments to be passed to the entity constructor. This function is guaranteed to return an entity which is an instanceof the given class.
- `EntityFactory::createFromData()`: Creates an entity from save data. This may return any `Entity` class or `NULL`. This function is internal and shouldn't be used by plugins.
- It is no longer possible to directly create an entity by save ID. This is discouraged because save IDs are internal and format-dependent.
- The following API methods have been moved:
- `Entity::registerEntity()` -> `EntityFactory::register()`
- `Entity::createEntity()` -> `EntityFactory::create()`
- `Entity::getKnownEntityTypes()` -> `EntityFactory::getKnownTypes()`
- `Entity::createBaseNBT()` -> `EntityFactory::createBaseNBT()`
- `Entity::createBaseNBT()` -> `EntityDataHelper::createBaseNBT()`
- The following API methods have been removed:
- `Entity->getSaveId()`
- `Entity::getKnownEntityTypes()`
- `Entity::createEntity()`: use `new YourEntity` instead (to be reviewed)
#### WIP removal of entity network metadata
- All network metadata related constants have been removed from the `Entity` class and moved to the protocol layer. It is intended to remove network metadata from the API entirely, but this has not yet been completed.
@ -372,8 +382,15 @@ This version features substantial changes to the network system, improving coher
- `InventoryChangeListener`: allows listening (but not interfering with) events in an inventory.
- `transaction\CreateItemAction`
- `transaction\DestroyItemAction`
- The following classes have been renamed:
- `ContainerInventory` -> `BlockInventory`
- The following classes have been renamed / moved:
- `ContainerInventory` -> `pocketmine\block\inventory\BlockInventory`
- The following classes have been moved to the `pocketmine\block\inventory` namespace:
- `AnvilInventory`
- `ChestInventory`
- `DoubleChestInventory`
- `EnchantInventory`
- `EnderChestInventory`
- `FurnaceInventory`
- The following classes have been removed:
- `CustomInventory`
- `InventoryEventProcessor`
@ -484,11 +501,21 @@ This version features substantial changes to the network system, improving coher
- It's planned to remove runtime NBT from items completely, but this currently presents unresolved backwards-compatibility problems.
#### Enchantment
- The following API methods have been renamed:
- `Enchantment::registerEnchantment()` -> `Enchantment::register()`
- `Enchantment::getEnchantment()` -> `Enchantment::get()`
- `Enchantment::getEnchantmentByName()` -> `Enchantment::fromString()`
- Static getter methods for all registered enchantment types have been added. `Enchantment::getEnchantment(Enchantment::WHATEVER)` should be replaced by `Enchantment::WHATEVER()`.
- `VanillaEffects` class has been added. This exposes all vanilla enchantment types as static methods, replacing the old `Enchantment::get()` nastiness.
- Example: `Enchantment::get(Enchantment::PROTECTION)` is replaced by `VanillaEnchantments::PROTECTION()`
- These methods also provide proper type information to static analysers instead of just generic `Enchantment`, making them easier to code with.
- The boundaries between MCPE enchantment IDs and PocketMine-MP internals are now more clear.
- ID handling is moved to `pocketmine\data\bedrock\EnchantmentIdMap`.
- All enchantment ID constants have been removed from `Enchantment`. `pocketmine\data\bedrock\EnchantmentIds` if you still need legacy effect IDs for some reason.
- `Enchantment::RARITY_*` constants were moved to `Rarity` class, and the `RARITY_` prefixes removed.
- `Enchantment::SLOT_*` constants were moved to `ItemFlags` class, and the `SLOT_` prefixes removed.
- The following API methods have been moved:
- `Enchantment::registerEnchantment()` -> `EnchantmentIdMap->register()`
- `Enchantment::getEnchantment()` -> `EnchantmentIdMap->fromId()`
- `Enchantment->getId()` -> `EnchantmentIdMap->toId()`
- `Enchantment::getEnchantmentByName()` -> `VanillaEnchantments::fromString()`
- The following API methods have been added:
- `Enchantment->getRuntimeId()`: this is a **dynamic ID** which can be used for enchantment type comparisons. **This cannot be stored, so don't use it in configs or NBT!**
### Lang
- The following classes have been renamed:
@ -742,6 +769,8 @@ This version features substantial changes to the network system, improving coher
- `XpLevelUpSound`
### Utils
- The `Color` class was removed. It's now found as `pocketmine\color\Color` in the [`pocketmine/color`](https://github.com/pmmp/Color) package.
- The `UUID` class was removed. It's now found as `pocketmine\uuid\UUID` in the [`pocketmine/uuid`](https://github.com/pmmp/UUID) package.
- `Terminal::hasFormattingCodes()` no longer auto-detects the availability of formatting codes. Instead it's necessary to use `Terminal::init()` with no parameters to initialize, or `true` or `false` to override.
- `Config->save()` no longer catches exceptions thrown during emitting to disk.
- The following new classes have been added:
@ -749,7 +778,6 @@ This version features substantial changes to the network system, improving coher
- `Internet`
- `Process`
- The following API methods have been added:
- `Color::fromRGBA()`
- `Config->getPath()`: returns the path to the config on disk
- `Terminal::write()`: emits a Minecraft-formatted text line without newline
- `Terminal::writeLine()`: emits a Minecraft-formatted text line with newline
@ -769,14 +797,6 @@ This version features substantial changes to the network system, improving coher
- `Utils::$online`
- `Utils::$os`
- The following API methods have signature changes:
- `Color::mix()` now requires the first parameter. Previously, it was possible to pass zero arguments, which would raise an `ArgumentCountError` (not static analysis friendly).
- `Internet::simpleCurl()` now requires a `Closure` for its `onSuccess` parameter instead of `callable`.
- The following API methods have been removed:
- `Color->setA()`
- `Color->setR()`
- `Color->setG()`
- `Color->setB()`
- `Color->toABGR()`
- `Color->toBGRA()`
- `Color::fromABGR()`
- `Utils::getCallableIdentifier()`