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

Passing RegistryAccess to more Events! #1529

Open
wants to merge 8 commits into
base: 1.21.x
Choose a base branch
from

Conversation

ZestyBlaze
Copy link
Contributor

This PR builds off the issue brought up in #1527 where it can get a bit messy accessing RegistryAccess through ServerLifecycleHooks when most events should have easy access to it

This PR aims to fix this and passes RegistryAccess through to 3 new events, VillagerTradesEvent, WandererTradesEvent and RegisterBrewingRecipesEvent at the moment through a new method getRegistryAccess in the event

After a discussion with @sciwhiz12, we mentioned leaving this PR open for 3 days, where upon other community members or contributors can mention other events that can or should have access. If there are any more events you want to see get it, let me know and I'll work on it!

(Also this is my first time doing patch changes, so if I've done something wrong, let me know)

@neoforged-pr-publishing
Copy link

  • Publish PR to GitHub Packages

@sciwhiz12 sciwhiz12 added enhancement New (or improvement to existing) feature or request 1.21.1 Targeted at Minecraft 1.21.1 labels Sep 10, 2024
@ZestyBlaze
Copy link
Contributor Author

That should now return all the original methods and constructors, and mark them all as deprecated

@ZestyBlaze
Copy link
Contributor Author

Those have been added now too :)

XFactHD
XFactHD previously approved these changes Sep 13, 2024
@ZestyBlaze
Copy link
Contributor Author

@sciwhiz12 those changes should be all added now I believe

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
1.21.1 Targeted at Minecraft 1.21.1 enhancement New (or improvement to existing) feature or request
Projects
None yet
Development

Successfully merging this pull request may close these issues.

VillagerTradesEvent and WandererTradesEvent has no way to access DatapackRegistries.
4 participants