diff --git a/runelite-api/src/main/java/net/runelite/api/Client.java b/runelite-api/src/main/java/net/runelite/api/Client.java index 82b6ce89eb..dea3bc7133 100644 --- a/runelite-api/src/main/java/net/runelite/api/Client.java +++ b/runelite-api/src/main/java/net/runelite/api/Client.java @@ -47,7 +47,6 @@ public interface Client extends GameEngine { /** * The client invokes these callbacks to communicate to - * @return */ Callbacks getCallbacks(); @@ -58,7 +57,6 @@ public interface Client extends GameEngine /** * Retrieve a global logger for the client. * This is most useful for mixins which can't have their own. - * @return */ Logger getLogger(); @@ -351,7 +349,7 @@ public interface Client extends GameEngine /** * Loads and creates the sprite images of the passed archive and file IDs. * - * @param source the sprite database + * @param source the sprite index * @param archiveId the sprites archive ID * @param fileId the sprites file ID * @return the sprite image of the file @@ -359,16 +357,12 @@ public interface Client extends GameEngine SpritePixels[] getSprites(IndexDataBase source, int archiveId, int fileId); /** - * Gets the sprite index database. - * - * @return the sprite database + * Gets the sprite index. */ IndexDataBase getIndexSprites(); /** - * Gets the script index database. - * - * @return the script database + * Gets the script index. */ IndexDataBase getIndexScripts(); @@ -554,8 +548,7 @@ public interface Client extends GameEngine * Sets the array of open menu entries. *

* This method should typically be used in the context of the {@link net.runelite.api.events.MenuOpened} - * event, since setting the menu entries will be overwritten the next - * time the menu entries are calculated. + * event, since setting the menu entries will be overwritten the next frame * * @param entries new array of open menu entries */ @@ -603,22 +596,15 @@ public interface Client extends GameEngine * plane, x and y the x-axis and y-axis coordinates of a tile * divided by the size of a chunk. *

- * The bits of the int value held by the coordinates are structured - * with the following format: - *

- * Note: The above positions assume that the left-most bit of an integer - * is bit position 1, and the right-most bit 32. - * ie. - * 0000 0000 0000 0000 0000 0000 0000 0000 - * PP XXXX XXXX XXYY YYYY YYYY YRR - * Where P is the plane, X and Y the x/y axis coordinates, and R the chunks - * rotation. - * + * The bits of the int value held by the coordinates are -1 if there is no data, + * structured in the following format: + *
{@code
+	 *  0                   1                   2                   3
+	 *  0 1 2 3 4 5 6 7 8 9 0 1 2 3 4 5 6 7 8 9 0 1 2 3 4 5 6 7 8 9 0 1
+	 * +-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+
+	 * | |rot|     y chunk coord     |    x chunk coord    |pln|       |
+	 * +-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+
+	 * }
* @return the array of instance template chunks * @see Constants#CHUNK_SIZE * @see InstanceTemplates @@ -1010,48 +996,32 @@ public interface Client extends GameEngine ItemContainer getItemContainer(InventoryID inventory); /** - * Gets the index of the last integer added to the - * {@link #getIntStack()} array. - * - * @return the array index + * Gets the length of the cs2 vm's int stack */ int getIntStackSize(); /** - * Sets the index of the last integer added to the - * {@link #getIntStack()} array. - * - * @param stackSize the array index + * Sets the length of the cs2 vm's int stack */ void setIntStackSize(int stackSize); /** - * Gets the integer stack - * - * @return the array + * Gets the cs2 vm's int stack */ int[] getIntStack(); /** - * Gets the index of the last string added to the - * {@link #getStringStack()} array. - * - * @return the array index + * Gets the length of the cs2 vm's string stack */ int getStringStackSize(); /** - * Sets the index of the last string added to the - * {@link #getStringStack()} array. - * - * @param stackSize the array index + * Sets the length of the cs2 vm's string stack */ void setStringStackSize(int stackSize); /** - * Gets the string stack - * - * @return the string stack + * Gets the cs2 vm's string stack */ String[] getStringStack(); @@ -1224,8 +1194,6 @@ public interface Client extends GameEngine /** * Creates a new instance of a world. - * - * @return the created world */ World createWorld(); @@ -1238,7 +1206,9 @@ public interface Client extends GameEngine SpritePixels drawInstanceMap(int z); /** - * Runs a RuneLite script. + * Executes a client script from the cache + * + * This method must be ran on the client thread and is not reentrant * * @param id the script ID * @param args additional arguments to execute the script with @@ -1521,8 +1491,6 @@ public interface Client extends GameEngine /** * Gets the enabled state for the Oculus orb mode - * - * @return */ int getOculusOrbState(); @@ -1535,8 +1503,6 @@ public interface Client extends GameEngine /** * Sets the normal moving speed when using oculus orb (default value is 12) - * - * @param speed speed */ void setOculusOrbNormalSpeed(int speed); diff --git a/runelite-api/src/main/java/net/runelite/api/IndexDataBase.java b/runelite-api/src/main/java/net/runelite/api/IndexDataBase.java index 5503cb6885..67de31469e 100644 --- a/runelite-api/src/main/java/net/runelite/api/IndexDataBase.java +++ b/runelite-api/src/main/java/net/runelite/api/IndexDataBase.java @@ -25,7 +25,7 @@ package net.runelite.api; /** - * Represents an indexed database, typically used for sprites. + * Represents an index in the cache */ public interface IndexDataBase { diff --git a/runelite-api/src/main/java/net/runelite/api/ItemComposition.java b/runelite-api/src/main/java/net/runelite/api/ItemComposition.java index 98ac7332be..eaaed4e2aa 100644 --- a/runelite-api/src/main/java/net/runelite/api/ItemComposition.java +++ b/runelite-api/src/main/java/net/runelite/api/ItemComposition.java @@ -105,9 +105,7 @@ public interface ItemComposition boolean isStackable(); /** - * Returns whether or not the item can be traded to other players. - * - * @return true if tradeable, false otherwise + * Returns whether or not the item can be sold on the grand exchange. */ boolean isTradeable(); diff --git a/runelite-api/src/main/java/net/runelite/api/events/ScriptCallbackEvent.java b/runelite-api/src/main/java/net/runelite/api/events/ScriptCallbackEvent.java index c640d22ea2..d78269be44 100644 --- a/runelite-api/src/main/java/net/runelite/api/events/ScriptCallbackEvent.java +++ b/runelite-api/src/main/java/net/runelite/api/events/ScriptCallbackEvent.java @@ -28,7 +28,7 @@ import lombok.Data; import net.runelite.api.Script; /** - * An event where a Runelite ASM script is called. + * A callback from a runelite_callback opcode in a cs2 */ @Data public class ScriptCallbackEvent diff --git a/runelite-api/src/main/java/net/runelite/api/widgets/Widget.java b/runelite-api/src/main/java/net/runelite/api/widgets/Widget.java index 958aeca008..3aa6e23f13 100644 --- a/runelite-api/src/main/java/net/runelite/api/widgets/Widget.java +++ b/runelite-api/src/main/java/net/runelite/api/widgets/Widget.java @@ -32,8 +32,8 @@ import net.runelite.api.Point; /** * Represents an on-screen UI element that is drawn on the canvas. *

- * It should be noted that unique RuneLite elements are note widgets - * themselves, and that Widgets are primarily RuneScape elements. + * It should be noted that most RuneLite-added elements are not Widgets, but are + * an Overlay. Notable exceptions include bank tag tabs and chatbox inputs *

* Examples of Widgets include: *