Package net.citizensnpcs.npc.ai.tree
Class MolangEngine
java.lang.Object
net.citizensnpcs.npc.ai.tree.MolangEngine
- All Implemented Interfaces:
ExpressionEngine
Molang expression engine implementation using the Mocha library.
-
Nested Class Summary
Nested ClassesModifier and TypeClassDescriptionstatic classWrapper for passing ItemStack through Mocha expressions.Nested classes/interfaces inherited from interface net.citizensnpcs.api.ai.tree.expr.ExpressionEngine
ExpressionEngine.ExpressionCompileException -
Constructor Summary
Constructors -
Method Summary
Modifier and TypeMethodDescriptionCompiles an expression string into a reusable compiled form.getName()
-
Constructor Details
-
MolangEngine
public MolangEngine()
-
-
Method Details
-
compile
public CompiledExpression compile(String expression) throws ExpressionEngine.ExpressionCompileException Description copied from interface:ExpressionEngineCompiles an expression string into a reusable compiled form.- Specified by:
compilein interfaceExpressionEngine- Parameters:
expression- the expression text- Returns:
- a compiled expression that can be evaluated multiple times
- Throws:
ExpressionEngine.ExpressionCompileException
-
getName
- Specified by:
getNamein interfaceExpressionEngine
-