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

Merged
merged 11 commits into from
Sep 28, 2024

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

@ZestyBlaze
Copy link
Contributor Author

ZestyBlaze commented Sep 23, 2024

Branch updated to match latest, should be ready to be merged if all reviews check out

@XFactHD XFactHD merged commit aad7f81 into neoforged:1.21.x Sep 28, 2024
6 checks passed
@neoforged-releases
Copy link

🚀 This PR has been released as NeoForge version 21.1.63.

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