MCFood
Questa classe è stata aggiunta da una mod con ID crafttweaker
. Perciò, è necessario avere questa mod installata per poter utilizzare questa funzione.
Importing the class
Potrebbe essere necessario importare il pacchetto, se si incontrano dei problemi (come castare un vettore), quindi meglio essere sicuri e aggiungere la direttiva di importazione.
crafttweaker.api.food.MCFood
Constructors
new crafttweaker.api.food.MCFood(healing as int, saturation as float);
Parameter | Type | Description |
---|
healing | int | Nessuna descrizione fornita |
saturation | float | Nessuna descrizione fornita |
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 | Nessuna descrizione fornita |
setFastEating
Returns crafttweaker.api.food.MCFood
myMCFood.setFastEating(fastEating as boolean);
Parameter | Type | Description |
---|
fastEating | boolean | Nessuna descrizione fornita |
setHealing
Returns crafttweaker.api.food.MCFood
myMCFood.setHealing(healing as int);
Parameter | Type | Description |
---|
healing | int | Nessuna descrizione fornita |
setMeat
Returns crafttweaker.api.food.MCFood
myMCFood.setMeat(meat as boolean);
Parameter | Type | Description |
---|
meat | boolean | Nessuna descrizione fornita |
setSaturation
Returns crafttweaker.api.food.MCFood
myMCFood.setSaturation(saturation as float);
Parameter | Type | Description |
---|
saturation | float | Nessuna descrizione fornita |
Properties
Name | Type | Ha Getter | Ha Setter |
---|
canEatWhenFull | boolean | true | false |
healing | int | true | false |
isFastEating | boolean | true | false |
meat | boolean | true | false |
saturation | float | true | false |