Fix some deprecations

This commit is contained in:
Mumfrey committed 2021-03-01 23:40:24 +00:00
1 parent 4e4c72ee22
commit 088e8bcf61
6 files changed
+5 -6

No files matched your search

@@ -230,7 +230,7 @@ public abstract class MixinServiceAbstract implements IMixinService {
try {
@SuppressWarnings("unchecked")
Class<IMixinPlatformAgent> agentClass = (Class<IMixinPlatformAgent>)this.getClassProvider().findClass(agentClassName, false);
IMixinPlatformAgent agent = agentClass.newInstance();
IMixinPlatformAgent agent = agentClass.getDeclaredConstructor().newInstance();
if (agent instanceof IMixinPlatformServiceAgent) {
this.serviceAgents.add((IMixinPlatformServiceAgent)agent);
}