FoodProperties
Link to foodproperties
Diese Klasse importieren
Link to diese-klasse-importieren
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.FoodProperties;
Static Methods
Link to static-methods
Name: create
Return Type: FoodProperties
ZenScript CopyFoodProperties.create(nutrition as int, saturationModifier as float) as FoodProperties
Parameter | Type |
---|---|
Parameter nutrition | Type int |
Parameter saturationModifier | Type float |
Methoden
Link to methoden
Name: addEffect
Return Type: FoodProperties
ZenScript CopyFoodProperties.addEffect(effect as MobEffectInstance, probability as float) as FoodProperties
Parameter | Type |
---|---|
Parameter effect | Type MobEffectInstance |
Parameter probability | Type float |
Name: canAlwaysEat
Return Type: boolean
ZenScript Copy// FoodProperties.canAlwaysEat() as boolean
myFoodProperties.canAlwaysEat();
Name: getEffects
Return Type: stdlib.List<Pair<MobEffectInstance,float?>>
ZenScript Copy// FoodProperties.getEffects() as stdlib.List<Pair<MobEffectInstance,float?>>
myFoodProperties.getEffects();
Name: getNutrition
Return Type: int
ZenScript Copy// FoodProperties.getNutrition() as int
myFoodProperties.getNutrition();
Name: getSaturationModifier
Return Type: float
ZenScript Copy// FoodProperties.getSaturationModifier() as float
myFoodProperties.getSaturationModifier();
Name: isFastFood
Return Type: boolean
ZenScript Copy// FoodProperties.isFastFood() as boolean
myFoodProperties.isFastFood();
Name: isMeat
Return Type: boolean
ZenScript Copy// FoodProperties.isMeat() as boolean
myFoodProperties.isMeat();
Name: removeEffect
Return Type: FoodProperties
ZenScript CopyFoodProperties.removeEffect(effect as MobEffect) as FoodProperties
Parameter | Type |
---|---|
Parameter effect | Type MobEffect |
Name: removeEffect
Return Type: FoodProperties
ZenScript CopyFoodProperties.removeEffect(effect as MobEffectInstance) as FoodProperties
Parameter | Type |
---|---|
Parameter effect | Type MobEffectInstance |
Name: setCanAlwaysEat
Return Type: FoodProperties
ZenScript CopyFoodProperties.setCanAlwaysEat(canAlwaysEat as boolean) as FoodProperties
Parameter | Type |
---|---|
Parameter canAlwaysEat | Type boolean |
Name: setIsFastFood
Return Type: FoodProperties
ZenScript CopyFoodProperties.setIsFastFood(fastFood as boolean) as FoodProperties
Parameter | Type |
---|---|
Parameter fastFood | Type boolean |
Name: setIsMeat
Return Type: FoodProperties
ZenScript CopyFoodProperties.setIsMeat(isMeat as boolean) as FoodProperties
Parameter | Type |
---|---|
Parameter isMeat | Type boolean |
Name: setNutrition
Return Type: FoodProperties
ZenScript CopyFoodProperties.setNutrition(nutrition as int) as FoodProperties
Parameter | Type |
---|---|
Parameter nutrition | Type int |
Name: setSaturationModifier
Return Type: FoodProperties
ZenScript CopyFoodProperties.setSaturationModifier(saturationModifier as float) as FoodProperties
Parameter | Type |
---|---|
Parameter saturationModifier | Type float |
Properties
Link to properties
Name | Type | Has Getter | Has Setter |
---|---|---|---|
Name canAlwaysEat | Type boolean | Has Getter true | Has Setter true |
Name effects | Type stdlib.List<Pair<MobEffectInstance,float?>> | Has Getter true | Has Setter false |
Name isFastFood | Type boolean | Has Getter true | Has Setter true |
Name isMeat | Type boolean | Has Getter true | Has Setter true |
Name nutrition | Type int | Has Getter true | Has Setter true |
Name saturationModifier | Type float | Has Getter true | Has Setter true |