Class NpcDefinition
- java.lang.Object
-
- com.runemate.game.api.hybrid.entities.definitions.NpcDefinition
-
- All Implemented Interfaces:
Identifiable
,Onymous
- Direct Known Subclasses:
CacheNpcDefinition.Extended
public abstract class NpcDefinition extends java.lang.Object implements Onymous, Identifiable
The definition of an npc
-
-
Constructor Summary
Constructors Constructor Description NpcDefinition()
-
Method Summary
All Methods Static Methods Instance Methods Abstract Methods Concrete Methods Modifier and Type Method Description abstract boolean
appearsOnMinimap()
static NpcDefinition
get(int id)
Gets the NpcDefinition for the npc with the specified idstatic java.util.List<NpcDefinition>
get(int first, int last)
Gets a list of definitions within the range of [first, last]static java.util.List<NpcDefinition>
get(int first, int last, java.util.function.Predicate<NpcDefinition> filter)
Gets a list of definitions within the range of [first, last] that are accepted by the filterabstract @NonNull java.util.List<java.lang.String>
getActions()
Gets the powers of this npcabstract @NonNull java.util.List<java.lang.Integer>
getAppearance()
Gets a list of integers that are used to represent this entities appearance.abstract int
getAreaEdgeLength()
abstract Attribute
getAttribute(long id)
abstract @NonNull java.util.List<Attribute>
getAttributes()
abstract @NonNull java.util.List<java.lang.Integer>
getChatHeadAppearance()
abstract @NonNull java.util.Map<java.awt.Color,java.awt.Color>
getColorSubstitutions()
Gets a mapping of colors that are to be substituted in the base model.abstract int
getId()
An id that can be used to identify this npcabstract int
getLevel()
Gets this npc's levelabstract NpcDefinition
getLocalState()
abstract @NonNull java.util.Map<Material,Material>
getMaterialSubstitutions()
abstract int
getMovementCapabilitiesFlag()
abstract @NonNull java.lang.String
getName()
abstract int
getOverheadGaugeWidth()
abstract @NonNull java.util.List<OverheadIcon>
getOverheadIcons()
The icons above this npcabstract java.lang.String[]
getRawActions()
abstract Varbit
getStateVarbit()
TheVarbit
responsible for controlling the state (NpcDefinition) of the Npc, if present.abstract Varp
getStateVarp()
TheVarp
responsible for controlling the state (NpcDefinition) of the Npc, if present.abstract @NonNull java.util.Collection<NpcDefinition>
getTransformations()
abstract boolean
hasPrioritizedRendering()
abstract boolean
isClickable()
Gets whether or not the npc with this definition can be interacted with.abstract boolean
isFollower()
java.lang.String
toString()
-
-
-
Method Detail
-
get
public static java.util.List<NpcDefinition> get(int first, int last)
Gets a list of definitions within the range of [first, last]
-
get
public static java.util.List<NpcDefinition> get(int first, int last, java.util.function.Predicate<NpcDefinition> filter)
Gets a list of definitions within the range of [first, last] that are accepted by the filter
-
get
@Nullable public static NpcDefinition get(int id)
Gets the NpcDefinition for the npc with the specified id- Returns:
- The definition if available, otherwise null
-
getName
@NonNull public abstract @NonNull java.lang.String getName()
-
getOverheadGaugeWidth
public abstract int getOverheadGaugeWidth()
-
appearsOnMinimap
public abstract boolean appearsOnMinimap()
-
getActions
@NonNull public abstract @NonNull java.util.List<java.lang.String> getActions()
Gets the powers of this npc
-
getRawActions
@Nullable public abstract java.lang.String[] getRawActions()
-
getAppearance
@NonNull public abstract @NonNull java.util.List<java.lang.Integer> getAppearance()
Gets a list of integers that are used to represent this entities appearance. Internally these are used to generate an Npc's Model.
-
getChatHeadAppearance
@NonNull public abstract @NonNull java.util.List<java.lang.Integer> getChatHeadAppearance()
-
getAttribute
public abstract Attribute getAttribute(long id)
-
getAttributes
@NonNull public abstract @NonNull java.util.List<Attribute> getAttributes()
-
getColorSubstitutions
@NonNull public abstract @NonNull java.util.Map<java.awt.Color,java.awt.Color> getColorSubstitutions()
Gets a mapping of colors that are to be substituted in the base model.
-
getId
public abstract int getId()
An id that can be used to identify this npc- Specified by:
getId
in interfaceIdentifiable
-
getLevel
public abstract int getLevel()
Gets this npc's level
-
getLocalState
@Nullable public abstract NpcDefinition getLocalState()
-
getMaterialSubstitutions
@NonNull public abstract @NonNull java.util.Map<Material,Material> getMaterialSubstitutions()
-
getMovementCapabilitiesFlag
public abstract int getMovementCapabilitiesFlag()
-
getOverheadIcons
@NonNull public abstract @NonNull java.util.List<OverheadIcon> getOverheadIcons()
The icons above this npc- Returns:
- a list of overhead icons
-
getTransformations
@NonNull public abstract @NonNull java.util.Collection<NpcDefinition> getTransformations()
-
hasPrioritizedRendering
public abstract boolean hasPrioritizedRendering()
-
isClickable
public abstract boolean isClickable()
Gets whether or not the npc with this definition can be interacted with.
-
isFollower
public abstract boolean isFollower()
-
toString
public java.lang.String toString()
- Overrides:
toString
in classjava.lang.Object
-
getAreaEdgeLength
public abstract int getAreaEdgeLength()
-
getStateVarp
@Nullable public abstract Varp getStateVarp()
TheVarp
responsible for controlling the state (NpcDefinition) of the Npc, if present.
-
-