Skip to content

Added getInstrument method to BlockData API - #14251

Open
ItzMatick wants to merge 2 commits into
PaperMC:mainfrom
ItzMatick:add-instrument
Open

ItzMatick wants to merge 2 commits into
PaperMC:mainfrom
ItzMatick:add-instrument

Conversation

@ItzMatick

Copy link
Copy Markdown

I added the missing getInstrument() method to the API as requested in issue #14228.

Changes:

  • Added the interface method to BlockData.
  • Added the translation logic in CraftBlockData.

@ItzMatick
ItzMatick requested a review from a team as a code owner September 13, 2026 13:59
@github-project-automation github-project-automation Bot moved this to Awaiting review in Paper PR Queue Sep 13, 2026
Comment thread paper-server/src/main/java/org/bukkit/craftbukkit/block/data/CraftBlockData.java Outdated
@Lulu13022002

Copy link
Copy Markdown
Contributor

This only really depends on the block type so I think BlockType is a more suitable place

@ItzMatick

ItzMatick commented Sep 13, 2026

Copy link
Copy Markdown
Author

That’s a fair point, but I added it to BlockData because it directly mirrors Vanilla architecture (this.state.instrument()). If I move it to BlockType, I would have to pull it from default blocks.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

Status: Awaiting review

Development

Successfully merging this pull request may close these issues.

3 participants