Interface PetMetamorphic
Deliberately not PetBaby: that marker models the baby↔adult
lifecycle of a single Ageable species (and gates the shop's "babies"
section plus the DefaultInfo.growUpItem() interaction). A
metamorphosis discards the host entity and adds a new one of another type, so
the Pet domain object has to be re-typed as well — the same flow as
PetZombifiable and PetLightningConvertible, via
PetManager#convertPetType, preserving UUID, name, XP, skill state,
and owner.
Reads MyPet.Pets.<Type>.AllowMetamorphosis, default false:
a pet keeps the type its owner tamed rather than silently becoming a
different mob, matching the AllowZombification /
AllowLightningConversion stance. The false case is enforced up
front by locking the host entity's age timer when the pet spawns
(VanillaMobSpawner); PetMetamorphosisListener is the backstop
for a pet whose timer was unlocked by something else.
-
Nested Class Summary
Nested classes/interfaces inherited from interface de.Keyle.MyPet.api.entity.Pet
Pet.PetState, Pet.SpawnFlags -
Method Summary
Modifier and TypeMethodDescriptiondefault booleanWhether this pet may mature into its successor species.Methods inherited from interface de.Keyle.MyPet.api.entity.Pet
autoAssignSkilltree, callToOwner, canMove, consumePendingSnapshot, createEntity, createEntity, decreaseSaturation, forgetTarget, getBukkitEntity, getCachedStatus, getDamage, getExperience, getLocation, getMaxHealth, getPetNavigation, getPetTarget, getRangedDamage, getSkills, getStatus, getTargetPriority, hasPetRider, hasTarget, hidePotionParticles, isHostAwaitingAdoption, isPassive, isSitting, makeSound, onInteract, onMeleeHitLanded, removeEntity, removePet, removePet, sendAway, setBukkitEntity, setExp, setHealth, setHostAwaitingAdoption, setLastUsed, setLocation, setMaxDistanceStep, setMinDistanceStep, setOwner, setPetName, setPetType, setRespawnTime, setSaturation, setSitting, setSkilltree, setSkilltree, setStatus, setTarget, setTarget, setUUID, setVolume, setWantsToRespawn, setWorldGroup, showPotionParticles, tickRespawnTimer, updateNameTag, updateVisualsMethods inherited from interface de.Keyle.MyPet.api.entity.StoredPet
getDisplayName, getExp, getHealth, getLastUsed, getLevel, getMaxDistanceStep, getMinDistanceStep, getOwner, getPetName, getPetType, getRespawnTime, getSaturation, getSkilltree, getUUID, getVolume, getWorldGroup, skillState, wantsToRespawn
-
Method Details
-
allowMetamorphosis
default boolean allowMetamorphosis()Whether this pet may mature into its successor species.- Returns:
trueto allow it
-