Class Index

#include <Geode/loader/Index.hpp>
classIndex{ ... }
No description provided
Examples0
Public static methods1
staticgeode::Index*get()
No description provided
Public member functions23
intgetTags()const

Get all tags

intgetItems()const

Get all index items

intgetFeaturedItems()const

Get all featured index items

intgetLatestItems()const

Get all latest index items

intgetItemsByDeveloper()const

Get all index items by a developer

intgetItemsByModID()const

Get all index items for a specific mod

boolisKnownItem(,)const

Check if an item with this ID is found on the index, and optionally provide the version sought after

geode::IndexItemHandlegetItem(,)const

Get an item from the index by its ID and optionally version

Parameters

id

ID of the mod

version

Version to match exactly; if you need to match a range of versions, use the getItem overload that takes a ComparableVersionInfo
Return value
The item, or nullptr if the item was not found
geode::IndexItemHandlegetItem(,)const

Get an item from the index by its ID and version range

Parameters

id

ID of the mod

version

Version to match
Return value
The item, or nullptr if the item was not found
geode::IndexItemHandlegetMajorItem()const

Get the most major item from the index by its ID

Parameters

id

ID of the mod
Return value
The item, or nullptr if the item was not found
geode::IndexItemHandlegetItem()const

Get an item from the index by its mod.json

Parameters

info

The mod's metadata
Return value
The item, or nullptr if the item was not found
geode::IndexItemHandlegetItem()const

Get an item from the index that corresponds to an installed mod

Parameters

mod

An installed mod
Return value
The item, or nullptr if the item was not found
boolisUpdateAvailable()const

Check if an item has updates available

Parameters

item

Item to check updates for
Return value
True if the version of the item on the index is newer than its installed counterpart
boolareUpdatesAvailable()const

Check if any of the mods on the index have updates available

intcanInstall()const

Checks if the mod and its required dependencies can be installed

Parameters

item

Item to get the list for
Return value
Success if the mod and its required dependencies can be installed, an error otherwise
intgetInstallList()const

Get the list of items needed to install this item (dependencies, etc.)

Parameters

item

Item to get the list for
Return value
The list, or an error if some items on the list cannot be installed
voidinstall()

Install an index item. Add an event listener for the ModInstallEvent class to track the installation progress. Automatically also downloads all missing dependencies for the item

Parameters

item

Item to install
voidinstall()

Install a list of index items. Add an event listener for the ModInstallEvent class to track the installation progress

Parameters

list

List of items to install

⚠️ Does not download any missing dependencies - use the `install(IndexItemHandle)` overload if you aren't sure all the dependencies are installed!

voidcancelInstall()

Cancel an installation in progress

Parameters

item

Installation to cancel
boolhasTriedToUpdate()const

Check if it has been attempted to update the index. You can check for errors by doing hasTriedToUpdate() && !isUpToDate()

boolisUpToDate()const

Whether the index is up-to-date, i.e. all sources are up-to-date

boolisUpdating()const

Whether the index is currently updating

voidupdate(
boolforce
)

Update the index. Add an event listener for the IndexUpdateEvent class to track updating progress

Parameters

force

Forcefully update all sources, even if some have are already up-to-date
Fields0
Protected member functions0
Protected fields0