Pet Food

MCPets 4.0.0 introduced the in-game editor to simply implement pet food in game, so make sure to check it out using /mcpets editor

That will save you some time not diving in configurations anymore!

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 below

2 - 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 below

Various types of foods

TypeCompatible operatorsDescription

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

# Here is an example for taming food with a custom item
# Put any key you want here for your pet food (it must be unique)
TamingBerries:
  # Put the item id corresponding to your pet food when you added it with /mcpets items
  ItemId: taming_berries
  # Select the type of food : 
  # - TAME for taming purposes
  # - HEALTH for healing purposes
  Type: TAME
  # Set how much it should affect the feature you chose with type
  # NOTE : the taming progress is between 0 and 1, when it reaches 1 the pet is said to be tamed
  Power: 0.25
  # Choose the operation type :
  # - ADD for addition to the current value
  # - MULTIPLY for multiplication with the current value
  Operator: ADD
  # | Optional |
  # This will send the given Signal to the pet
  # If the pet is listening to it then you can trigger any MythicMobs skill from here
  # Check out MythicMobs wiki for more information : https://git.mythiccraft.io/mythiccraft/MythicMobs/-/wikis/skills/mechanics/signal
  Signal: TAMING
  # | Optional |
  # You can define a list of pets for which this pet food should only be compatible with
  # If you leave that field empty or that you do not provide this field,
  # the pet food will assume that it's compatible with every pets
  Pets:
  - Nocsy_Yokibird-Dark
  - Nocsy_Yokibird-Orange

# Here is an example for healing food with a vanilla item
# Note that you can't have CARROT twice in that file, since we can not distinguish
# different types of vanilla carrots.
FeedingCarrots:
  ItemId: CARROT
  Type: HEALTH
  Power: 20
  Operator: ADD

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.

# Here is an example for evolution food with a custom item
EvolutionItem:
  ItemId: evolution_crystal
  Type: EVOLUTION
  # Id of the pet that corresponds to the evolution
  Evolution: Nocsy_Drakonin_Adult-Fire
  # (Optional) Define an experience threshold before the item is consumable by the pet
  ExperienceThreshold: 300
  # (Optional) Define a delay before the evolution actually happens, 
  # which is useful if you have an evolving animation triggered through the signal section
  DelayBeforeEvolution: 60
  # | Optional |
  # This will send the given Signal to the pet
  # If the pet is listening to it then you can trigger any MythicMobs skill from here, like an evolving animation
  # Check out MythicMobs wiki for more information : https://git.mythiccraft.io/mythiccraft/MythicMobs/-/wikis/skills/mechanics/signal
  Signal: EVOLVE
  # Make sure to precise the pets that are compatible with that evolution
  # Otherwise any pet would be turned into that evolution using the item!
  Pets:
  - Nocsy_Drakonin_Baby-Fire

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.

# Here is an example for the unlocking pet food
UnlockItem:
  ItemId: evolution_crystal
  Type: UNLOCK
  # (Optional) you can force the user to have a permission to use the item, it's not a requirement
  Permission: perm.to_use_the_item
  # Id of the pet that corresponds to the evolution
  UnlockPet: Nocsy_Yokibird_Orange

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

# Here is an example for the unlocking pet food
DamageBuffFood:
  ItemId: power_buff_lollipop
  # Can be either BUFF_DAMAGE, BUFF_RESISTANCE or BUFF_POWER
  Type: BUFF_DAMAGE
  # Set how much it should buff the pet.
  Power: 10
  # Choose the operation type :
  # - ADD for addition to the current value
  # - MULTIPLY for multiplication with the current value
  Operator: ADD
  # Define a duration (in ticks) of the effect
  # 1 second is 20 ticks, so 600 ticks means 30 seconds.
  Duration: 600

Last updated