pmmp / PocketMine-MP

A server software for Minecraft: Bedrock Edition in PHP
https://pmmp.io
GNU Lesser General Public License v3.0
3.26k stars 1.53k forks source link

Lots of items named ENCHANTED_BOOK in Creative Inventory #6411

Open b1zeyofficial opened 1 month ago

b1zeyofficial commented 1 month ago

Issue description

Steps to reproduce the issue

  1. Launched the latest version of PocketMine
  2. Logged into the server, opened Creative Inventory

OS and versions

Plugins

dktapps commented 1 month ago

These are most likely the ones whose enchantments aren't implemented yet

ShockedPlot7560 commented 1 month ago

These are most likely the ones whose enchantments aren't implemented yet

No book has enchantments

ShockedPlot7560 commented 1 month ago

The enchantments are stored in the json and are correctly injected into the creativeInventory. The problem is that the client does not have any enchantments and when a book is retrieved, no enchantments are present.

dktapps commented 1 month ago

Yeah, because this discards unknown enchantments: https://github.com/pmmp/PocketMine-MP/blob/5a926a79cb97f284c64c754d3f60fba8348435b8/src/item/Item.php#L316

ShockedPlot7560 commented 1 month ago

Some items have enchantments that are already known, but none in the creative inventory has an enchantment.

b1zeyofficial commented 2 days ago

By the way, this bug only happens in the items tab