IReductionFunction

Link to ireductionfunction

Importing the class

Link to importing-the-class

It might be required for you to import the package if you encounter any issues (like casting an Array), so better be safe than sorry and add the import at the very top of the file.

ZenScript
Copy
import crafttweaker.neoforge.api.world.damage.IReductionFunction;

Name: of

Return Type: IReductionFunction

ZenScript
Copy
IReductionFunction.of(func as BiFunction<DamageContainer,float?,float?>) as IReductionFunction
ParameterType
Parameter
func
Type
BiFunction<DamageContainer,float?,float?>

Name: modify

Return Type: float

ZenScript
Copy
IReductionFunction.modify(container as DamageContainer, reductionIn as float) as float
ParameterType
Parameter
container
Type
DamageContainer
Parameter
reductionIn
Type
float