Skip to content

Implement legacy material conversion#15

Merged
BjornTheProgrammer merged 3 commits into
Pumpkin-MC:masterfrom
Purdze:feat/patchbukkit-legacy
Mar 3, 2026
Merged

Implement legacy material conversion#15
BjornTheProgrammer merged 3 commits into
Pumpkin-MC:masterfrom
Purdze:feat/patchbukkit-legacy

Conversation

@Purdze
Copy link
Copy Markdown
Contributor

@Purdze Purdze commented Mar 2, 2026

Summary

  • Implement three-tier legacy material lookup in PatchBukkitLegacy covering all 462 LEGACY_* materials (data-value map, rename map, direct name match)
  • Fix null player sender by creating PatchBukkitPlayer on-the-fly with op when Java-side getPlayer returns null
  • Add DynamicTestProvider interface and LEGACY_MATERIALS test category that validates every legacy material converts to non-AIR
  • Fix protobuf codegen naming collision with java_outer_classname
  • Clean up command_manager: extract get_or_init_command_map helper, remove debug logging and dead code

Closes #10

Test plan

  • /pbtest LEGACY_MATERIALS passes 462/462 legacy materials
  • /pbtest all passes all existing conformance tests
  • Java and Rust projects build successfully

- Add three-tier legacy material lookup in PatchBukkitLegacy: data-value
  map, rename map, and direct name match covering all 462 LEGACY_*
  materials
- Fix null player sender by creating PatchBukkitPlayer on-the-fly with
  op when Java-side getPlayer returns null
- Add DynamicTestProvider interface and LEGACY_MATERIALS test category
  that validates every legacy material converts to non-AIR
- Fix protobuf codegen naming collision with java_outer_classname
- Clean up command_manager: extract get_or_init_command_map helper,
  remove debug logging and dead code
Copy link
Copy Markdown
Collaborator

@BjornTheProgrammer BjornTheProgrammer left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Looks great!

@BjornTheProgrammer
Copy link
Copy Markdown
Collaborator

There is just a formatting error that needs to be fixed before merging.

- Use Option::map instead of manual if-let-some in config callback
- Remove unused itemstack re-export
- Apply cargo fmt
@BjornTheProgrammer
Copy link
Copy Markdown
Collaborator

Pumpkin-world is no longer needed

@Purdze
Copy link
Copy Markdown
Contributor Author

Purdze commented Mar 2, 2026

Thanks Purdze, LGTM

@Purdze
Copy link
Copy Markdown
Contributor Author

Purdze commented Mar 2, 2026

Thanks Purdze, LGTM

No problem

@BjornTheProgrammer
Copy link
Copy Markdown
Collaborator

Thanks Purdze, LGTM

Yeah looks good to me as well 😆

@BjornTheProgrammer BjornTheProgrammer merged commit 4b0b782 into Pumpkin-MC:master Mar 3, 2026
13 checks passed
@Purdze Purdze deleted the feat/patchbukkit-legacy branch March 3, 2026 02:06
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

[SUPPORT] Add support for the ChristmasGifts plugin

2 participants