Open Johnmacrocraft opened 5 years ago
Small note: block-picking an empty item frame should indeed give you an item frame.
Additional side note: The condition is not whether or not it's available to creative. For example, it's possible to block-pick command blocks.
I'm actually not sure what's the condition... After that, I thought it is the items that I can obtain from /give, but blocks like Nether Reactor cannot be obtained from it but still pick-blockable. In other news, I found another inconsistency and added it.
Inconsistencies with vanilla behaviour have been resolved by 60225a378f76196b5e598db3f7b880efd49a4ea0. The issue of being able to get normally unobtainable blocks in creative (e.g. portals) still remains, but I don't think anyone will really mind that much.
(for issue posterity) This problem can now be fixed by overloading getPickedItem
. However, this is a rather hacky way of doing it.
It might be interesting to add a function in the blocks to specify this logic, in the sense that the contents of the creative inventory cannot be used (command blocks are recoverable).
My line of thought on this issue was to make getPickedItem() able to return NULL, but that requires a BC break.
Issue description
In vanilla, when you pick-block an item frame with any item in it, you get a copy of the item. PocketMine, on the other hand, gives an item frame, not an item in it. PocketMine also allows obtaining items that are not supposed to be obtainable in normal means (e.g. Portal). It also doesn't check whether players already have the item in their inventory.
Steps to reproduce the issue
Issue 1:
Issue 2:
Issue 3:
OS and versions
Plugins
Crashdump, backtrace or other files