PetSpecies

public final class PetSpecies

One pet species, read from a <species>.pet.yml file that sits beside its model in the models folder, so a model pack ships, enables and disables its pets together with its models. It names the model and the body the model rides, and says how the species is tamed, bred and raised, how it floats and follows, and where it lives wild.

Types

Link copied to clipboard
public enum Placement
Where a wild group may stand when it spawns, like a vanilla mob's spawn placement: on the ground, in water, in the air just over a water surface, or in the open air over solid ground.
Link copied to clipboard
public enum TimeOfDay
Link copied to clipboard
public final class Variant extends Record
A model the species' pets may wear, its share of the picks, and the behavior modules it adds to the species'.
Link copied to clipboard
public final class WildSpawn extends Record
How the species appears wild in CREATURES mode, shaped like a vanilla mob's entry in a biome's spawn list: a weight against the other species that may spawn at the same spot, a group size, where the group may stand, and the light, world, environment, biome and height it needs.

Properties

Link copied to clipboard
public final static String FILE_SUFFIX

Functions

Link copied to clipboard
public long babyGrowthMillis()
Link copied to clipboard
public String babyModel()
Link copied to clipboard
public double babyScale()
Link copied to clipboard
public List<PetBehaviorEntry> behaviors(String model)
The modules a pet wearing this model runs: the species' list or its locomotion's defaults, then the variant's.
Link copied to clipboard
public EntityType body()
Link copied to clipboard
public long breedingCooldownMillis()
Link copied to clipboard
public List<Material> breedingFood()
Link copied to clipboard
public boolean canStay()
Link copied to clipboard
public boolean centerOnBody()
Whether the model is drawn centred on its hidden body rather than standing on its feet.
Link copied to clipboard
public File file()
Link copied to clipboard
public double followDistance()
Link copied to clipboard
public double health()
Link copied to clipboard
public double hoverHeight()
Link copied to clipboard
public double hoverVariance()
Link copied to clipboard
public Material icon()
Link copied to clipboard
public NamespacedKey iconItemModel()
An item model for the pets menu icon, or null to show the icon material as it is.
Link copied to clipboard
public String id()
Link copied to clipboard
The species' look in night migrations; its migration() is null when off.
Link copied to clipboard
public boolean isBreedingFood(ItemStack item)
Link copied to clipboard
public boolean isTamingFood(ItemStack item)
Link copied to clipboard
public double leashDistance()
Link copied to clipboard
public boolean listsBehaviors()
Whether the pet file lists its own behaviors; false when it has no list or one that is not a list, and the species runs its locomotion's defaults.
Link copied to clipboard
public static PetSpecies load(File file)
The species a pet file defines, or null when the file is disabled or unreadable.
Link copied to clipboard
Link copied to clipboard
public int loveTicks()
Link copied to clipboard
public String model()
Link copied to clipboard
public String name()
Link copied to clipboard
How the model leans with its travel.
Link copied to clipboard
public String pickVariant(Random random)
A variant model by weight, or the species' model when it lists none.
Link copied to clipboard
public double roamRadius()
Link copied to clipboard
public double scale()
Link copied to clipboard
public double speed()
Link copied to clipboard
public double tameChance()
Link copied to clipboard
public List<Material> tamingFood()
Link copied to clipboard
public double teleportDistance()
Link copied to clipboard
Link copied to clipboard