MCFood
Link to mcfood
Importing the class
Link to 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 Copyimport crafttweaker.api.food.MCFood;
Constructors
Link to constructors
No Description Provided
ZenScript Copynew MCFood(healing as int, saturation as float) as MCFood
Parameter | Type | Description |
---|---|---|
Parameter healing | Type int | Description No Description Provided |
Parameter saturation | Type float | Description No Description Provided |
Methods
Link to methods
Name: addEffect
Return Type: MCFood
ZenScript CopyMCFood.addEffect(effect as MCPotionEffectInstance, probability as float) as MCFood
Parameter | Type | Description |
---|---|---|
Parameter effect | Type MCPotionEffectInstance | Description No Description Provided |
Parameter probability | Type float | Description No Description Provided |
Name: clearEffects
Return Type: void
ZenScript Copy// MCFood.clearEffects() as void
myMCFood.clearEffects();
Name: removeEffect
Return Type: MCFood
ZenScript CopyMCFood.removeEffect(effect as MCPotionEffectInstance) as MCFood
Parameter | Type | Description |
---|---|---|
Parameter effect | Type MCPotionEffectInstance | Description No Description Provided |
Name: setCanEatWhenFull
Return Type: MCFood
ZenScript CopyMCFood.setCanEatWhenFull(canEatWhenFull as boolean) as MCFood
Parameter | Type | Description |
---|---|---|
Parameter canEatWhenFull | Type boolean型 | Description No Description Provided |
Name: setFastEating
Return Type: MCFood
ZenScript CopyMCFood.setFastEating(fastEating as boolean) as MCFood
Parameter | Type | Description |
---|---|---|
Parameter fastEating | Type boolean型 | Description No Description Provided |
Name: setHealing
Return Type: MCFood
ZenScript CopyMCFood.setHealing(healing as int) as MCFood
Parameter | Type | Description |
---|---|---|
Parameter healing | Type int | Description No Description Provided |
Name: setMeat
Return Type: MCFood
ZenScript CopyMCFood.setMeat(meat as boolean) as MCFood
Parameter | Type | Description |
---|---|---|
Parameter meat | Type boolean型 | Description No Description Provided |
Name: setSaturation
Return Type: MCFood
ZenScript CopyMCFood.setSaturation(saturation as float) as MCFood
Parameter | Type | Description |
---|---|---|
Parameter saturation | Type float | Description No Description Provided |
Properties
Link to properties
名称 | Type | Has Getter | Has Setter | Description |
---|---|---|---|---|
名称 canEatWhenFull | Type boolean型 | Has Getter true | Has Setter false | Description No Description Provided |
名称 healing | Type int | Has Getter true | Has Setter false | Description No Description Provided |
名称 isFastEating | Type boolean型 | Has Getter true | Has Setter false | Description No Description Provided |
名称 meat | Type boolean型 | Has Getter true | Has Setter false | Description No Description Provided |
名称 saturation | Type float | Has Getter true | Has Setter false | Description No Description Provided |