FoodProperties
Link to foodproperties
Importare la Classe
Link to importare-la-classe
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
Parametro | Tipo | Descrizione |
---|---|---|
Parametro nutrition | Tipo int | Descrizione No Description Provided |
Parametro saturationModifier | Tipo float | Descrizione No Description Provided |
Metodi
Link to metodi
Name: addEffect
Return Type: FoodProperties
ZenScript CopyFoodProperties.addEffect(effect as MobEffectInstance, probability as float) as FoodProperties
Parametro | Tipo | Descrizione |
---|---|---|
Parametro effect | Tipo MobEffectInstance | Descrizione No Description Provided |
Parametro probability | Tipo float | Descrizione No Description Provided |
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 MobEffectInstance) as FoodProperties
Parametro | Tipo | Descrizione |
---|---|---|
Parametro effect | Tipo MobEffectInstance | Descrizione No Description Provided |
Name: setCanAlwaysEat
Return Type: FoodProperties
ZenScript CopyFoodProperties.setCanAlwaysEat(canAlwaysEat as boolean) as FoodProperties
Parametro | Tipo | Descrizione |
---|---|---|
Parametro canAlwaysEat | Tipo boolean | Descrizione No Description Provided |
Name: setIsFastFood
Return Type: FoodProperties
ZenScript CopyFoodProperties.setIsFastFood(fastFood as boolean) as FoodProperties
Parametro | Tipo | Descrizione |
---|---|---|
Parametro fastFood | Tipo boolean | Descrizione No Description Provided |
Name: setIsMeat
Return Type: FoodProperties
ZenScript CopyFoodProperties.setIsMeat(isMeat as boolean) as FoodProperties
Parametro | Tipo | Descrizione |
---|---|---|
Parametro isMeat | Tipo boolean | Descrizione No Description Provided |
Name: setNutrition
Return Type: FoodProperties
ZenScript CopyFoodProperties.setNutrition(nutrition as int) as FoodProperties
Parametro | Tipo | Descrizione |
---|---|---|
Parametro nutrition | Tipo int | Descrizione No Description Provided |
Name: setNutrition
Return Type: FoodProperties
ZenScript CopyFoodProperties.setNutrition(saturationModifier as float) as FoodProperties
Parametro | Tipo | Descrizione |
---|---|---|
Parametro saturationModifier | Tipo float | Descrizione No Description Provided |
Proprietà
Link to proprietà
Nome | Tipo | Ha Getter | Ha Setter | Descrizione |
---|---|---|---|---|
Nome canAlwaysEat | Tipo boolean | Ha Getter sì | Ha Setter sì | Descrizione No Description Provided |
Nome effects | Tipo stdlib.List<Pair<MobEffectInstance,float?>> | Ha Getter sì | Ha Setter no | Descrizione No Description Provided |
Nome isFastFood | Tipo boolean | Ha Getter sì | Ha Setter sì | Descrizione No Description Provided |
Nome isMeat | Tipo boolean | Ha Getter sì | Ha Setter sì | Descrizione No Description Provided |
Nome nutrition | Tipo int | Ha Getter sì | Ha Setter sì | Descrizione No Description Provided |
Nome saturationModifier | Tipo float | Ha Getter sì | Ha Setter sì | Descrizione No Description Provided |