FoodProperties
Importing the class
If you need to reference this type directly, like when casting an Array, or as a parameter, you will need to import it. Simply add the import at the top of the file.
import crafttweaker.api.food.FoodProperties;
Members
Getter
// FoodProperties.canAlwaysEat as boolmyFoodProperties.canAlwaysEat
Return Type:
bool
static create(nutrition as int, saturation as float, canAlwaysEat as bool, eatSeconds as float) as FoodProperties
// FoodProperties.create(nutrition as int, saturation as float, canAlwaysEat as bool, eatSeconds as float) as FoodProperties;FoodProperties.create(myInt, myFloat, myBool, myFloat);
Parameters:
nutrition: int
Type: int
saturation: float
Type: float
canAlwaysEat: bool
Type: bool
eatSeconds: float
Type: float
Return Type:
FoodProperties
static create(nutrition as int, saturation as float, canAlwaysEat as bool, eatSeconds as float, effects as List<PossibleEffect>) as FoodProperties
// FoodProperties.create(nutrition as int, saturation as float, canAlwaysEat as bool, eatSeconds as float, effects as List<FoodPropertiesPossibleEffect>) as FoodProperties;FoodProperties.create(myInt, myFloat, myBool, myFloat, myList);
Parameters:
nutrition: int
Type: int
saturation: float
Type: float
canAlwaysEat: bool
Type: bool
eatSeconds: float
Type: float
effects: List<FoodPropertiesPossibleEffect>
Type: List<FoodPropertiesPossibleEffect>
Return Type:
FoodProperties
Getter
// FoodProperties.eatSeconds as floatmyFoodProperties.eatSeconds
Return Type:
float
Getter
myFoodProperties.effects
Return Type:
List<FoodPropertiesPossibleEffect>
Getter
// FoodProperties.nutrition as intmyFoodProperties.nutrition
Return Type:
int
Getter
// FoodProperties.saturationModifier as floatmyFoodProperties.saturationModifier
Return Type:
float
withCanAlwaysEat(canAlwaysEat as bool) as FoodProperties
myFoodProperties.withCanAlwaysEat(myBool);
Parameters:
canAlwaysEat: bool
Type: bool
Return Type:
FoodProperties
withEatSeconds(eatSeconds as int) as FoodProperties
myFoodProperties.withEatSeconds(myInt);
Parameters:
eatSeconds: int
Type: int
Return Type:
FoodProperties
withEffect(effect as MobEffectInstance, probability as float) as FoodProperties
myFoodProperties.withEffect(myMobEffectInstance, myFloat);
Parameters:
effect: MobEffectInstance
Type: MobEffectInstance
probability: float
Type: float
Return Type:
FoodProperties
withEffect(effect as PossibleEffect) as FoodProperties
myFoodProperties.withEffect(myPossibleEffect);
Parameters:
effect: FoodPropertiesPossibleEffect
Type: FoodPropertiesPossibleEffect
Return Type:
FoodProperties
withEffects(effects as List<PossibleEffect>) as FoodProperties
myFoodProperties.withEffects(myList);
Parameters:
effects: List<FoodPropertiesPossibleEffect>
Type: List<FoodPropertiesPossibleEffect>
Return Type:
FoodProperties
withNutrition(nutrition as int) as FoodProperties
myFoodProperties.withNutrition(myInt);
Parameters:
nutrition: int
Type: int
Return Type:
FoodProperties
withoutEffect(effect as MobEffect) as FoodProperties
myFoodProperties.withoutEffect(myMobEffect);
Return Type:
FoodProperties
withoutEffect(effect as PossibleEffect) as FoodProperties
myFoodProperties.withoutEffect(myPossibleEffect);
Parameters:
effect: FoodPropertiesPossibleEffect
Type: FoodPropertiesPossibleEffect
Return Type:
FoodProperties
withSaturation(saturation as float) as FoodProperties
myFoodProperties.withSaturation(myFloat);
Parameters:
saturation: float
Type: float
Return Type:
FoodProperties