FoodPropertiesBuilder

Link to foodpropertiesbuilder

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.api.food.FoodPropertiesBuilder;

Name: of

Return Type: FoodPropertiesBuilder

ZenScript
Copy
// FoodPropertiesBuilder.of() as FoodPropertiesBuilder

FoodPropertiesBuilder.of();
Result TypeIs Implicit
Result Type
FoodProperties
Is Implicit
true

Name: alwaysEdible

Return Type: FoodPropertiesBuilder

ZenScript
Copy
// FoodPropertiesBuilder.alwaysEdible() as FoodPropertiesBuilder

myFoodPropertiesBuilder.alwaysEdible();

Name: build

Return Type: FoodProperties

ZenScript
Copy
// FoodPropertiesBuilder.build() as FoodProperties

myFoodPropertiesBuilder.build();

Name: effect

Return Type: FoodPropertiesBuilder

ZenScript
Copy
FoodPropertiesBuilder.effect(effect as MobEffectInstance, probability as float) as FoodPropertiesBuilder
ParameterType
Parameter
effect
Type
MobEffectInstance
Parameter
probability
Type
float

Name: fast

Return Type: FoodPropertiesBuilder

ZenScript
Copy
// FoodPropertiesBuilder.fast() as FoodPropertiesBuilder

myFoodPropertiesBuilder.fast();

Name: nutrition

Return Type: FoodPropertiesBuilder

ZenScript
Copy
FoodPropertiesBuilder.nutrition(nutrition as int) as FoodPropertiesBuilder
ParameterType
Parameter
nutrition
Type
int

Link to saturationModifier

Name: saturationModifier

Return Type: FoodPropertiesBuilder

ZenScript
Copy
FoodPropertiesBuilder.saturationModifier(saturationModifier as float) as FoodPropertiesBuilder
ParameterType
Parameter
saturationModifier
Type
float