Package de.Keyle.MyPet.api.entity
Annotation Interface DefaultInfo
Declares the out-of-box defaults for a pet type. Applied to
Pet<Type> classes in the plugin module alongside
ShopInfo. Values are read reflectively by
PetInfoImpl at startup and used as fallbacks when no
per-type override exists in pet-config.yml.
Admins may override every value via config; this annotation merely seeds the initial defaults so the plugin is usable without any YAML customization.
-
Optional Element Summary
Optional ElementsModifier and TypeOptional ElementDescriptiondoubleSize multiplier for a baby of this pet type when its Bukkit mob has no vanilla baby state (it is notAgeable), applied as a transientminecraft:scalemodifier.booleanWhether the fallback icon should glow.Material name used by the selection-GUI egg-icon service when the standard<TYPE>_SPAWN_EGGdoesn't exist for this pet (e.g., EnderDragon, SnowGolem, Wither).doubleBase ride speed (blocks per tick, direct-velocity units) used by the Ride skill's flight controller whenoverrideFlySpeed()istrue.Material[]Items that restore saturation when fed to this pet type.Item that forces a baby pet to grow up when right-clicked.doubleStarting max health (half-hearts).String[]Leash flag names that must pass before a player can tame this mob.booleanIftrue, the Ride skill's flight controller usesflySpeed()verbatim as the base ride speed for this pet, skipping vanilla-attribute derivation entirely.doubleBase movement speed (Bukkit MOVEMENT_SPEED attribute value).
-
Element Details
-
food
Material[] foodItems that restore saturation when fed to this pet type.- Returns:
- the foods that restore saturation for this pet type
- Default:
{}
-
hp
double hpStarting max health (half-hearts). The default-1means "inherit the vanilla entity's natural max-health" (e.g. Wolf 8, Cow 10) — resolved from the Bukkit entity type at config load. Set an explicit non-negative value only to override that per species.- Returns:
- starting max health in half-hearts, or
-1to inherit the vanilla value
- Default:
-1.0
-
leashFlags
String[] leashFlagsLeash flag names that must pass before a player can tame this mob. Defaults to"LowHp"— the mob must be at low health.- Returns:
- the leash flags that must pass before this mob can be tamed
- Default:
{"LowHp"}
-
walkSpeed
double walkSpeedBase movement speed (Bukkit MOVEMENT_SPEED attribute value).- Returns:
- the base movement speed
- Default:
0.3
-
overrideFlySpeed
boolean overrideFlySpeedIftrue, the Ride skill's flight controller usesflySpeed()verbatim as the base ride speed for this pet, skipping vanilla-attribute derivation entirely. Iffalse(the default), the controller reads the mob'sFLYING_SPEEDattribute (naturally-flying species) orMOVEMENT_SPEEDattribute (ground/aquatic pets that gained flight via the Ride skilltree'sCanFlyupgrade) and scales it into direct-velocity units — third-party plugins setting either attribute propagate to ride speed automatically.Use the override when a specific pet type's vanilla attribute value produces a feel that's wrong for ridden flight — e.g. naturally aggressive flyers like Phantom whose vanilla
FLYING_SPEEDis high enough to feel uncontrollable when scaled.- Returns:
trueto useflySpeed()verbatim as the ride speed
- Default:
false
-
flySpeed
double flySpeedBase ride speed (blocks per tick, direct-velocity units) used by the Ride skill's flight controller whenoverrideFlySpeed()istrue. Ignored whenoverrideFlySpeedisfalse— in that case the controller derives speed from the live Bukkit mob'sFLYING_SPEED/MOVEMENT_SPEEDattribute scaled by vanilla-physics conversion factors.Authored in direct-per-tick-velocity units, NOT vanilla's force-coefficient units — e.g.
0.6≈ creative-fly cruise.- Returns:
- the base ride speed, in blocks per tick
- Default:
0.6
-
growUpItem
Material growUpItemItem that forces a baby pet to grow up when right-clicked.- Returns:
- the item that forces a baby of this type to grow up
- Default:
EXPERIENCE_BOTTLE
-
babyScale
double babyScaleSize multiplier for a baby of this pet type when its Bukkit mob has no vanilla baby state (it is notAgeable), applied as a transientminecraft:scalemodifier. Ignored forAgeablemobs, whose baby model is drawn by the client.- Returns:
- the baby size multiplier
- Default:
0.5
-
fallbackIconMaterial
String fallbackIconMaterialMaterial name used by the selection-GUI egg-icon service when the standard<TYPE>_SPAWN_EGGdoesn't exist for this pet (e.g., EnderDragon, SnowGolem, Wither). Empty falls through to a glowing BARRIER icon.- Returns:
- the icon material to use when no spawn egg exists, or an empty string for none
- Default:
""
-
fallbackIconGlow
boolean fallbackIconGlowWhether the fallback icon should glow. Ignored iffallbackIconMaterial()is empty.- Returns:
trueif the fallback icon should glow
- Default:
false
-