Package de.Keyle.MyPet.api.entity
Interface PetNaturalDrop
Marker for pet types whose underlying vanilla mob has a periodic AI-tick
item drop (chicken eggs, armadillo scutes, sniffer seeds, goat horns,
panda baby slimeballs, ...). In v4 pets are real vanilla mobs, so these
drops happen for free on every tame pet. Implementers expose two pieces of
metadata that
PetDropListener uses to decide whether to cancel the
drop event:
naturalDropMaterials()— the set of vanillaMaterials this pet may periodically drop. Most pets drop a single material; sniffers drop two (torchflower seed and pitcher pod).isNaturalDropSuppressed()— reads the implementer's own per-pet config flag (e.g.PetChicken.CAN_LAY_EGGS). Returnstruewhen the admin has disabled the drop.
Per-pet flag names stay semantically rich (CanLayEggs,
CanShedScute, CanDigSeeds) because each implementer reads
its own ConfigKey static field. The listener never names them.
-
Nested Class Summary
Nested classes/interfaces inherited from interface de.Keyle.MyPet.api.entity.Pet
Pet.PetState, Pet.SpawnFlags -
Method Summary
Modifier and TypeMethodDescriptionbooleanReturnstrueif the admin has disabled this pet type's natural drop via the per-type config flag.The set of materials this pet type may periodically drop (e.g.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
-
naturalDropMaterials
The set of materials this pet type may periodically drop (e.g.EGGfor chicken,ARMADILLO_SCUTEfor armadillo).- Returns:
- the items this pet drops on its own
-
isNaturalDropSuppressed
boolean isNaturalDropSuppressed()Returnstrueif the admin has disabled this pet type's natural drop via the per-type config flag.- Returns:
trueif the drop is currently blocked
-