WolfyScript / viewportl

A Minecraft Inventory GUI framework, designed to easily create reactive GUIs. Based on the well known Signal Reactivity System.
GNU General Public License v3.0
68 stars 12 forks source link

JSON Value Providers & Operators #76

Closed WolfyScript closed 2 years ago

WolfyScript commented 2 years ago

Implemented JSON utilities that allows for more complex and customizable way of providing values in JSON files. Additionally, the Operators allow for boolean evaluations or conditioned value providers.

Value Providers

There are 3 types of provider types. These are Integer, Float, and String. Each of those types has different providers:

Operators

Operators provide a way evaluate values.

BoolOperator

They evaluate to a boolean value.

Logical Operator

They are the usual and, or, not operators, that take one or two BoolOperators (Which allows for more complex chaining) and produce a new boolean output.

Comparison Operator

Those operators always take two ValueProviders of the same type and then evaluates into a boolean value. They are ==, !=, >, <, =>, =<.