MolangParser

public final class MolangParser

Compiles the Molang subset used by Snowstorm particle files: arithmetic, comparisons, logic, conditionals, null coalescing, variable assignment, return and Bedrock's math.* functions (trigonometry in degrees). A program with ; separators returns the value of its return statement, or 0 without one, as on Bedrock.

Functions

Link copied to clipboard
public static MolangExpression parse(String source)
Link copied to clipboard
public static String returningLastLine(String source)
The program as Blockbench reads it, made explicit for Bedrock.