add my super cool rate algorithm to the API
This commit is contained in:
parent
5b75a2addb
commit
82bda997cb
|
@ -202,6 +202,18 @@ public class ModAPI {
|
||||||
getModAPI().setCallbackVoidWithDataArg("displayToChat", (BaseData params) -> {
|
getModAPI().setCallbackVoidWithDataArg("displayToChat", (BaseData params) -> {
|
||||||
mc.ingameGUI.getChatGUI().printChatMessage(new ChatComponentText(params.getString("msg")));
|
mc.ingameGUI.getChatGUI().printChatMessage(new ChatComponentText(params.getString("msg")));
|
||||||
});
|
});
|
||||||
|
getModAPI().setCallbackStringWithDataArg("rate", (BaseData params) -> {
|
||||||
|
int hash = 0;
|
||||||
|
int counterRate = 0;
|
||||||
|
|
||||||
|
for (i < params.getString('string').length(); i++) {
|
||||||
|
hash = (hash << 5) - hash + params.getString('string').codePointAt();
|
||||||
|
}
|
||||||
|
|
||||||
|
String res = (Math.abs(hash) % 100) + 1;
|
||||||
|
|
||||||
|
return res;
|
||||||
|
});
|
||||||
getModAPI().setCallbackStringWithDataArg("uwuify", (BaseData params) -> {
|
getModAPI().setCallbackStringWithDataArg("uwuify", (BaseData params) -> {
|
||||||
return UwUAPI.uwuify(params.getString("string"));
|
return UwUAPI.uwuify(params.getString("string"));
|
||||||
});
|
});
|
||||||
|
|
Loading…
Reference in New Issue