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
// FoodProperties.canAlwaysEat as boolmyFoodProperties.canAlwaysEat
Return Type:
bool
// 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
// FoodProperties.create(nutrition as int, saturation as float, canAlwaysEat as bool, eatSeconds as float, usingConvertsTo as IItemStack) as FoodProperties;FoodProperties.create(myInt, myFloat, myBool, myFloat, myIItemStack);
Parameters:
nutrition: int
Type: int
saturation: float
Type: float
canAlwaysEat: bool
Type: bool
eatSeconds: float
Type: float
usingConvertsTo: IItemStack
Type: IItemStack
Return Type:
FoodProperties
// FoodProperties.create(nutrition as int, saturation as float, canAlwaysEat as bool, eatSeconds as float, usingConvertsTo as IItemStack, effects as List<FoodPropertiesPossibleEffect>) as FoodProperties;FoodProperties.create(myInt, myFloat, myBool, myFloat, myIItemStack, myList);
Parameters:
nutrition: int
Type: int
saturation: float
Type: float
canAlwaysEat: bool
Type: bool
eatSeconds: float
Type: float
usingConvertsTo: IItemStack
Type: IItemStack
effects: List<FoodPropertiesPossibleEffect>
Type: List<FoodPropertiesPossibleEffect>
Return Type:
FoodProperties
// FoodProperties.eatSeconds as floatmyFoodProperties.eatSeconds
Return Type:
float
myFoodProperties.effects
Return Type:
List<FoodPropertiesPossibleEffect>
// FoodProperties.nutrition as intmyFoodProperties.nutrition
Return Type:
int
// FoodProperties.saturationModifier as floatmyFoodProperties.saturationModifier
Return Type:
float
// FoodProperties.usingConvertsTo as IItemStackmyFoodProperties.usingConvertsTo
Return Type:
IItemStack
myFoodProperties.withCanAlwaysEat(myBool);
Parameters:
canAlwaysEat: bool
Type: bool
Return Type:
FoodProperties
myFoodProperties.withEatSeconds(myInt);
Parameters:
eatSeconds: int
Type: int
Return Type:
FoodProperties
myFoodProperties.withEffect(myMobEffectInstance, myFloat);
Parameters:
effect: MobEffectInstance
Type: MobEffectInstance
probability: float
Type: float
Return Type:
FoodProperties
myFoodProperties.withEffect(myPossibleEffect);
Parameters:
effect: FoodPropertiesPossibleEffect
Type: FoodPropertiesPossibleEffect
Return Type:
FoodProperties
myFoodProperties.withEffects(myList);
Parameters:
effects: List<FoodPropertiesPossibleEffect>
Type: List<FoodPropertiesPossibleEffect>
Return Type:
FoodProperties
myFoodProperties.withNutrition(myInt);
Parameters:
nutrition: int
Type: int
Return Type:
FoodProperties
myFoodProperties.withoutEffect(myMobEffect);
Return Type:
FoodProperties
myFoodProperties.withoutEffect(myPossibleEffect);
Parameters:
effect: FoodPropertiesPossibleEffect
Type: FoodPropertiesPossibleEffect
Return Type:
FoodProperties
myFoodProperties.withSaturation(myFloat);
Parameters:
saturation: float
Type: float
Return Type:
FoodProperties
myFoodProperties.withUsingConvertsTo(myIItemStack);
Parameters:
usingConvertsTo: IItemStack
Type: IItemStack
Return Type:
FoodProperties