mirror of
https://github.com/GTNewHorizons/Angelica.git
synced 2026-11-15 09:44:52 +00:00
* wip backport of custom uniforms * Functioning custom uniforms maybe? * Workon separating dynamic/non-dynamic uniforms and making variables available to custom uniforms (currently the JVM dies horribly) * wip * It no longer crashes horrifically * star imports
27 lines
619 B
Java
27 lines
619 B
Java
package kroppeb.stareval.function;
|
|
|
|
import kroppeb.stareval.expression.Expression;
|
|
|
|
@FunctionalInterface
|
|
public interface B2BFunction extends TypedFunction {
|
|
boolean eval(boolean a);
|
|
|
|
@Override
|
|
default void evaluateTo(Expression[] params, FunctionContext context, FunctionReturn functionReturn) {
|
|
params[0].evaluateTo(context, functionReturn);
|
|
boolean a = functionReturn.booleanReturn;
|
|
|
|
functionReturn.booleanReturn = this.eval(a);
|
|
}
|
|
|
|
@Override
|
|
default Type getReturnType() {
|
|
return Type.Boolean;
|
|
}
|
|
|
|
@Override
|
|
default Parameter[] getParameters() {
|
|
return new Parameter[]{Type.BooleanParameter};
|
|
}
|
|
}
|