MCFood

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

Constructors

No Description Provided

ZenScript
Copy
new MCFood(healing as int, saturation as float) as MCFood
ParameterTypeDescription
healingintNo Description Provided
saturationfloatNo Description Provided

Methods

addEffect

Return Type: MCFood

ZenScript
Copy
MCFood.addEffect(effect as MCPotionEffectInstance, probability as float) as MCFood
ParameterTypeDescription
effectMCPotionEffectInstanceNo Description Provided
probabilityfloatNo Description Provided

clearEffects

Return Type: void

ZenScript
Copy
MCFood.clearEffects() as void
myMCFood.clearEffects();

removeEffect

Return Type: MCFood

ZenScript
Copy
MCFood.removeEffect(effect as MCPotionEffectInstance) as MCFood
ParameterTypeDescription
effectMCPotionEffectInstanceNo Description Provided

setCanEatWhenFull

Return Type: MCFood

ZenScript
Copy
MCFood.setCanEatWhenFull(canEatWhenFull as boolean) as MCFood
ParameterTypeDescription
canEatWhenFullbooleanNo Description Provided

setFastEating

Return Type: MCFood

ZenScript
Copy
MCFood.setFastEating(fastEating as boolean) as MCFood
ParameterTypeDescription
fastEatingbooleanNo Description Provided

setHealing

Return Type: MCFood

ZenScript
Copy
MCFood.setHealing(healing as int) as MCFood
ParameterTypeDescription
healingintNo Description Provided

setMeat

Return Type: MCFood

ZenScript
Copy
MCFood.setMeat(meat as boolean) as MCFood
ParameterTypeDescription
meatbooleanNo Description Provided

setSaturation

Return Type: MCFood

ZenScript
Copy
MCFood.setSaturation(saturation as float) as MCFood
ParameterTypeDescription
saturationfloatNo Description Provided

Properties

NameTypeHas GetterHas Setter
canEatWhenFullbooleantruefalse
healinginttruefalse
isFastEatingbooleantruefalse
meatbooleantruefalse
saturationfloattruefalse