Switch some Caption#of to TextComponent#of

This commit is contained in:
dordsor21
2021-11-03 18:33:19 +00:00
parent c4d0a4e921
commit 21b6f582e1
13 changed files with 23 additions and 18 deletions

View File

@ -213,7 +213,7 @@ public class RichMaskParser extends FaweParser<Mask> {
return result;
} catch (Throwable e2) {
e2.printStackTrace();
throw new InputParseException(Caption.of(e2.getMessage()));
throw new InputParseException(TextComponent.of(e2.getMessage()));
}
});
}
@ -227,7 +227,7 @@ public class RichMaskParser extends FaweParser<Mask> {
throw rethrow;
} catch (Throwable e) {
e.printStackTrace();
throw new InputParseException(Caption.of(e.getMessage()), e);
throw new InputParseException(TextComponent.of(e.getMessage()), e);
}
List<Mask> maskUnions = new ArrayList<>();
for (List<Mask> maskList : masks) {

View File

@ -57,7 +57,7 @@ public class LinearPatternParser extends RichParser<Pattern> {
Set<Pattern> patterns = ((RandomPattern) inner).getPatterns();
return new LinearBlockPattern(patterns.toArray(new Pattern[0]));
}
throw new InputParseException(Caption.of("Pattern " + inner.getClass().getSimpleName()
throw new InputParseException(TextComponent.of("Pattern " + inner.getClass().getSimpleName()
+ " cannot be used with " + getPrefix()));
}

View File

@ -94,7 +94,7 @@ public class RandomFullClipboardPatternParser extends RichParser<Pattern> {
}
return new RandomFullClipboardPattern(clipboards, rotate, flip);
} catch (IOException e) {
throw new InputParseException(Caption.of(e.getMessage()), e);
throw new InputParseException(TextComponent.of(e.getMessage()), e);
}
}

View File

@ -175,7 +175,7 @@ public class RichPatternParser extends FaweParser<Pattern> {
return result;
} catch (Throwable e2) {
e2.printStackTrace();
throw new InputParseException(Caption.of(e2.getMessage()));
throw new InputParseException(TextComponent.of(e2.getMessage()));
}
});
}
@ -189,7 +189,7 @@ public class RichPatternParser extends FaweParser<Pattern> {
throw rethrow;
} catch (Throwable e) {
e.printStackTrace();
throw new InputParseException(Caption.of(e.getMessage()), e);
throw new InputParseException(TextComponent.of(e.getMessage()), e);
}
if (patterns.isEmpty()) {
return null;

View File

@ -126,7 +126,7 @@ public class RichTransformParser extends FaweParser<ResettableExtent> {
}
}
} catch (Throwable e) {
throw new InputParseException(Caption.of(e.getMessage()), e);
throw new InputParseException(TextComponent.of(e.getMessage()), e);
}
if (!intersection.isEmpty()) {
if (intersection.size() == 1) {

View File

@ -168,7 +168,7 @@ public class ConsumeBindings extends Bindings {
try {
return getWorldEdit().getBlockFactory().parseFromInput(argument, parserContext);
} catch (NoMatchException e) {
throw new InputParseException(Caption.of(e.getMessage()));
throw new InputParseException(TextComponent.of(e.getMessage()));
}
}