Interface ItemComposition


  • public interface ItemComposition
    Represents the template of a specific item type.
    • Method Detail

      • getName

        String getName()
        Gets the items name.
        Returns:
        the name of the item
      • getId

        int getId()
        Gets the items ID.
        Returns:
        the items ID
        See Also:
        ItemID
      • getNote

        int getNote()
        Gets a value specifying whether the item is noted.
        Returns:
        799 if noted, -1 otherwise
      • getLinkedNoteId

        int getLinkedNoteId()
        Gets the item ID of the noted or unnoted variant of this item.

        Calling this method on a noted item will result in the ID of itself in unnoted form, and on an unnoted item its noted variant.

        Returns:
        the noted or unnoted variant of this item
      • getPlaceholderId

        int getPlaceholderId()
        Gets the item ID of the normal or placeholder variant of this item.

        Calling this method on a normal item will result in the ID of itself in placeholder form, and on a placeholder item its normal variant.

        Returns:
        the normal or placeholder variant of this item
      • getPlaceholderTemplateId

        int getPlaceholderTemplateId()
        Gets a value specifying whether the item is a placeholder.
        Returns:
        14401 if placeholder, -1 otherwise
      • getPrice

        int getPrice()
        Gets the store price of the item.

        Although not all items can be found in a store, they have a store price which can be used to calculate high and low alchemy values. Multiplying the price by 0.6 and 0.4 gives these high and low alchemy values, respectively.

        Returns:
        the general store value of the item
        See Also:
        Constants.HIGH_ALCHEMY_MULTIPLIER, getHaPrice()
      • getHaPrice

        int getHaPrice()
        Get the high alchemy price for this item. All items have a high alchemy price, but not all items can be alched.
        Returns:
        the high alch price
      • isMembers

        boolean isMembers()
        Checks whether the item is members only.
        Returns:
        true if members only, false otherwise.
      • isStackable

        boolean isStackable()
        Checks whether the item is able to stack in a players inventory.
        Returns:
        true if stackable, false otherwise
      • isTradeable

        boolean isTradeable()
        Returns whether or not the item can be sold on the grand exchange.
      • getInventoryActions

        String[] getInventoryActions()
        Gets an array of possible right-click menu actions the item has in a player inventory.
        Returns:
        the inventory menu actions
      • getShiftClickActionIndex

        int getShiftClickActionIndex()
        Gets the menu action index of the shift-click action.
        Returns:
        the index of the shift-click action
      • setShiftClickActionIndex

        void setShiftClickActionIndex​(int shiftClickActionIndex)
        Sets the menu action index of the shift-click action.
        Parameters:
        shiftClickActionIndex - the new index of the shift-click action
      • resetShiftClickActionIndex

        void resetShiftClickActionIndex()
        Resets the menu action index of the shift-click action to its default value.
      • getInventoryModel

        int getInventoryModel()
        Gets the model ID of the inventory item.
        Returns:
        the model ID
      • getColorToReplaceWith

        @Nullable
        short[] getColorToReplaceWith()
        Since the client reuses item models, it stores colors that can be replaced. This returns what colors the item model will be replaced with.
        Returns:
        the colors to replace with
      • getTextureToReplaceWith

        @Nullable
        short[] getTextureToReplaceWith()
        Since the client reuses item models, it stores textures that can be replaced. This returns what textures the item model will be replaced with.
        Returns:
        the textures to replace with