Told Proguard not to touch things it doesn't understand
This commit is contained in:
parent
d54e846f91
commit
90fb17b89f
5
scripts/proguard.pro
vendored
5
scripts/proguard.pro
vendored
@ -17,6 +17,11 @@
|
||||
|
||||
-keep class baritone.api.** { *; } # this is the keep api
|
||||
|
||||
# Proguard does not know the commands framework better than I do
|
||||
# It needs its empty constructors and simple names to work correctly
|
||||
-keep class baritone.api.utils.command.** { *; }
|
||||
-keepclasseswithmembernames class baritone.api.utils.command.** { *; }
|
||||
|
||||
# service provider needs these class names
|
||||
-keep class baritone.BaritoneProvider
|
||||
-keep class baritone.api.IBaritoneProvider
|
||||
|
@ -63,6 +63,7 @@ public class CommandUnhandledException extends CommandErrorMessageException {
|
||||
|
||||
// line = line.replaceFirst("\\(([^)]+)\\)$", "\n\t . $1");
|
||||
line = line.replaceFirst("\\([^:]+:(\\d+)\\)$", ":$1");
|
||||
line = line.replaceFirst("\\(Unknown Source\\)$", "");
|
||||
lines.set(i, line);
|
||||
}
|
||||
}
|
||||
|
@ -214,9 +214,9 @@ public class ArgConsumer {
|
||||
public <T extends IDatatype> T getDatatype(Class<T> datatype) {
|
||||
try {
|
||||
return datatype.getConstructor(ArgConsumer.class).newInstance(this);
|
||||
} catch (RuntimeException e) {
|
||||
} catch (InvocationTargetException e) {
|
||||
throw new CommandInvalidTypeException(has() ? peek() : consumed(), datatype.getSimpleName());
|
||||
} catch (NoSuchMethodException | IllegalAccessException | InstantiationException | InvocationTargetException e) {
|
||||
} catch (NoSuchMethodException | IllegalAccessException | InstantiationException e) {
|
||||
throw new CommandUnhandledException(e);
|
||||
}
|
||||
}
|
||||
|
Loading…
x
Reference in New Issue
Block a user