Interface PetMetamorphic

All Superinterfaces:
Pet, Scheduler, StoredPet

public interface PetMetamorphic extends Pet
Marker for pet types that vanilla matures into a different species once an internal age timer expires. Tadpole → Frog is the only vanilla instance.

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.

  • Method Details

    • allowMetamorphosis

      default boolean allowMetamorphosis()
      Whether this pet may mature into its successor species.
      Returns:
      true to allow it