mirror of
https://github.com/MinecraftForge/MinecraftForge.git
synced 2026-11-18 11:29:15 +00:00
Deprecate passing a class to CapabilityManager::register (#4574)
This commit is contained in:
1 parent
622c17ff04
commit
14a7d66024
5 files changed
+9
-5
No files matched your search
@@ -49,7 +49,11 @@ public enum CapabilityManager
|
||||
* @param type The Interface to be registered
|
||||
* @param storage A default implementation of the storage handler.
|
||||
* @param implementation A default implementation of the interface.
|
||||
* @deprecated Use the overload that takes a factory instead of a class.
|
||||
* You can easily do this by passing a constructor reference
|
||||
* (MyImpl::new instead of MyImpl.class). TODO remove in 1.13.
|
||||
*/
|
||||
@Deprecated
|
||||
public <T> void register(Class<T> type, Capability.IStorage<T> storage, final Class<? extends T> implementation)
|
||||
{
|
||||
Preconditions.checkArgument(implementation != null, "Attempted to register a capability with no default implementation");
|
||||
@@ -173,4 +177,4 @@ public enum CapabilityManager
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
Reference in new issue
Block a user