Husbandry:KubeJS
Jump to navigation
Jump to search
Husbandry | |
![]() | |
Requirements | Penguin-Lib |
CurseForge | https://www.curseforge.com/minecraft/mc-mods/husbandry |
Dev Builds | https://jenkins.joshiejack.uk/job/Husbandry/ |
Husbandry comes with support for KubeJS. You can access everything in the javascript files by starting off with the husbandry
path. With an EntityJS you can obtain a IMobStatsJS by calling husbandry.getMobStats(ENTITY_JS)
. Keep in mind that this mob stats CAN be null as not every mob will have stats attached to them.
With this in hand you have the following methods
Name | Return Type | Info |
---|---|---|
getDaysBetweenProducts() | int | Number of days between generating products |
getProduct(PlayerJS player) | ListJS | Generates random list of product for this mob |
getMinAge() | int | Lifespan minimum in years |
getMaxAge() | int | Lifespan maximum in years |
getGenericTreats() | int | Generic treats required to level up |
getSpeciesTreats() | int | Species treats required to level up |
getDaysToBirth() | int | Number of days it takes to give birth |
getDaysToMaturity() | int | Number of days it takes to reach maturity |
getTreat() | Item | Species treat item |
getMaxHappiness() | int | The maximum happiness this mob can have currently |
getHappiness() | int | Current happiness value |
setHappiness(int value) | void | Set current happiness value |
decreaseHappiness(int value) | void | Decrease happiness value |
increaseHappiness(int value) | void | Increase happiness value |
getHappinessModifier() | int | Current happiness modifier |
setHappinessModifier(int value) | void | Set current happiness value |
getMaxHearts() | int | The maximum hearts this mob can have currently |
getHearts() | int | The hearts this mob has currently |
setHearts(int value) | void | Set the number of hearts this mob has |
feed() | void | Set mob as having been fed |
isHungry() | boolean | If the mob hasn't been fed |
getHunger() | int | Current hunger level |
isUnloved() | boolean | If the mob hasn't been petted/carried |
setLoved() | boolean | Mark the mob as having been petted/carried |
canProduceProduct() | boolean | If the mob is able to produce a product |
setProduced(int amount) | void | Set the number of produced products for this day |
resetProduct() | void | Reset the product count for this mob |
isDomesticated() | boolean | If this mob has been interacted with |
Animal Care | |
---|---|
Species | Cat • Chicken • Cow • Donkey • Horse • Llama • Mooshroom • Parrot • Pig • Rabbit • Sheep • Wolf |
Food/Treats | Bird Feed • Fodder • Slop • Generic Treat • Cat Treat • Chicken Treat • Cow Treat • Dog Treat • Horse Treat • Llama Treat • Parrot Treat • Pig Treat • Rabbit Treat • Sheep Treat |
Equipment | Bowl • Brush • Feeding Tray • Incubator • Miracle Potion • Nest • Trough |
Information | Customisation • Notes • KubeJS |
Other | |
Tools | Mob Tracker • Sickle |
Edibles | Boiled Egg • Butter • Dinner Roll • Hot Milk • Ice Cream • Mug Of Milk • Truffle • Truffle Block |