mirror of
https://github.com/pmmp/PocketMine-MP.git
synced 2025-04-20 16:00:20 +00:00
parent
2f408708f0
commit
65247b7248
@ -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()`
|
||||
|
Loading…
x
Reference in New Issue
Block a user