FoodProperties
Link to foodproperties
Importing the class
Link to 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.
ZenScript Copyimport crafttweaker.api.food.FoodProperties;
Extending Record
Link to extending-record
FoodProperties extends Record. That means all methods available in Record are also available in FoodProperties
Static Methods
Link to static-methods
Name: create
Return Type: FoodProperties
ZenScript CopyFoodProperties.create(nutrition as int, saturation as float, canAlwaysEat as boolean, eatSeconds as float) as FoodProperties
Parameter | Type |
---|---|
Parameter nutrition | Type int |
Parameter saturation | Type float |
Parameter canAlwaysEat | Type boolean |
Parameter eatSeconds | Type float |
Name: create
Return Type: FoodProperties
ZenScript CopyFoodProperties.create(nutrition as int, saturation as float, canAlwaysEat as boolean, eatSeconds as float, usingConvertsTo as IItemStack) as FoodProperties
Parameter | Type |
---|---|
Parameter nutrition | Type int |
Parameter saturation | Type float |
Parameter canAlwaysEat | Type boolean |
Parameter eatSeconds | Type float |
Parameter usingConvertsTo | Type IItemStack |
Name: create
Return Type: FoodProperties
ZenScript CopyFoodProperties.create(nutrition as int, saturation as float, canAlwaysEat as boolean, eatSeconds as float, usingConvertsTo as IItemStack, effects as stdlib.List<FoodPropertiesPossibleEffect>) as FoodProperties
Parameter | Type |
---|---|
Parameter nutrition | Type int |
Parameter saturation | Type float |
Parameter canAlwaysEat | Type boolean |
Parameter eatSeconds | Type float |
Parameter usingConvertsTo | Type IItemStack |
Parameter effects | Type stdlib.List<FoodPropertiesPossibleEffect> |
Methods
Link to methods
Name: withCanAlwaysEat
Return Type: FoodProperties
ZenScript CopyFoodProperties.withCanAlwaysEat(canAlwaysEat as boolean) as FoodProperties
Parameter | Type |
---|---|
Parameter canAlwaysEat | Type boolean |
Name: withEatSeconds
Return Type: FoodProperties
ZenScript CopyFoodProperties.withEatSeconds(eatSeconds as int) as FoodProperties
Parameter | Type |
---|---|
Parameter eatSeconds | Type int |
Name: withEffect
Return Type: FoodProperties
ZenScript CopyFoodProperties.withEffect(effect as FoodPropertiesPossibleEffect) as FoodProperties
Parameter | Type |
---|---|
Parameter effect | Type FoodPropertiesPossibleEffect |
Name: withEffect
Return Type: FoodProperties
ZenScript CopyFoodProperties.withEffect(effect as MobEffectInstance, probability as float) as FoodProperties
Parameter | Type |
---|---|
Parameter effect | Type MobEffectInstance |
Parameter probability | Type float |
Name: withEffects
Return Type: FoodProperties
ZenScript CopyFoodProperties.withEffects(effects as stdlib.List<FoodPropertiesPossibleEffect>) as FoodProperties
Parameter | Type |
---|---|
Parameter effects | Type stdlib.List<FoodPropertiesPossibleEffect> |
Name: withNutrition
Return Type: FoodProperties
ZenScript CopyFoodProperties.withNutrition(nutrition as int) as FoodProperties
Parameter | Type |
---|---|
Parameter nutrition | Type int |
Name: withSaturation
Return Type: FoodProperties
ZenScript CopyFoodProperties.withSaturation(saturation as float) as FoodProperties
Parameter | Type |
---|---|
Parameter saturation | Type float |
Name: withUsingConvertsTo
Return Type: FoodProperties
ZenScript CopyFoodProperties.withUsingConvertsTo(usingConvertsTo as IItemStack) as FoodProperties
Parameter | Type |
---|---|
Parameter usingConvertsTo | Type IItemStack |
Name: withoutEffect
Return Type: FoodProperties
ZenScript CopyFoodProperties.withoutEffect(effect as FoodPropertiesPossibleEffect) as FoodProperties
Parameter | Type |
---|---|
Parameter effect | Type FoodPropertiesPossibleEffect |
Name: withoutEffect
Return Type: FoodProperties
ZenScript CopyFoodProperties.withoutEffect(effect as MobEffect) as FoodProperties
Parameter | Type |
---|---|
Parameter effect | Type MobEffect |
Properties
Link to properties
Name | Type | Has Getter | Has Setter |
---|---|---|---|
Name canAlwaysEat | Type boolean | Has Getter true | Has Setter false |
Name eatSeconds | Type float | Has Getter true | Has Setter false |
Name effects | Type stdlib.List<FoodPropertiesPossibleEffect> | Has Getter true | Has Setter false |
Name nutrition | Type int | Has Getter true | Has Setter false |
Name saturationModifier | Type float | Has Getter true | Has Setter false |
Name usingConvertsTo | Type IItemStack | Has Getter true | Has Setter false |