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);
ParameterTypeDescription
healingintNo description provided
saturationfloatNo description provided

Methods

addEffect

Returns crafttweaker.api.food.MCFood

myMCFood.addEffect(effect as crafttweaker.api.potion.MCPotionEffectInstance, probability as float);
ParameterTypeDescription
effectcrafttweaker.api.potion.MCPotionEffectInstanceNo description provided
probabilityfloatNo description provided

clearEffects

myMCFood.clearEffects();

removeEffect

Returns crafttweaker.api.food.MCFood

myMCFood.removeEffect(effect as crafttweaker.api.potion.MCPotionEffectInstance);
ParameterTypeDescription
effectcrafttweaker.api.potion.MCPotionEffectInstanceNo description provided

setCanEatWhenFull

Returns crafttweaker.api.food.MCFood

myMCFood.setCanEatWhenFull(canEatWhenFull as boolean);
ParameterTypeDescription
canEatWhenFullboolean型No description provided

setFastEating

Returns crafttweaker.api.food.MCFood

myMCFood.setFastEating(fastEating as boolean);
ParameterTypeDescription
fastEatingboolean型No description provided

setHealing

Returns crafttweaker.api.food.MCFood

myMCFood.setHealing(healing as int);
ParameterTypeDescription
healingintNo description provided

setMeat

Returns crafttweaker.api.food.MCFood

myMCFood.setMeat(meat as boolean);
ParameterTypeDescription
meatboolean型No description provided

setSaturation

Returns crafttweaker.api.food.MCFood

myMCFood.setSaturation(saturation as float);
ParameterTypeDescription
saturationfloatNo description provided

Properties

名称TypeHas GetterHas Setter
canEatWhenFullboolean型truefalse
healinginttruefalse
isFastEatingboolean型truefalse
meatboolean型truefalse
saturationfloattruefalse