Interface PetSunSensitive

All Superinterfaces:
Pet, Scheduler, StoredPet

public interface PetSunSensitive extends Pet
Marker for pet types whose underlying vanilla mob combusts in direct sunlight — the cohort whose Mojang counterpart returns true from Mob#isSunSensitive() (zombies, skeletons, and their variants) plus Phantom (which has its own sunlight check on aiStep).

The preventDaylightBurn() default consults the per-pet preference loaded from MyPet.Pets.<Type>.PreventDaylightBurn in pet-config.yml. The YAML row is auto-registered for every type that implements this marker — adding a new sun-sensitive pet only requires implementing this interface. Wiring lives in PetSurvivalListener's EntityCombustEvent arm: when the flag is true the natural combust is canceled before the visible flame appears. This flag does not gate block-caused combust (lava, magma) and entity-caused combust (flame arrows).

Husk, ZombifiedPiglin, and WitherSkeleton are deliberately omitted — vanilla overrides isSunSensitive() to false for those types, so the event never fires and the knob would be misleading.

  • Method Details

    • preventDaylightBurn

      default boolean preventDaylightBurn()
      Whether MyPet stops this pet burning in daylight.
      Returns:
      true to suppress sunlight burning