changelog: add notes about ender inventory

closes #4569
This commit is contained in:
Dylan K. Taylor 2021-11-14 16:41:57 +00:00
parent 2f408708f0
commit 65247b7248
No known key found for this signature in database
GPG Key ID: 8927471A91CAFD3D

View File

@ -313,6 +313,10 @@ However, if we add `src-namespace-prefix: pmmp\TesterPlugin` to the `plugin.yml`
### Entity
#### General
- `Entity` no longer extends from `Location`. `Entity->getLocation()` and `Entity->getPosition()` should be used instead.
- Ender inventory has been refactored. It's now split into two parts:
- `EnderChestInventory` is a temporary gateway "inventory" that acts as a proxy to the player's ender inventory. It has a `Position` for holder. This is discarded when the player closes the inventory window.
- `PlayerEnderInventory` is the storage part. This is stored in `Human` and does not contain any block info.
- To open the player's ender inventory, use `Player->setCurrentWindow(new EnderChestInventory($blockPos, $player->getEnderInventory()))`.
- The following public fields have been removed:
- `Entity->chunk`: Entities no longer know which chunk they are in (the `World` now manages this instead).
- `Entity->height`: moved to `EntitySizeInfo`; use `Entity->size` instead
@ -351,6 +355,7 @@ However, if we add `src-namespace-prefix: pmmp\TesterPlugin` to the `plugin.yml`
- `Human->getMaxFood()` -> `HungerManager->getMaxFood()`
- `Human->addFood()` -> `HungerManager->addFood()`
- `Human->isHungry()` -> `HungerManager->isHungry()`
- `Human->getEnderChestInventory()` -> `Human->getEnderInventory()`
- `Human->getSaturation()` -> `HungerManager->getSaturation()`
- `Human->setSaturation()` -> `HungerManager->setSaturation()`
- `Human->addSaturation()` -> `HungerManager->addSaturation()`
@ -564,6 +569,7 @@ However, if we add `src-namespace-prefix: pmmp\TesterPlugin` to the `plugin.yml`
- `CallbackInventoryChangeListener`
- `CreativeInventory`: contains the creative functionality previously embedded in `pocketmine\item\Item`, see Item changes for details
- `InventoryChangeListener`: allows listening (but not interfering with) events in an inventory.
- `PlayerEnderInventory`: represents the pure storage part of the player's ender inventory, without any block information
- `transaction\CreateItemAction`
- `transaction\DestroyItemAction`
- The following classes have been renamed / moved:
@ -588,6 +594,7 @@ However, if we add `src-namespace-prefix: pmmp\TesterPlugin` to the `plugin.yml`
- The following API methods have been removed:
- `BaseInventory->getDefaultSize()`
- `BaseInventory->setSize()`
- `EnderChestInventory->setHolderPosition()`
- `Inventory->close()`
- `Inventory->dropContents()`
- `Inventory->getName()`