Skip to content
This repository has been archived by the owner on Jul 21, 2024. It is now read-only.

Commit

Permalink
Fixed UltimateKit NMS and possibly more #527
Browse files Browse the repository at this point in the history
  • Loading branch information
Hexeption committed Mar 23, 2022
1 parent 4b93410 commit 32e7e1a
Show file tree
Hide file tree
Showing 2 changed files with 1 addition and 95 deletions.

This file was deleted.

Original file line number Diff line number Diff line change
Expand Up @@ -42,11 +42,7 @@ public Set<String> getParents(String className) {
}

protected Set<String> fineParents(String className, boolean remap) {
if (className.startsWith("net/minecraft/")) {
return fineNMSParents(className, remap);
} else {
return findNormalParents(className, remap);
}
return fineNMSParents(className, remap);
}

protected Set<String> fineNMSParents(String className, boolean remap) {
Expand All @@ -71,27 +67,4 @@ protected Set<String> fineNMSParents(String className, boolean remap) {
return parents;
}

protected Set<String> findNormalParents(String className, boolean remap) {
ClassNode cn = MagmaClassRepo.getInstance().findClass(className);
if (cn == null) {
if (!remap) {
return null;
}
String remapClassName = RemappingUtils.map(className);
if (Objects.equals(remapClassName, className)) {
return null;
}
return fineParents(remapClassName, false);
}
Set<String> parents = new HashSet<>();
if (cn.superName != null) {
parents.add(RemappingUtils.reverseMap(cn.superName));
}
if (cn.interfaces != null) {
for (String anInterface : cn.interfaces) {
parents.add(RemappingUtils.reverseMap(anInterface));
}
}
return parents.isEmpty() ? null : parents;
}
}

0 comments on commit 32e7e1a

Please sign in to comment.