Add backwards compatibility for 1.14

This commit is contained in:
libraryaddict
2020-02-06 12:15:20 +13:00
parent 7661635eb9
commit 9656ed4249
15 changed files with 283 additions and 65 deletions

View File

@@ -17,7 +17,8 @@ public class TranslateFiller {
// Fill the configs
for (ParamInfo info : ParamInfoManager.getParamInfos()) {
TranslateType.DISGUISE_OPTIONS_PARAMETERS.save(info.getRawName(), "A disguise option name, has description " + info.getDescription());
TranslateType.DISGUISE_OPTIONS_PARAMETERS
.save(info.getRawName(), "A disguise option name, has description " + info.getDescription());
if (!info.getRawName().equals(info.getRawDescriptiveName())) {
TranslateType.DISGUISE_OPTIONS_PARAMETERS
@@ -51,6 +52,10 @@ public class TranslateFiller {
TranslateType.DISGUISES.save(StringUtils.join(split, " "), "Name for the " + type.name() + " disguise");
if (type.getEntityType() == null) {
continue;
}
for (Method method : ParamInfoManager.getDisguiseWatcherMethods(type.getWatcherClass())) {
Class para = method.getParameterTypes()[0];
String className = method.getDeclaringClass().getSimpleName().replace("Watcher", "");