MCFood
This class was added by a mod with mod-id crafttweaker
. So you need to have this mod installed if you want to use this feature.
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.
crafttweaker.api.food.MCFood
Constructors
new crafttweaker.api.food.MCFood(healing as int, saturation as float);
Parameter | Type | Description |
---|---|---|
Parameter healing | Type int | Description No description provided |
Parameter saturation | Type float | Description No description provided |
Methods
addEffect
Returns crafttweaker.api.food.MCFood
myMCFood.addEffect(effect as crafttweaker.api.potion.MCPotionEffectInstance, probability as float);
Parameter | Type | Description |
---|---|---|
Parameter effect | Type crafttweaker.api.potion.MCPotionEffectInstance | Description No description provided |
Parameter probability | Type float | Description No description provided |
clearEffects
myMCFood.clearEffects();
removeEffect
Returns crafttweaker.api.food.MCFood
myMCFood.removeEffect(effect as crafttweaker.api.potion.MCPotionEffectInstance);
Parameter | Type | Description |
---|---|---|
Parameter effect | Type crafttweaker.api.potion.MCPotionEffectInstance | Description No description provided |
setCanEatWhenFull
Returns crafttweaker.api.food.MCFood
myMCFood.setCanEatWhenFull(canEatWhenFull as boolean);
Parameter | Type | Description |
---|---|---|
Parameter canEatWhenFull | Type boolean | Description No description provided |
setFastEating
Returns crafttweaker.api.food.MCFood
myMCFood.setFastEating(fastEating as boolean);
Parameter | Type | Description |
---|---|---|
Parameter fastEating | Type boolean | Description No description provided |
setHealing
Returns crafttweaker.api.food.MCFood
myMCFood.setHealing(healing as int);
Parameter | Type | Description |
---|---|---|
Parameter healing | Type int | Description No description provided |
setMeat
Returns crafttweaker.api.food.MCFood
myMCFood.setMeat(meat as boolean);
Parameter | Type | Description |
---|---|---|
Parameter meat | Type boolean | Description No description provided |
setSaturation
Returns crafttweaker.api.food.MCFood
myMCFood.setSaturation(saturation as float);
Parameter | Type | Description |
---|---|---|
Parameter saturation | Type float | Description No description provided |
Properties
Name | Type | Has Getter | Has Setter |
---|---|---|---|
Name canEatWhenFull | Type boolean | Has Getter true | Has Setter false |
Name healing | Type int | Has Getter true | Has Setter false |
Name isFastEating | Type boolean | Has Getter true | Has Setter false |
Name meat | Type boolean | Has Getter true | Has Setter false |
Name saturation | Type float | Has Getter true | Has Setter false |