From b0a85155d7d653e5ae3676f25083f24a0ee85a90 Mon Sep 17 00:00:00 2001 From: "Dylan K. Taylor" Date: Tue, 2 Jul 2019 14:06:11 +0100 Subject: [PATCH] [ci skip] add inventory changes to changelog --- changelogs/4.0-snapshot.md | 39 ++++++++++++++++++++++++++++++++++++++ 1 file changed, 39 insertions(+) diff --git a/changelogs/4.0-snapshot.md b/changelogs/4.0-snapshot.md index 5f03f02cd..4ed0b3cfa 100644 --- a/changelogs/4.0-snapshot.md +++ b/changelogs/4.0-snapshot.md @@ -301,6 +301,45 @@ This version features substantial changes to the network system, improving coher - `pocketmine\plugin\RegisteredListener` -> `pocketmine\event\RegisteredListener` ### Inventory +- All crafting and recipe related classes have been moved to the `pocketmine\crafting` namespace. +- The following classes have been added: + - `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. + - `transaction\CreateItemAction` + - `transaction\DestroyItemAction` +- The following classes have been renamed: + - `ContainerInventory` -> `BlockInventory` +- The following classes have been removed: + - `CustomInventory` + - `InventoryEventProcessor` + - `Recipe` + - `transaction\CreativeInventoryAction` +- The following API methods have been added: + - `Inventory->addChangeListeners()` + - `Inventory->getChangeListeners()` + - `Inventory->removeChangeListeners()` + - `Inventory->swap()`: swaps the contents of two slots +- The following API methods have been removed: + - `BaseInventory->getDefaultSize()` + - `BaseInventory->setSize()` + - `Inventory->close()` + - `Inventory->dropContents()` + - `Inventory->getName()` + - `Inventory->getTitle()` + - `Inventory->onSlotChange()` + - `Inventory->open()` + - `Inventory->sendContents()` + - `Inventory->sendSlot()` + - `InventoryAction->onExecuteFail()` + - `InventoryAction->onExecuteSuccess()` + - `PlayerInventory->sendCreativeContents()` +- The following API methods have signature changes: + - `Inventory->clear()` now returns `void` instead of `bool`. + - `Inventory->setItem()` now returns `void` instead of `bool`. + - `InventoryAction->execute()` now returns `void` instead of `bool`. + - `BaseInventory->construct()` no longer accepts a list of items to initialize with. +- `PlayerInventory->setItemInHand()` now sends the update to viewers of the player. ### Item #### General