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
Copy
import crafttweaker.api.food.FoodProperties;

Name: create

Return Type: FoodProperties

ZenScript
Copy
FoodProperties.create(nutrition as int, saturationModifier as float) as FoodProperties
ParameterTypeBeschreibung
Parameter
nutrition
Type
int
Beschreibung
No Description Provided
Parameter
saturationModifier
Type
float
Beschreibung
No Description Provided

Name: addEffect

Return Type: FoodProperties

ZenScript
Copy
FoodProperties.addEffect(effect as MobEffectInstance, probability as float) as FoodProperties
ParameterTypeBeschreibung
Parameter
effect
Type
MobEffectInstance
Beschreibung
No Description Provided
Parameter
probability
Type
float
Beschreibung
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();

Link to getSaturationModifier

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
Copy
FoodProperties.removeEffect(effect as MobEffectInstance) as FoodProperties
ParameterTypeBeschreibung
Parameter
effect
Type
MobEffectInstance
Beschreibung
No Description Provided

Name: setCanAlwaysEat

Return Type: FoodProperties

ZenScript
Copy
FoodProperties.setCanAlwaysEat(canAlwaysEat as boolean) as FoodProperties
ParameterTypeBeschreibung
Parameter
canAlwaysEat
Type
boolean
Beschreibung
No Description Provided

Name: setIsFastFood

Return Type: FoodProperties

ZenScript
Copy
FoodProperties.setIsFastFood(fastFood as boolean) as FoodProperties
ParameterTypeBeschreibung
Parameter
fastFood
Type
boolean
Beschreibung
No Description Provided

Name: setIsMeat

Return Type: FoodProperties

ZenScript
Copy
FoodProperties.setIsMeat(isMeat as boolean) as FoodProperties
ParameterTypeBeschreibung
Parameter
isMeat
Type
boolean
Beschreibung
No Description Provided

Name: setNutrition

Return Type: FoodProperties

ZenScript
Copy
FoodProperties.setNutrition(nutrition as int) as FoodProperties
ParameterTypeBeschreibung
Parameter
nutrition
Type
int
Beschreibung
No Description Provided

Name: setNutrition

Return Type: FoodProperties

ZenScript
Copy
FoodProperties.setNutrition(saturationModifier as float) as FoodProperties
ParameterTypeBeschreibung
Parameter
saturationModifier
Type
float
Beschreibung
No Description Provided
NameTypeHas GetterHas SetterBeschreibung
Name
canAlwaysEat
Type
boolean
Has Getter
true
Has Setter
true
Beschreibung
No Description Provided
Name
effects
Type
stdlib.List<Pair<MobEffectInstance,float?>>
Has Getter
true
Has Setter
false
Beschreibung
No Description Provided
Name
isFastFood
Type
boolean
Has Getter
true
Has Setter
true
Beschreibung
No Description Provided
Name
isMeat
Type
boolean
Has Getter
true
Has Setter
true
Beschreibung
No Description Provided
Name
nutrition
Type
int
Has Getter
true
Has Setter
true
Beschreibung
No Description Provided
Name
saturationModifier
Type
float
Has Getter
true
Has Setter
true
Beschreibung
No Description Provided