Repository navigation
Add getInstrument method to BlockType - #14251
Conversation
|
This only really depends on the block type so I think BlockType is a more suitable place |
|
That’s a fair point, but I added it to BlockData because it directly mirrors Vanilla architecture ( |
|
@Lulu13022002 What do you think? Where should I put it? |
|
I think it can be on both if you really want it on BlockData, but it's fine to use the default block state (it wouldn't be the first method here). There is no need to fully mirror vanilla, the api is a bit inconsistent on where to place things here (some case using CraftBlock too). |
|
Sure, I added it also to BlockType. |
|
Okay, I added anotation and removed comments. Should I do something about build failure with the previous commit, or is that ok? |
I rerun the build and all looks good by the moment. |
|
Looking into this there's a conflict with NoteBlock#getInstrument so I'm not sure about block data. |
|
@Lulu13022002 Sorry, but what should I do about that? Rename method? Remove it from BlockData? |
Maybe just keep in the BlockType for avoid confussion... or mess with the generator for the method in the noteblock block data... but more easy the first. |
|
Removed it, is it ok now? |
For me yes, only a rebase but i can do this when can merge. |
|
Merged, Thanks for your first Contribution :) |
Upstream has released updates that appear to apply and compile correctly Paper Changes: PaperMC/Paper@288d43e1 Add getInstrument method to BlockType PaperMC/Paper#14251 PaperMC/Paper@6bc56abc Add `throws CommandSyntaxException` to BasicCommand PaperMC/Paper#14339 PaperMC/Paper@a9d03827 Fix startup crash using autoEnableOnServerStart in plugin-provided datapacks PaperMC/Paper#14238 PaperMC/Paper@ddb45eb4 Fix incorrect container setChanged() called in optimized hopper patch PaperMC/Paper#14269 PaperMC/Paper@60c8e563 Force absolute positions for item frames PaperMC/Paper@1d254ec4 Fix adding entities with api with already valid passengers PaperMC/Paper#14336 PaperMC/Paper@371c96aa Fix username duplication in chat when defaultRenderer is explicitly set PaperMC/Paper#13868 PaperMC/Paper@6e88e469 Fix possible CME race conditions for post effects PaperMC/Paper#14335 PaperMC/Paper@1a7b6265 Bump JLine to 4.4.6, drop JNI backend as Paper compiles to Java 25 PaperMC/Paper#14323 PaperMC/Paper@1dbde610 Make test block codec conditional PaperMC/Paper@780818ff Clear bucket empty event result when fluid placement fails PaperMC/Paper#14345 PaperMC/Paper@2de3a930 Fix silent ignore of Block#getState(boolean) parameter PaperMC/Paper#14341 PaperMC/Paper@65c408ad Don't remove player twice when disconnected during config switch PaperMC/Paper#14346 PaperMC/Paper@4728a906 Fix bundle contents corruption with item obfuscation and shelves PaperMC/Paper#14352
Upstream has released updates that appear to apply and compile correctly Paper Changes: PaperMC/Paper@288d43e1 Add getInstrument method to BlockType PaperMC/Paper#14251 PaperMC/Paper@6bc56abc Add `throws CommandSyntaxException` to BasicCommand PaperMC/Paper#14339 PaperMC/Paper@a9d03827 Fix startup crash using autoEnableOnServerStart in plugin-provided datapacks PaperMC/Paper#14238 PaperMC/Paper@ddb45eb4 Fix incorrect container setChanged() called in optimized hopper patch PaperMC/Paper#14269 PaperMC/Paper@60c8e563 Force absolute positions for item frames PaperMC/Paper@1d254ec4 Fix adding entities with api with already valid passengers PaperMC/Paper#14336 PaperMC/Paper@371c96aa Fix username duplication in chat when defaultRenderer is explicitly set PaperMC/Paper#13868 PaperMC/Paper@6e88e469 Fix possible CME race conditions for post effects PaperMC/Paper#14335 PaperMC/Paper@1a7b6265 Bump JLine to 4.4.6, drop JNI backend as Paper compiles to Java 25 PaperMC/Paper#14323 PaperMC/Paper@1dbde610 Make test block codec conditional PaperMC/Paper@780818ff Clear bucket empty event result when fluid placement fails PaperMC/Paper#14345 PaperMC/Paper@2de3a930 Fix silent ignore of Block#getState(boolean) parameter PaperMC/Paper#14341 PaperMC/Paper@65c408ad Don't remove player twice when disconnected during config switch PaperMC/Paper#14346 PaperMC/Paper@4728a906 Fix bundle contents corruption with item obfuscation and shelves PaperMC/Paper#14352
I added the missing getInstrument() method to the API as requested in issue #14228.
Changes: