Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

PlayerStonecutterRecipeSelectEvent not firing on API-created inventories #5825

Open
3 tasks done
webcrawls opened this issue Jun 14, 2021 · 3 comments · May be fixed by #7265
Open
3 tasks done

PlayerStonecutterRecipeSelectEvent not firing on API-created inventories #5825

webcrawls opened this issue Jun 14, 2021 · 3 comments · May be fixed by #7265
Labels
status: accepted Disputed bug is accepted as valid or Feature accepted as desired to be added. type: bug Something doesn't work as it was intended to. version: 1.16 Game version 1.16

Comments

@webcrawls
Copy link

Expected behavior

When creating a Stonecutter inventory like so:

Inventory inventory = Bukkit.createInventory(null, InventoryType.STONECUTTER);

PlayerStonecutterRecipeSelectEvent is never fired for API-created inventories.

Observed/Actual behavior

The event is not fired.

Steps/models to reproduce

  1. Create a listener that listens on PlayerStonecutterRecipeSelectEvent.
  2. Create a Stonecutter inventory using Bukkit#createInventory
  3. Recipes selected within this inventory will not fire the event.

Plugin list

Just a basic test plugin.

Paper version

This server is running Paper version git-Paper-777 (MC: 1.16.5) (Implementing API version 1.16.5-R0.1-SNAPSHOT)
You are running the latest version
Previous version: git-Paper-775 (MC: 1.16.5)

Agreements

  • I am running the latest version of Paper available from https://papermc.io/downloads.
  • I have searched for and ensured there isn't already an open issue regarding this.
  • My version of Minecraft is supported by Paper.

Other

No response

@Proximyst Proximyst added the type: bug Something doesn't work as it was intended to. label Jun 14, 2021
@Trigary
Copy link
Contributor

Trigary commented Jun 14, 2021

What if you use HumanEntity#openStoneCutter instead? The Bukkit.createInventory API has many flaws at the moment due to how some of the inventories are implemented in NMS. Some of these flaws are documented in the method's JavaDocs, some possibly aren't.

@webcrawls
Copy link
Author

webcrawls commented Jun 14, 2021

What if you use HumanEntity#openStoneCutter instead? The Bukkit.createInventory API has many flaws at the moment due to how some of the inventories are implemented in NMS. Some of these flaws are documented in the method's JavaDocs, some possibly aren't.

Yea, I see that method now - guess that means I can't create a stonecutter using custom titles and stuff. Thanks for the heads up. I can create what I need to with packet listeners, anyways.

Not sure if this issue should be closed, or remain open to track this bug if its intended to be fixed?

@Machine-Maker Machine-Maker linked a pull request Jan 13, 2022 that will close this issue
8 tasks
@Machine-Maker
Copy link
Member

Fixed by #7265

@Machine-Maker Machine-Maker linked a pull request Jan 13, 2022 that will close this issue
8 tasks
@Chew Chew added the status: accepted Disputed bug is accepted as valid or Feature accepted as desired to be added. label Jan 13, 2022
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
status: accepted Disputed bug is accepted as valid or Feature accepted as desired to be added. type: bug Something doesn't work as it was intended to. version: 1.16 Game version 1.16
Projects
Status: ✅ Accepted
Development

Successfully merging a pull request may close this issue.

6 participants