mirror of
https://github.com/GTNewHorizons/Angelica.git
synced 2026-11-17 19:15:06 +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
24 lines
488 B
Java
24 lines
488 B
Java
package kroppeb.stareval.function;
|
|
|
|
import kroppeb.stareval.expression.Expression;
|
|
|
|
@FunctionalInterface
|
|
public interface V2FFunction extends TypedFunction {
|
|
float eval();
|
|
|
|
@Override
|
|
default void evaluateTo(Expression[] params, FunctionContext context, FunctionReturn functionReturn) {
|
|
functionReturn.floatReturn = this.eval();
|
|
}
|
|
|
|
@Override
|
|
default Type getReturnType() {
|
|
return Type.Float;
|
|
}
|
|
|
|
@Override
|
|
default Parameter[] getParameters() {
|
|
return new Parameter[]{};
|
|
}
|
|
}
|