Pet Food
When you are using living pets, you can make a good use of food for both healing your pet or taming one.
There are two possibilities regarding items for the pet food:
1 - Vanilla items
You can use vanilla items as food for your pets.
To achieve that, you will need to put the ItemId field to the material of your liking. To find out the material name of the vanilla item you're looking for, you can check Spigot API page here.
# Example vanilla food item in the petFood.yml config
CarrotFood:
ItemId: CARROT
# ... other fields here that'll see down below2 - Custom items
You can use custom items to feed your pets.
What you wanna do first is to make sure you have added the items you want to use as pet food into MCPets through the command "/mcpets item add <petFoodId>" with the food item in your hand.
Then, within the petFood.yml file, you would use petFoodId as the reference for the ItemId field.
# Example vanilla food item in the petFood.yml config
CustomItemFood:
ItemId: petFoodId
# ... other fields here that'll see down belowItems Adder custom items are also supported as ItemId by using the following format (MCPets 4.1.5+ only):
Nexo is also supported (MCPets 4.1.6+ only):
Various types of foods
HEALTH
add, multiply
Affect the pet's health
TAME
add, multiply
Affect the taming progress of the pet
EXP
add
Affect the experience of the pet
EVOLUTION
Evolves the pet into another pet
UNLOCK
Gives the permission of the pet to the player consuming the pet food (LuckPerms required)
BUFF_DAMAGE
add, multiply
Gives a damage bonus for a given duration.
BUFF_RESISTANCE
add, multiply
Gives a resistance bonus for a given duration.
BUFF_POWER
add, multiply
Gives a power bonus for a given duration.
When you have added the items into mcpets using the previous command, or that you have chosen a vanilla item to go with, you can go into "./plugins/MCPets/petFood.yml" and add your pet food according to the following examples.
Pet food example: Taming & Health
Pet Food example: Evolution
The evolution items enable you to turn given pets into another evolution. This basically enables you to create evolution trees for instance.
Pet Food example: Unlock pet
You can create pet food that is consumable by players to unlock a pet.
These items automatically check that the players do not already own the pet.
You also get access to a permission to use the said item, to prevent all players from using it for instance.
Pet Food example: Buffs
You can create temporary buffs using pet foods, like damage increase, power or resistance buffs, or alternatively debuffs.
The following YAML snippet sets up a damage buff for instance
Last updated
Was this helpful?