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 |
---|
healing | int | No description provided |
saturation | float | No description provided |
Methods
addEffect
Returns crafttweaker.api.food.MCFood
myMCFood.addEffect(effect as crafttweaker.api.potion.MCPotionEffectInstance, probability as float);
clearEffects
removeEffect
Returns crafttweaker.api.food.MCFood
myMCFood.removeEffect(effect as crafttweaker.api.potion.MCPotionEffectInstance);
setCanEatWhenFull
Returns crafttweaker.api.food.MCFood
myMCFood.setCanEatWhenFull(canEatWhenFull as boolean);
Parameter | Type | Description |
---|
canEatWhenFull | boolean型 | No description provided |
setFastEating
Returns crafttweaker.api.food.MCFood
myMCFood.setFastEating(fastEating as boolean);
Parameter | Type | Description |
---|
fastEating | boolean型 | No description provided |
setHealing
Returns crafttweaker.api.food.MCFood
myMCFood.setHealing(healing as int);
Parameter | Type | Description |
---|
healing | int | No description provided |
setMeat
Returns crafttweaker.api.food.MCFood
myMCFood.setMeat(meat as boolean);
Parameter | Type | Description |
---|
meat | boolean型 | No description provided |
setSaturation
Returns crafttweaker.api.food.MCFood
myMCFood.setSaturation(saturation as float);
Parameter | Type | Description |
---|
saturation | float | No description provided |
Properties
名称 | Type | Has Getter | Has Setter |
---|
canEatWhenFull | boolean型 | true | false |
healing | int | true | false |
isFastEating | boolean型 | true | false |
meat | boolean型 | true | false |
saturation | float | true | false |