Class CacheItemDefinition.Extended
- java.lang.Object
-
- com.runemate.game.api.hybrid.entities.definitions.ItemDefinition
-
- com.runemate.game.api.hybrid.cache.elements.CacheItemDefinition.Extended
-
- All Implemented Interfaces:
Identifiable
,Onymous
- Enclosing class:
- CacheItemDefinition
public class CacheItemDefinition.Extended extends ItemDefinition
-
-
Field Summary
Fields Modifier and Type Field Description static int
BORDER_BLACK
Draw a 1px black borderstatic int
BORDER_NONE
Don't draw any borderstatic int
BORDER_WHITE
Draw a compound border: 1px black border, and then a 1px white borderstatic int
TEXT_POLICY_NEVER
Never render the quantity textstatic int
TEXT_POLICY_PREFERRED
Always render the quantity text, as long as quantity != -1static int
TEXT_POLICY_SELECTIVE
Render the quantity text if quantity != 1, and the item is stackable
-
Method Summary
All Methods Instance Methods Concrete Methods Deprecated Methods Modifier and Type Method Description Attribute
getAttribute(long id)
Gets the attribute of this item with the specified id.java.util.List<Attribute>
getAttributes()
The attributes of the item, contains things such as how much it can heal and what items are needed to create it.java.util.Map<java.awt.Color,java.awt.Color>
getColorSubstitutions()
ItemDefinition
getCosmeticBaseDefinition()
ItemDefinition
getCosmeticDefinition()
int
getCosmeticTemplateId()
Equipment.Slot
getEquipmentSlot()
Gets the first valid equipment slot occupied by this item This is not guaranteed to be accurate (e.g Black mask will return null)java.util.List<java.lang.Integer>
getFemaleHeadModelIds()
java.util.List<java.lang.Integer>
getFemaleModelIds()
java.lang.String[]
getGroundActionArray()
Deprecated.int
getGroundModelId()
int
getHighLevelAlchemyValue()
Gets the high level alchemy value of the itemint
getId()
Gets the id of the itemjava.lang.String[]
getInventoryActionArray()
Deprecated.int
getLowLevelAlchemyValue()
Gets the low level alchemy value of the itemjava.util.List<java.lang.Integer>
getMaleHeadModelIds()
java.util.List<java.lang.Integer>
getMaleModelIds()
java.util.Map<Material,Material>
getMaterialSubstitutions()
int
getModelXScale()
int
getModelYScale()
int
getModelZScale()
@NonNull java.lang.String
getName()
int
getNotedId()
Get the id of the item when it's noted (if available)ItemDefinition
getPlaceholderBaseDefinition()
ItemDefinition
getPlaceholderDefinition()
int
getPlaceholderId()
Equipment.Slot
getPrimaryEquipmentSlot()
Primary equipment slot used by this item, according to the cache.java.lang.String[]
getRawGroundActions()
java.lang.String[]
getRawInventoryActions()
Equipment.Slot
getSecondaryEquipmentSlot()
java.lang.String
getShiftClickAction()
On osrs, it returns the action that is triggered when a shift click style drop is used on this item.int
getShopValue()
Gets the shop value of an itemItemDefinition
getSubstitution(int quantity)
com.runemate.game.api.hybrid.util.collections.PairList<java.lang.Integer,ItemDefinition>
getSubstitutions()
int
getTeamId()
Equipment.Slot
getTertiaryEquipmentSlot()
int
getUnnotedId()
Get the id of the item when it's unnoted (if available)double
getWeight()
Gets the weight of the item in kg.boolean
isCosmetic()
boolean
isEquipable()
boolean
isMembersOnly()
Checks whether or not this item is members-onlyboolean
isNoted()
boolean
isPlaceholder()
boolean
isTradeable()
Currently being rewritten to behave similarly to the way it's name implies and the way it used to perform.boolean
isTradeableOnMarket()
Gets whether or not the item can be traded on the game's market in it's current state (currently, osrs and rs3 use the GrandExchange as it's market) Noted items will return false as should be expected since you're not actually buying and selling the notes themselves, but rather the items they represent/contain.boolean
isTwoHanded()
boolean
stacks()
Gets whether or not multiple of this item will stack into a single inventory slot-
Methods inherited from class com.runemate.game.api.hybrid.entities.definitions.ItemDefinition
get, get, get, get, getGroundActions, getIdPredicate, getInventoryActions, getNamePredicate, getUnnotedDefinition, getWornActions, loadAll, loadAll, toString
-
-
-
-
Field Detail
-
BORDER_NONE
public static final int BORDER_NONE
Don't draw any border- See Also:
- Constant Field Values
-
BORDER_BLACK
public static final int BORDER_BLACK
Draw a 1px black border- See Also:
- Constant Field Values
-
BORDER_WHITE
public static final int BORDER_WHITE
Draw a compound border: 1px black border, and then a 1px white border- See Also:
- Constant Field Values
-
TEXT_POLICY_NEVER
public static final int TEXT_POLICY_NEVER
Never render the quantity text- See Also:
- Constant Field Values
-
TEXT_POLICY_PREFERRED
public static final int TEXT_POLICY_PREFERRED
Always render the quantity text, as long as quantity != -1- See Also:
- Constant Field Values
-
TEXT_POLICY_SELECTIVE
public static final int TEXT_POLICY_SELECTIVE
Render the quantity text if quantity != 1, and the item is stackable- See Also:
- Constant Field Values
-
-
Method Detail
-
getModelXScale
public int getModelXScale()
-
getModelYScale
public int getModelYScale()
-
getModelZScale
public int getModelZScale()
-
getAttribute
public Attribute getAttribute(long id)
Description copied from class:ItemDefinition
Gets the attribute of this item with the specified id.- Specified by:
getAttribute
in classItemDefinition
-
getAttributes
public java.util.List<Attribute> getAttributes()
Description copied from class:ItemDefinition
The attributes of the item, contains things such as how much it can heal and what items are needed to create it.- Specified by:
getAttributes
in classItemDefinition
-
getColorSubstitutions
public java.util.Map<java.awt.Color,java.awt.Color> getColorSubstitutions()
- Specified by:
getColorSubstitutions
in classItemDefinition
-
getMaterialSubstitutions
public java.util.Map<Material,Material> getMaterialSubstitutions()
- Specified by:
getMaterialSubstitutions
in classItemDefinition
-
getGroundActionArray
@Deprecated public java.lang.String[] getGroundActionArray()
Deprecated.
-
getRawGroundActions
public java.lang.String[] getRawGroundActions()
- Specified by:
getRawGroundActions
in classItemDefinition
-
getId
public int getId()
Description copied from class:ItemDefinition
Gets the id of the item- Specified by:
getId
in interfaceIdentifiable
- Specified by:
getId
in classItemDefinition
-
getRawInventoryActions
public java.lang.String[] getRawInventoryActions()
- Specified by:
getRawInventoryActions
in classItemDefinition
-
getInventoryActionArray
@Deprecated public java.lang.String[] getInventoryActionArray()
Deprecated.
-
isNoted
public boolean isNoted()
- Specified by:
isNoted
in classItemDefinition
-
getUnnotedId
public int getUnnotedId()
Description copied from class:ItemDefinition
Get the id of the item when it's unnoted (if available)- Specified by:
getUnnotedId
in classItemDefinition
-
getNotedId
public int getNotedId()
Description copied from class:ItemDefinition
Get the id of the item when it's noted (if available)- Specified by:
getNotedId
in classItemDefinition
-
getCosmeticTemplateId
public int getCosmeticTemplateId()
- Specified by:
getCosmeticTemplateId
in classItemDefinition
-
isCosmetic
public boolean isCosmetic()
- Specified by:
isCosmetic
in classItemDefinition
-
getCosmeticDefinition
public ItemDefinition getCosmeticDefinition()
- Specified by:
getCosmeticDefinition
in classItemDefinition
-
getCosmeticBaseDefinition
public ItemDefinition getCosmeticBaseDefinition()
- Specified by:
getCosmeticBaseDefinition
in classItemDefinition
-
getPlaceholderId
public int getPlaceholderId()
- Specified by:
getPlaceholderId
in classItemDefinition
-
getPlaceholderDefinition
public ItemDefinition getPlaceholderDefinition()
- Specified by:
getPlaceholderDefinition
in classItemDefinition
-
getPlaceholderBaseDefinition
public ItemDefinition getPlaceholderBaseDefinition()
- Specified by:
getPlaceholderBaseDefinition
in classItemDefinition
-
getEquipmentSlot
public Equipment.Slot getEquipmentSlot()
Description copied from class:ItemDefinition
Gets the first valid equipment slot occupied by this item This is not guaranteed to be accurate (e.g Black mask will return null)- Specified by:
getEquipmentSlot
in classItemDefinition
-
getPrimaryEquipmentSlot
@Nullable public Equipment.Slot getPrimaryEquipmentSlot()
Description copied from class:ItemDefinition
Primary equipment slot used by this item, according to the cache. Items in theEquipment.Slot.HEAD
contain this information in the secondary equipment slot- Specified by:
getPrimaryEquipmentSlot
in classItemDefinition
-
getSecondaryEquipmentSlot
@Nullable public Equipment.Slot getSecondaryEquipmentSlot()
- Specified by:
getSecondaryEquipmentSlot
in classItemDefinition
-
getTertiaryEquipmentSlot
@Nullable public Equipment.Slot getTertiaryEquipmentSlot()
- Specified by:
getTertiaryEquipmentSlot
in classItemDefinition
-
getLowLevelAlchemyValue
public int getLowLevelAlchemyValue()
Description copied from class:ItemDefinition
Gets the low level alchemy value of the item- Specified by:
getLowLevelAlchemyValue
in classItemDefinition
-
getHighLevelAlchemyValue
public int getHighLevelAlchemyValue()
Description copied from class:ItemDefinition
Gets the high level alchemy value of the item- Specified by:
getHighLevelAlchemyValue
in classItemDefinition
-
getShopValue
public int getShopValue()
Description copied from class:ItemDefinition
Gets the shop value of an item- Specified by:
getShopValue
in classItemDefinition
-
getGroundModelId
public int getGroundModelId()
- Specified by:
getGroundModelId
in classItemDefinition
-
isEquipable
public boolean isEquipable()
- Specified by:
isEquipable
in classItemDefinition
-
getWeight
public double getWeight()
Description copied from class:ItemDefinition
Gets the weight of the item in kg. Weight-reducing items will have negative weight.- Specified by:
getWeight
in classItemDefinition
-
getMaleModelIds
public java.util.List<java.lang.Integer> getMaleModelIds()
- Specified by:
getMaleModelIds
in classItemDefinition
-
getFemaleModelIds
public java.util.List<java.lang.Integer> getFemaleModelIds()
- Specified by:
getFemaleModelIds
in classItemDefinition
-
getMaleHeadModelIds
public java.util.List<java.lang.Integer> getMaleHeadModelIds()
- Specified by:
getMaleHeadModelIds
in classItemDefinition
-
getFemaleHeadModelIds
public java.util.List<java.lang.Integer> getFemaleHeadModelIds()
- Specified by:
getFemaleHeadModelIds
in classItemDefinition
-
isMembersOnly
public boolean isMembersOnly()
Description copied from class:ItemDefinition
Checks whether or not this item is members-only- Specified by:
isMembersOnly
in classItemDefinition
-
isPlaceholder
@OSRSOnly public boolean isPlaceholder()
- Specified by:
isPlaceholder
in classItemDefinition
-
isTradeable
public boolean isTradeable()
Description copied from class:ItemDefinition
Currently being rewritten to behave similarly to the way it's name implies and the way it used to perform.- Specified by:
isTradeable
in classItemDefinition
- See Also:
ItemDefinition.isTradeableOnMarket()
-
isTradeableOnMarket
public boolean isTradeableOnMarket()
Description copied from class:ItemDefinition
Gets whether or not the item can be traded on the game's market in it's current state (currently, osrs and rs3 use the GrandExchange as it's market) Noted items will return false as should be expected since you're not actually buying and selling the notes themselves, but rather the items they represent/contain.- Specified by:
isTradeableOnMarket
in classItemDefinition
- Returns:
- true if you can buy and sell the item on the game's market in it's current state
-
isTwoHanded
public boolean isTwoHanded()
- Specified by:
isTwoHanded
in classItemDefinition
-
stacks
public boolean stacks()
Description copied from class:ItemDefinition
Gets whether or not multiple of this item will stack into a single inventory slot- Specified by:
stacks
in classItemDefinition
- Returns:
- true if it can stack, otherwise false.
-
getTeamId
public int getTeamId()
- Specified by:
getTeamId
in classItemDefinition
-
getShiftClickAction
@OSRSOnly public java.lang.String getShiftClickAction()
Description copied from class:ItemDefinition
On osrs, it returns the action that is triggered when a shift click style drop is used on this item.- Specified by:
getShiftClickAction
in classItemDefinition
- Returns:
- a String or null if there is no shift click action defined.
-
getName
@NonNull public @NonNull java.lang.String getName()
- Specified by:
getName
in interfaceOnymous
- Specified by:
getName
in classItemDefinition
-
getSubstitutions
public com.runemate.game.api.hybrid.util.collections.PairList<java.lang.Integer,ItemDefinition> getSubstitutions()
-
getSubstitution
public ItemDefinition getSubstitution(int quantity)
-
-