diff --git a/changelogs/4.0-snapshot.md b/changelogs/4.0-snapshot.md index 7c3849d68..ed2606f2d 100644 --- a/changelogs/4.0-snapshot.md +++ b/changelogs/4.0-snapshot.md @@ -389,13 +389,34 @@ This version features substantial changes to the network system, improving coher ### Item #### General -- `ProjectileItem->getProjectileEntityType()` now returns a ::class constant instead of an entity save ID. +- `Item->count` is no longer public. +- The hierarchy of writable books has been changed: `WritableBook` and `WrittenBook` now extend `WritableBookBase`. +- The following API methods have signature changes: + - `WritableBookBase->setPages()` now accepts `WritableBookPage[]` instead of `CompoundTag[]`. + - `ItemFactory::get()` no longer accepts `string` for the `tags` parameter. + - `ItemFactory::fromString()` no longer accepts a `$multiple` parameter and now only returns `Item`, not `Item|Item[]`. +- The following methods are now fluent: + - `WritableBookBase->setPages()` + - `Item->addEnchantment()` + - `Item->removeEnchantment()` + - `Item->removeEnchantments()` + - `Armor->setCustomColor()` + - `WrittenBook->setTitle()` + - `WrittenBook->setAuthor()` + - `WrittenBook->setGeneration()` - The following API methods have been removed: - `Item->getNamedTagEntry()` - `Item->removeNamedTagEntry()` - `Item->setDamage()`: "Damage" is now immutable for all items except `Durable` descendents. - `Item->setNamedTagEntry()` - + - `Item::get()`: this was superseded by `ItemFactory::get()` a long time ago + - `Item::fromString()`: this was superseded by `ItemFactory::fromString()` a long time ago + - `Item->setCompoundTag()` + - `Item->getCompoundTag()` + - `Item->hasCompoundTag()` + - `ProjectileItem->getProjectileEntityType()` +- The following methods have been renamed: + - `Item->getDamage()` -> `Item->getMeta()` - The following methods have been moved to `pocketmine\inventory\CreativeInventory`: - `Item::addCreativeItem()` -> `CreativeInventory::add()` - `Item::clearCreativeItems()` -> `CreativeInventory::clear()` @@ -404,6 +425,41 @@ This version features substantial changes to the network system, improving coher - `Item::initCreativeItems()` -> `CreativeInventory::init()` - `Item::isCreativeItem()` -> `CreativeInventory::contains()` - `Item::removeCreativeItem()` -> `CreativeInventory::remove()` +- The following classes have been added: + - `ArmorTypeInfo` + - `Boots` + - `Chestplate` + - `Fertilizer` + - `Helmet` + - `Leggings` + - `LiquidBucket` + - `MilkBucket` + - `WritableBookBase` + - `WritableBookPage` +- The following API methods have been added: + - `Armor->getArmorSlot()` + - `ProjectileItem->getProjectileEntityClass()`: returns the class of projectile to be created when thrown +- The following classes have been removed: + - `ChainBoots` + - `ChainChestplate` + - `ChainHelmet` + - `ChainLeggings` + - `DiamondBoots` + - `DiamondChestplate` + - `DiamondHelmet` + - `DiamondLeggings` + - `GoldBoots` + - `GoldChestplate` + - `GoldHelmet` + - `GoldLeggings` + - `IronBoots` + - `IronChesplate` + - `IronHelmet` + - `IronLeggings` + - `LeatherBoots` + - `LeatherCap` + - `LeatherPants` + - `LeatherTunic` #### Enchantment - The following API methods have been renamed: