FoodProperties
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.
import crafttweaker.api.food.FoodProperties;
Static Methods
Return Type: FoodProperties
FoodProperties.create(nutrition as int, saturationModifier as float) as FoodProperties
Parameter | Type | Description |
---|---|---|
Parameter nutrition | Type int | Description No Description Provided |
Parameter saturationModifier | Type float | Description No Description Provided |
Methods
Return Type: FoodProperties
FoodProperties.addEffect(effect as MobEffectInstance, probability as float) as FoodProperties
Parameter | Type | Description |
---|---|---|
Parameter effect | Type MobEffectInstance | Description No Description Provided |
Parameter probability | Type float | Description No Description Provided |
Return Type: boolean
// FoodProperties.canAlwaysEat() as boolean
myFoodProperties.canAlwaysEat();
Return Type: stdlib.List<Pair<MobEffectInstance,float?>>
// FoodProperties.getEffects() as stdlib.List<Pair<MobEffectInstance,float?>>
myFoodProperties.getEffects();
Return Type: int
// FoodProperties.getNutrition() as int
myFoodProperties.getNutrition();
Return Type: float
// FoodProperties.getSaturationModifier() as float
myFoodProperties.getSaturationModifier();
Return Type: boolean
// FoodProperties.isFastFood() as boolean
myFoodProperties.isFastFood();
Return Type: boolean
// FoodProperties.isMeat() as boolean
myFoodProperties.isMeat();
Return Type: FoodProperties
FoodProperties.removeEffect(effect as MobEffectInstance) as FoodProperties
Parameter | Type | Description |
---|---|---|
Parameter effect | Type MobEffectInstance | Description No Description Provided |
Return Type: FoodProperties
FoodProperties.setCanAlwaysEat(canAlwaysEat as boolean) as FoodProperties
Parameter | Type | Description |
---|---|---|
Parameter canAlwaysEat | Type boolean | Description No Description Provided |
Return Type: FoodProperties
FoodProperties.setIsFastFood(fastFood as boolean) as FoodProperties
Parameter | Type | Description |
---|---|---|
Parameter fastFood | Type boolean | Description No Description Provided |
Return Type: FoodProperties
FoodProperties.setIsMeat(isMeat as boolean) as FoodProperties
Parameter | Type | Description |
---|---|---|
Parameter isMeat | Type boolean | Description No Description Provided |
Return Type: FoodProperties
FoodProperties.setNutrition(nutrition as int) as FoodProperties
Parameter | Type | Description |
---|---|---|
Parameter nutrition | Type int | Description No Description Provided |
Return Type: FoodProperties
FoodProperties.setNutrition(saturationModifier as float) as FoodProperties
Parameter | Type | Description |
---|---|---|
Parameter saturationModifier | Type float | Description No Description Provided |
Properties
Name | Type | Has Getter | Has Setter | Description |
---|---|---|---|---|
Name canAlwaysEat | Type boolean | Has Getter true | Has Setter true | Description No Description Provided |
Name effects | Type stdlib.List<Pair<MobEffectInstance,float?>> | Has Getter true | Has Setter false | Description No Description Provided |
Name isFastFood | Type boolean | Has Getter true | Has Setter true | Description No Description Provided |
Name isMeat | Type boolean | Has Getter true | Has Setter true | Description No Description Provided |
Name nutrition | Type int | Has Getter true | Has Setter true | Description No Description Provided |
Name saturationModifier | Type float | Has Getter true | Has Setter true | Description No Description Provided |