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 Copyimport crafttweaker.api.food.FoodPropertiesBuilder;
Static Methods
Link to static-methods
Name: of
Return Type: FoodPropertiesBuilder
ZenScript Copy// FoodPropertiesBuilder.of() as FoodPropertiesBuilder
FoodPropertiesBuilder.of();
Casters
Link to casters
Result Type | Is Implicit |
---|---|
Result Type FoodProperties | Is Implicit true |
Methods
Link to methods
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 CopyFoodPropertiesBuilder.effect(effect as MobEffectInstance, probability as float) as FoodPropertiesBuilder
Parameter | Type |
---|---|
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 CopyFoodPropertiesBuilder.nutrition(nutrition as int) as FoodPropertiesBuilder
Parameter | Type |
---|---|
Parameter nutrition | Type int |
Name: saturationModifier
Return Type: FoodPropertiesBuilder
ZenScript CopyFoodPropertiesBuilder.saturationModifier(saturationModifier as float) as FoodPropertiesBuilder
Parameter | Type |
---|---|
Parameter saturationModifier | Type float |