Package de.Keyle.MyPet.api.skill.skills
Interface Pickup
- All Superinterfaces:
ActiveSkill,Scheduler,Skill
Skill that allows the pet to automatically pick up nearby dropped items and experience
orbs on behalf of its owner. The pickup radius scales with the pet's skilltree level.
The owner can toggle automatic pickup on or off via
ActiveSkill.activate().
The skill ticks via Scheduler to scan for nearby collectibles and persists
its active/inactive toggle via a registered SkillStateCodec.
- See Also:
-
Nested Class Summary
Nested ClassesModifier and TypeInterfaceDescriptionstatic final recordSnapshot of the Pickup auto-toggle (persisted or live). -
Method Summary
Modifier and TypeMethodDescriptionReturns the upgrade computer controlling whether experience orb pickup is enabled.getRange()Returns the upgrade computer controlling the pickup radius in blocks.booleanTrue if the pickup auto-toggle is currently on.voidsetPickupEnabled(boolean enabled) Sets the pickup auto-toggle directly (skips theActiveSkill.activate()owner messaging).Methods inherited from interface de.Keyle.MyPet.api.skill.ActiveSkill
activateMethods inherited from interface de.Keyle.MyPet.api.skill.skilltree.Skill
applyState, getName, getName, getPet, getState, getUpgradeMessage, isActive, reset, toPrettyComponent
-
Method Details
-
getRange
UpgradeComputer<Number> getRange()Returns the upgrade computer controlling the pickup radius in blocks.- Returns:
- the upgrade computer for the pickup radius in blocks
-
getExpPickup
UpgradeComputer<Boolean> getExpPickup()Returns the upgrade computer controlling whether experience orb pickup is enabled.- Returns:
- the upgrade computer for whether experience orb pickup is enabled
-
isPickupEnabled
boolean isPickupEnabled()True if the pickup auto-toggle is currently on.- Returns:
trueif the owner has switched pickup on
-
setPickupEnabled
void setPickupEnabled(boolean enabled) Sets the pickup auto-toggle directly (skips theActiveSkill.activate()owner messaging).- Parameters:
enabled-trueto switch pickup on
-