Home Commands Examples Getting Started With Scripts Global Keywords
BracketDumpers BracketHandlers BracketValidators ResourceLocationBracketHandler

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.

script.zs
import crafttweaker.api.food.FoodProperties;

Members

addEffect(effect as MobEffectInstance, probability as float) as FoodProperties
script.zs
// FoodProperties.addEffect(effect as MobEffectInstance, probability as float) as FoodProperties;
myFoodProperties.addEffect(myMobEffectInstance, myFloat);

Parameters:

probability Type: float

Return Type: FoodProperties

Getter
script.zs
// FoodProperties.canAlwaysEat as bool
myFoodProperties.canAlwaysEat

Return Type: bool

Setter
script.zs
// FoodProperties.canAlwaysEat = (canAlwaysEat as bool);
myFoodProperties.canAlwaysEat = myBool;

Parameters:

canAlwaysEat Type: bool
canAlwaysEat() as bool
script.zs
// FoodProperties.canAlwaysEat() as bool;
myFoodProperties.canAlwaysEat();

Return Type: bool

canAlwaysEat(canAlwaysEat as bool) as FoodProperties
script.zs
// FoodProperties.canAlwaysEat(canAlwaysEat as bool) as FoodProperties;
myFoodProperties.canAlwaysEat(myBool);

Parameters:

canAlwaysEat Type: bool

Return Type: FoodProperties

static create(nutrition as int, saturationModifier as float) as FoodProperties
script.zs
// FoodProperties.create(nutrition as int, saturationModifier as float) as FoodProperties;
FoodProperties.create(myInt, myFloat);

Parameters:

nutrition Type: int
saturationModifier Type: float

Return Type: FoodProperties

Getter
script.zs
// FoodProperties.effects as List<Pair<MobEffectInstance, Float>>
myFoodProperties.effects

Return Type: List<Pair<MobEffectInstance, Float>>

effects() as List<Pair<MobEffectInstance, Float>>
script.zs
// FoodProperties.effects() as List<Pair<MobEffectInstance, Float>>;
myFoodProperties.effects();

Return Type: List<Pair<MobEffectInstance, Float>>

Getter
script.zs
// FoodProperties.isFastFood as bool
myFoodProperties.isFastFood

Return Type: bool

Setter
script.zs
// FoodProperties.isFastFood = (fastFood as bool);
myFoodProperties.isFastFood = myBool;

Parameters:

fastFood Type: bool
isFastFood() as bool
script.zs
// FoodProperties.isFastFood() as bool;
myFoodProperties.isFastFood();

Return Type: bool

isFastFood(fastFood as bool) as FoodProperties
script.zs
// FoodProperties.isFastFood(fastFood as bool) as FoodProperties;
myFoodProperties.isFastFood(myBool);

Parameters:

fastFood Type: bool

Return Type: FoodProperties

Getter
script.zs
// FoodProperties.isMeat as bool
myFoodProperties.isMeat

Return Type: bool

Setter
script.zs
// FoodProperties.isMeat = (isMeat as bool);
myFoodProperties.isMeat = myBool;

Parameters:

isMeat Type: bool
isMeat() as bool
script.zs
// FoodProperties.isMeat() as bool;
myFoodProperties.isMeat();

Return Type: bool

isMeat(isMeat as bool) as FoodProperties
script.zs
// FoodProperties.isMeat(isMeat as bool) as FoodProperties;
myFoodProperties.isMeat(myBool);

Parameters:

isMeat Type: bool

Return Type: FoodProperties

Getter
script.zs
// FoodProperties.nutrition as int
myFoodProperties.nutrition

Return Type: int

Setter
script.zs
// FoodProperties.nutrition = (nutrition as int);
myFoodProperties.nutrition = myInt;

Parameters:

nutrition Type: int
nutrition() as int
script.zs
// FoodProperties.nutrition() as int;
myFoodProperties.nutrition();

Return Type: int

nutrition(nutrition as int) as FoodProperties
script.zs
// FoodProperties.nutrition(nutrition as int) as FoodProperties;
myFoodProperties.nutrition(myInt);

Parameters:

nutrition Type: int

Return Type: FoodProperties

removeEffect(effect as MobEffectInstance) as FoodProperties
script.zs
// FoodProperties.removeEffect(effect as MobEffectInstance) as FoodProperties;
myFoodProperties.removeEffect(myMobEffectInstance);

Parameters:

Return Type: FoodProperties

removeEffect(effect as MobEffect) as FoodProperties
script.zs
// FoodProperties.removeEffect(effect as MobEffect) as FoodProperties;
myFoodProperties.removeEffect(myMobEffect);

Parameters:

effect Type: MobEffect

Return Type: FoodProperties

Getter
script.zs
// FoodProperties.saturationModifier as float
myFoodProperties.saturationModifier

Return Type: float

Setter
script.zs
// FoodProperties.saturationModifier = (saturationModifier as float);
myFoodProperties.saturationModifier = myFloat;

Parameters:

saturationModifier Type: float
saturationModifier() as float
script.zs
// FoodProperties.saturationModifier() as float;
myFoodProperties.saturationModifier();

Return Type: float

saturationModifier(saturationModifier as float) as FoodProperties
script.zs
// FoodProperties.saturationModifier(saturationModifier as float) as FoodProperties;
myFoodProperties.saturationModifier(myFloat);

Parameters:

saturationModifier Type: float

Return Type: FoodProperties