-
-
Notifications
You must be signed in to change notification settings - Fork 175
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
Capability contains key check #1510
Comments
The way I described it may not be the best way to have something like this, since the provider may not actually add the capability to the given block. For my use case, I can use a default |
For whatever reason we supply this functionality from within the |
Please explain why you would want to query whether a provider exists. This is generally a bad pattern. |
I have a machine that connects multiple machines together and there's some requirements a machine needs to fill to be acceptable for it. It needs to have one of a few different types of capabilities ( |
There is no guarantee at all that the presence of a provider indicates the presence of a capability. A default |
It would be nice to be able to check if a capability exists for a given key. The only ways to do it right now is with reflection or a mixin. For example, in
BlockCapability
a method to check there is a provider registered for aBlock
(this would apply to all capabilities).My use case for this is to check if an
Item
(from anItemStack
), specifically aBlockItem
, has a capability registered for theBlock
.The text was updated successfully, but these errors were encountered: