mirror of
https://github.com/GTNewHorizons/CraftTweaker.git
synced 2026-11-21 12:32:29 +00:00
[Legacy-Up] Start reapplying some global functions
This commit is contained in:
2 files changed
+13
-4
No files matched your search
@@ -19,4 +19,8 @@ public class GlobalFunctions {
|
||||
public static void print(String message) {
|
||||
MineTweakerAPI.logInfo(message);
|
||||
}
|
||||
|
||||
public static boolean isNull(Object any){
|
||||
return any == null;
|
||||
}
|
||||
}
|
||||
@@ -39,11 +39,16 @@ public class GlobalRegistry {
|
||||
|
||||
static {
|
||||
registerGlobal("print", getStaticFunction(GlobalFunctions.class, "print", String.class));
|
||||
registerGlobal("max", getStaticFunction(Math.class, "max", int.class, int.class));
|
||||
registerGlobal("min", getStaticFunction(Math.class, "min", int.class, int.class));
|
||||
registerGlobal("isNull", getStaticFunction(GlobalFunctions.class, "isNull", Object.class));
|
||||
registerGlobal("max", getStaticFunction(Math.class, "max", int.class, int.class));
|
||||
registerGlobal("min", getStaticFunction(Math.class, "min", int.class, int.class));
|
||||
registerGlobal("pow", getStaticFunction(Math.class, "pow", double.class, double.class));
|
||||
}
|
||||
|
||||
private GlobalRegistry() {
|
||||
public static IZenErrorLogger getErrors() {
|
||||
return errors;
|
||||
}
|
||||
|
||||
private GlobalRegistry() {
|
||||
}
|
||||
|
||||
public static void registerGlobal(String name, IZenSymbol symbol) {
|
||||
|
||||
Reference in new issue
Block a user