Skip to content

Commit

Permalink
feat(api): number conversion functional interfaces
Browse files Browse the repository at this point in the history
DoubleToDoubleFunction, IntToIntFunction
  • Loading branch information
WakelessSloth56 committed Sep 16, 2022
1 parent 52e56f4 commit c034c8d
Show file tree
Hide file tree
Showing 4 changed files with 18 additions and 2 deletions.
@@ -0,0 +1,8 @@
package org.auioc.mcmod.arnicalib.api.java.function;

@FunctionalInterface
public interface DoubleToDoubleFunction {

double applyAsDouble(double value);

}
@@ -0,0 +1,8 @@
package org.auioc.mcmod.arnicalib.api.java.function;

@FunctionalInterface
public interface IntToIntFunction {

int applyAsInt(int value);

}
Expand Up @@ -3,6 +3,6 @@
@FunctionalInterface
public interface StringToStringFunction {

String apply(String t);
String applyAsString(String t);

}
Expand Up @@ -32,7 +32,7 @@ public MutableComponent create(Component message, boolean withPrefix) {
}

public MutableComponent create(String key, Object[] args, boolean withPrefix) {
return create(TextUtils.translatable(this.i18n.apply(key), args), withPrefix);
return create(TextUtils.translatable(this.i18n.applyAsString(key), args), withPrefix);
}

@Deprecated
Expand Down

0 comments on commit c034c8d

Please sign in to comment.