Importare la Classe

Link to importare-la-classe

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;

No Description Provided

ZenScript
Copy
new MCFood(healing as int, saturation as float) as MCFood
ParametroTipoDescrizione
Parametro
healing
Tipo
int
Descrizione
No Description Provided
Parametro
saturation
Tipo
float
Descrizione
No Description Provided

Name: addEffect

Return Type: MCFood

ZenScript
Copy
MCFood.addEffect(effect as MCPotionEffectInstance, probability as float) as MCFood
ParametroTipoDescrizione
Parametro
effect
Tipo
MCPotionEffectInstance
Descrizione
No Description Provided
Parametro
probability
Tipo
float
Descrizione
No Description Provided

Name: clearEffects

Return Type: void

ZenScript
Copy
// MCFood.clearEffects() as void

myMCFood.clearEffects();

Name: removeEffect

Return Type: MCFood

ZenScript
Copy
MCFood.removeEffect(effect as MCPotionEffectInstance) as MCFood
ParametroTipoDescrizione
Parametro
effect
Tipo
MCPotionEffectInstance
Descrizione
No Description Provided

Link to setCanEatWhenFull

Name: setCanEatWhenFull

Return Type: MCFood

ZenScript
Copy
MCFood.setCanEatWhenFull(canEatWhenFull as boolean) as MCFood
ParametroTipoDescrizione
Parametro
canEatWhenFull
Tipo
boolean
Descrizione
No Description Provided

Name: setFastEating

Return Type: MCFood

ZenScript
Copy
MCFood.setFastEating(fastEating as boolean) as MCFood
ParametroTipoDescrizione
Parametro
fastEating
Tipo
boolean
Descrizione
No Description Provided

Name: setHealing

Return Type: MCFood

ZenScript
Copy
MCFood.setHealing(healing as int) as MCFood
ParametroTipoDescrizione
Parametro
healing
Tipo
int
Descrizione
No Description Provided

Name: setMeat

Return Type: MCFood

ZenScript
Copy
MCFood.setMeat(meat as boolean) as MCFood
ParametroTipoDescrizione
Parametro
meat
Tipo
boolean
Descrizione
No Description Provided

Name: setSaturation

Return Type: MCFood

ZenScript
Copy
MCFood.setSaturation(saturation as float) as MCFood
ParametroTipoDescrizione
Parametro
saturation
Tipo
float
Descrizione
No Description Provided
NomeTipoHa GetterHa SetterDescrizione
Nome
canEatWhenFull
Tipo
boolean
Ha Getter
Ha Setter
no
Descrizione
No Description Provided
Nome
healing
Tipo
int
Ha Getter
Ha Setter
no
Descrizione
No Description Provided
Nome
isFastEating
Tipo
boolean
Ha Getter
Ha Setter
no
Descrizione
No Description Provided
Nome
meat
Tipo
boolean
Ha Getter
Ha Setter
no
Descrizione
No Description Provided
Nome
saturation
Tipo
float
Ha Getter
Ha Setter
no
Descrizione
No Description Provided