Interface PetLightningConvertible

All Superinterfaces:
Pet, Scheduler, StoredPet

public interface PetLightningConvertible extends Pet
Marker for pet types that vanilla converts to a different species when struck by lightning (Pig → ZombifiedPiglin, Villager → Witch). When admins opt in via MyPet.Pets.<Type>.AllowLightningConversion, the pet's domain object is re-typed to the new species via PetManager#convertPetType, preserving UUID, name, XP, skill state, and owner — same flow as PetZombifiable.

The YAML row is auto-registered for every type that implements this marker — adding a new lightning-convertible pet only requires implementing this interface. Default is false: the pet stays its original type and the lightning bolt's species-conversion arm is suppressed by PetLightningStrikeListener.

The Mooshroom red↔brown variant flip and the Creeper powered-state toggle are separate shapes (no type change) and have their own per-pet flags rather than implementing this marker.

  • Method Details

    • allowLightningConversion

      default boolean allowLightningConversion()
      Whether a lightning strike may convert this pet to its other species.
      Returns:
      true to allow the conversion