Skip to content
This repository was archived by the owner on Jun 3, 2024. It is now read-only.

Make CapabilityRegisteredCallback store class names not class objects#175

Merged
TheGlitch76 merged 1 commit intomasterfrom
capabilityregistered-stringnames
Aug 11, 2020
Merged

Make CapabilityRegisteredCallback store class names not class objects#175
TheGlitch76 merged 1 commit intomasterfrom
capabilityregistered-stringnames

Conversation

@cittyinthecloud
Copy link
Copy Markdown
Contributor

This is needed so the CapabilityInject handling in Patcher doesn't have to load types onto the stack, and replicate Forge behavior of not needing a CapabilityInject's type to exist at runtime.

}

static <C> Event<CapabilityRegisteredCallback<C>> event(String className) {
return CapabilityRegisteredCallbackInternal.getOrCreateEvent(className);
Copy link
Copy Markdown
Member

Choose a reason for hiding this comment

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

I'm not confident we should allow arbitrary strings, but i guess in the long run it's really not that big of a deal

@TheGlitch76 TheGlitch76 merged commit c92e748 into master Aug 11, 2020
@TheGlitch76 TheGlitch76 deleted the capabilityregistered-stringnames branch August 11, 2020 16:23
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

3 participants