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

Add Vault block API #12068

Open
wants to merge 8 commits into
base: main
Choose a base branch
from
Open

Conversation

Warriorrrr
Copy link
Member

@Warriorrrr Warriorrrr commented Feb 4, 2025

Supersedes #11159

Adds new API for vault blocks

Changes made compared to the previous PR:

  • Added some javadocs.
  • Removed itemsToEject methods, these items are only populated when a player is opening a vault, but these can already be changed with the block dispense loot event, and also can't think of any use case for changing items in the middle of ejecting.
  • Removed rewarded players methods with player instances.
  • Added API for state update time.
  • Made the VaultBlockEntity#serverData field public to be able to directly update the server data, without having to access the actual tile entity.

Co-authored-by: Boy <[email protected]>
@Warriorrrr Warriorrrr requested a review from a team as a code owner February 4, 2025 22:31
@Grabsky
Copy link

Grabsky commented Feb 5, 2025

May not be the scope of this PR, but perhaps these could also be addressed here?

Or would this rather be a separate PR?

@Warriorrrr
Copy link
Member Author

May not be the scope of this PR, but perhaps these could also be addressed here?

* [VaultUnlockEvent #11687](https://github.com/PaperMC/Paper/discussions/11687)

* [VaultStateChangeEvent #11679](https://github.com/PaperMC/Paper/discussions/11679)

Or would this rather be a separate PR?

My current scope is just the vault block, I'll change the PR name

@Warriorrrr Warriorrrr changed the title Add Vault API Add Vault block API Feb 5, 2025
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
Status: Awaiting review
Development

Successfully merging this pull request may close these issues.

5 participants