PetManager
Owns every pet: the species read from the *.pet.yml files in the models folder, the bodies alive in the world, and the collections of online players. Bodies are vanilla mobs (an allay by default) carrying a FreeMinecraftModels model and driven by a MagmaCore Mind program, assembled from the pet behavior modules in plugins/FreeMinecraftModels/pet_behaviors/ that the pet file lists (see PetPrograms); they are never saved with their chunk, so an owned pet is re-created next to its owner, and a wild one waits in the WildPetStore until its chunk loads again. Everything runs on the server thread.
Functions
Link copied to clipboard
A pet body died: drop it from the maps, and send an owned pet home or out of the collection.
Link copied to clipboard
A plugin removed a wild pet's body.
Link copied to clipboard
Whether a night flock of the species flies its route: the species flies, and every model its migrants may wear runs the migrate module.
Link copied to clipboard
A newly generated chunk loaded; it is stocked next tick.
Link copied to clipboard
Link copied to clipboard
Removes a pet body from the world and from every map.
Link copied to clipboard
Link copied to clipboard
The running manager, or null when pets are unavailable on this server or no species are installed.
Link copied to clipboard
Adds a new adult of the species to the player's collection and brings it out.
Link copied to clipboard
(Re)loads the species and the behavior modules, builds every species' programs, and brings back the equipped pets of everyone online.
Link copied to clipboard
A player right-clicked a pet.
Link copied to clipboard
Link copied to clipboard
The pet behind a body, or null when the entity is not a live pet.
Link copied to clipboard
Link copied to clipboard
Link copied to clipboard
Link copied to clipboard
public PetControl spawnMigrant(PetSpecies pet, Location at, String model, double sizeMultiplier, int viewDistance, MigrationRoute route)
Puts a wild pet on a migration route: an ordinary wild pet of the species, wearing its full model, flying the route at the top of its Mind program.
Link copied to clipboard
Puts an equipped pet from the collection into the world beside its owner.
Link copied to clipboard
Link copied to clipboard