From 31a0130453b51c82c99af633da9eba03abf6418a Mon Sep 17 00:00:00 2001 From: Lucas Date: Sat, 8 Jun 2019 06:45:50 +0200 Subject: [PATCH] RLApi --- .../src/main/java/net/runelite/api/Actor.java | 20 ++-- .../main/java/net/runelite/api/Client.java | 99 +++++-------------- .../java/net/runelite/api/CollisionData.java | 2 +- .../net/runelite/api/DecorativeObject.java | 2 +- ...umComposition.java => EnumDefinition.java} | 2 +- .../runelite/api/EquipmentInventorySlot.java | 2 +- .../java/net/runelite/api/GameObject.java | 2 +- .../api/{GameEngine.java => GameShell.java} | 5 +- .../main/java/net/runelite/api/GameState.java | 4 - .../net/runelite/api/GrandExchangeOffer.java | 24 ----- .../runelite/api/GrandExchangeOfferState.java | 25 ----- .../main/java/net/runelite/api/GraphicID.java | 1 - .../main/java/net/runelite/api/HashTable.java | 24 ----- .../main/java/net/runelite/api/HealthBar.java | 4 +- .../net/runelite/api/HealthBarOverride.java | 8 +- .../java/net/runelite/api/IndexDataBase.java | 24 ----- ...emComposition.java => ItemDefinition.java} | 26 +---- .../main/java/net/runelite/api/ItemID.java | 61 ------------ .../net/runelite/api/MainBufferProvider.java | 2 +- .../net/runelite/api/MapElementConfig.java | 2 +- .../src/main/java/net/runelite/api/NPC.java | 6 +- ...NPCComposition.java => NPCDefinition.java} | 7 +- .../java/net/runelite/api/NullItemID.java | 34 ++++++- ...Composition.java => ObjectDefinition.java} | 4 +- .../java/net/runelite/api/Perspective.java | 8 +- .../main/java/net/runelite/api/Player.java | 7 +- ...Composition.java => PlayerAppearance.java} | 5 +- .../java/net/runelite/api/ScriptEvent.java | 4 +- .../src/main/java/net/runelite/api/Skill.java | 25 ----- .../api/{SpritePixels.java => Sprite.java} | 6 +- .../src/main/java/net/runelite/api/Tile.java | 2 - .../main/java/net/runelite/api/VarPlayer.java | 2 +- .../java/net/runelite/api/WallObject.java | 25 ++--- .../java/net/runelite/api/WidgetNode.java | 26 +---- .../src/main/java/net/runelite/api/World.java | 25 ----- .../main/java/net/runelite/api/WorldType.java | 24 ----- .../java/net/runelite/api/coords/Angle.java | 8 +- .../net/runelite/api/coords/WorldArea.java | 4 +- .../net/runelite/api/coords/WorldPoint.java | 2 +- .../runelite/api/events/AnimationChanged.java | 26 +---- .../api/events/BoostedLevelChanged.java | 2 +- .../runelite/api/events/GraphicChanged.java | 52 ---------- .../api/events/InteractingChanged.java | 24 ----- .../api/events/ItemContainerChanged.java | 2 +- .../api/events/MenuOptionClicked.java | 2 +- .../runelite/api/events/NpcActionChanged.java | 6 +- .../api/events/OverheadTextChanged.java | 27 ----- ...mposition.java => PostItemDefinition.java} | 8 +- .../api/events/SpotAnimationChanged.java | 28 ++++++ .../net/runelite/api/events/WidgetLoaded.java | 2 +- .../api/events/WidgetMenuOptionClicked.java | 2 +- .../runelite/api/events/WidgetPositioned.java | 2 +- .../net/runelite/api/hooks/Callbacks.java | 2 +- .../java/net/runelite/api/kit/KitType.java | 10 +- .../net/runelite/api/vars/AccountType.java | 26 +---- .../java/net/runelite/api/widgets/Widget.java | 15 +-- .../runelite/api/widgets/WidgetConfig.java | 3 +- .../net/runelite/api/widgets/WidgetInfo.java | 2 +- .../net/runelite/api/widgets/WidgetItem.java | 2 +- 59 files changed, 182 insertions(+), 624 deletions(-) rename runelite-api/src/main/java/net/runelite/api/{EnumComposition.java => EnumDefinition.java} (97%) rename runelite-api/src/main/java/net/runelite/api/{GameEngine.java => GameShell.java} (94%) rename runelite-api/src/main/java/net/runelite/api/{ItemComposition.java => ItemDefinition.java} (64%) rename runelite-api/src/main/java/net/runelite/api/{NPCComposition.java => NPCDefinition.java} (95%) rename runelite-api/src/main/java/net/runelite/api/{ObjectComposition.java => ObjectDefinition.java} (97%) rename runelite-api/src/main/java/net/runelite/api/{PlayerComposition.java => PlayerAppearance.java} (94%) rename runelite-api/src/main/java/net/runelite/api/{SpritePixels.java => Sprite.java} (93%) delete mode 100644 runelite-api/src/main/java/net/runelite/api/events/GraphicChanged.java rename runelite-api/src/main/java/net/runelite/api/events/{PostItemComposition.java => PostItemDefinition.java} (89%) create mode 100644 runelite-api/src/main/java/net/runelite/api/events/SpotAnimationChanged.java diff --git a/runelite-api/src/main/java/net/runelite/api/Actor.java b/runelite-api/src/main/java/net/runelite/api/Actor.java index c4c39b1701..8c7dec9594 100644 --- a/runelite-api/src/main/java/net/runelite/api/Actor.java +++ b/runelite-api/src/main/java/net/runelite/api/Actor.java @@ -28,7 +28,6 @@ import java.awt.Graphics2D; import java.awt.Polygon; import java.awt.image.BufferedImage; import javax.annotation.Nullable; -import net.runelite.api.annotations.VisibleForDevtools; import net.runelite.api.coords.LocalPoint; import net.runelite.api.coords.WorldArea; import net.runelite.api.coords.WorldPoint; @@ -38,7 +37,6 @@ import net.runelite.api.coords.WorldPoint; */ public interface Actor extends Renderable { - /** * Gets the combat level of the actor. * @@ -101,17 +99,15 @@ public interface Actor extends Renderable */ LocalPoint getLocalLocation(); - @VisibleForDevtools void setIdlePoseAnimation(int animation); - @VisibleForDevtools void setPoseAnimation(int animation); /** * Gets the orientation of the actor. * * @return the orientation - * @see net.runelite.api.coords.Angle + * @see api.coords.Angle */ int getOrientation(); @@ -129,7 +125,6 @@ public interface Actor extends Renderable * @param animation the animation ID * @see AnimationID */ - @VisibleForDevtools void setAnimation(int animation); /** @@ -137,7 +132,6 @@ public interface Actor extends Renderable * * @param actionFrame the animation frame */ - @VisibleForDevtools void setActionFrame(int actionFrame); /** @@ -146,13 +140,11 @@ public interface Actor extends Renderable * @return the graphic of the actor * @see GraphicID */ - int getGraphic(); + int getSpotAnimation(); - @VisibleForDevtools - void setGraphic(int graphic); + void setSpotAnimation(int graphic); - @VisibleForDevtools - void setSpotAnimFrame(int spotAnimFrame); + void setSpotAnimationFrame(int spotAnimFrame); /** * Gets the canvas area of the current tile the actor is standing on. @@ -192,7 +184,7 @@ public interface Actor extends Renderable * @param zOffset the z-axis offset * @return the sprite drawing location */ - Point getCanvasSpriteLocation(SpritePixels sprite, int zOffset); + Point getCanvasSpriteLocation(Sprite sprite, int zOffset); /** * Gets a point on the canvas of where this actors mini-map indicator @@ -216,7 +208,7 @@ public interface Actor extends Renderable * Gets the convex hull of the actors model. * * @return the convex hull - * @see net.runelite.api.model.Jarvis + * @see api.model.Jarvis */ Polygon getConvexHull(); 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 f4fd96d338..2503ddd1a3 100644 --- a/runelite-api/src/main/java/net/runelite/api/Client.java +++ b/runelite-api/src/main/java/net/runelite/api/Client.java @@ -30,7 +30,6 @@ import java.util.EnumSet; import java.util.List; import java.util.Map; import javax.annotation.Nullable; -import net.runelite.api.annotations.VisibleForDevtools; import net.runelite.api.coords.LocalPoint; import net.runelite.api.coords.WorldPoint; import net.runelite.api.hooks.Callbacks; @@ -43,7 +42,7 @@ import org.slf4j.Logger; /** * Represents the RuneScape client. */ -public interface Client extends GameEngine +public interface Client extends GameShell { /** * The client invokes these callbacks to communicate to @@ -60,8 +59,6 @@ public interface Client extends GameEngine */ Logger getLogger(); - String getBuildID(); - /** * Gets a list of all valid players from the player cache. * @@ -151,13 +148,6 @@ public interface Client extends GameEngine */ void setPassword(String password); - /** - * Sets the 6 digit pin used for authenticator on login screen. - * - * @param otp one time password - */ - void setOtp(String otp); - /** * Gets currently selected login field. 0 is username, and 1 is password. * @@ -165,13 +155,6 @@ public interface Client extends GameEngine */ int getCurrentLoginField(); - /** - * Gets index of current login state. 2 is username/password form, 4 is authenticator form - * - * @return current login state index - */ - int getLoginIndex(); - /** * Gets the account type of the logged in player. * @@ -346,7 +329,7 @@ public interface Client extends GameEngine * @return the corresponding item composition * @see ItemID */ - ItemComposition getItemDefinition(int id); + ItemDefinition getItemDefinition(int id); /** * Creates an item icon sprite with passed variables. @@ -360,7 +343,7 @@ public interface Client extends GameEngine * @param scale the scale of the sprite * @return the created sprite */ - SpritePixels createItemSprite(int itemId, int quantity, int border, int shadowColor, int stackable, boolean noted, int scale); + Sprite createItemSprite(int itemId, int quantity, int border, int shadowColor, int stackable, boolean noted, int scale); /** * Loads and creates the sprite images of the passed archive and file IDs. @@ -370,7 +353,7 @@ public interface Client extends GameEngine * @param fileId the sprites file ID * @return the sprite image of the file */ - SpritePixels[] getSprites(IndexDataBase source, int archiveId, int fileId); + Sprite[] getSprites(IndexDataBase source, int archiveId, int fileId); /** * Gets the sprite index. @@ -450,7 +433,7 @@ public interface Client extends GameEngine /** * Gets the widget that is being dragged on. *

- * The widget being dragged has the {@link net.runelite.api.widgets.WidgetConfig#DRAG_ON} + * The widget being dragged has the {@link api.widgets.WidgetConfig#DRAG_ON} * flag set, and is the widget currently under the dragged widget. * * @return the dragged on widget, null if not dragging any widget @@ -557,7 +540,7 @@ public interface Client extends GameEngine * @return world list */ World[] getWorldList(); - + /** * Gets an array of currently open right-click menu entries that can be * clicked and activated. @@ -569,7 +552,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} + * This method should typically be used in the context of the {@link api.events.MenuOpened} * event, since setting the menu entries will be overwritten the next frame * * @param entries new array of open menu entries @@ -652,13 +635,11 @@ public interface Client extends GameEngine * * @return local player variables */ - @VisibleForDevtools int[] getVarps(); /** * Gets an array of all client variables. */ - @VisibleForDevtools Map getVarcMap(); /** @@ -709,7 +690,6 @@ public interface Client extends GameEngine * @param varbit the variable * @param value the new value */ - @VisibleForDevtools void setSetting(Varbits varbit, int value); /** @@ -720,7 +700,6 @@ public interface Client extends GameEngine * @return the value * @see Varbits#id */ - @VisibleForDevtools int getVarbitValue(int[] varps, int varbitId); /** @@ -731,7 +710,6 @@ public interface Client extends GameEngine * @return the value * @see VarPlayer#id */ - @VisibleForDevtools int getVarpValue(int[] varps, int varpId); /** @@ -742,7 +720,6 @@ public interface Client extends GameEngine * @param value the value * @see VarPlayer#id */ - @VisibleForDevtools void setVarpValue(int[] varps, int varpId, int value); /** @@ -753,7 +730,6 @@ public interface Client extends GameEngine * @param value the value * @see Varbits#id */ - @VisibleForDevtools void setVarbitValue(int[] varps, int varbit, int value); /** @@ -851,7 +827,7 @@ public interface Client extends GameEngine * @return the corresponding object composition * @see ObjectID */ - ObjectComposition getObjectDefinition(int objectId); + ObjectDefinition getObjectDefinition(int objectId); /** * Gets the NPC composition corresponding to an NPCs ID. @@ -860,7 +836,7 @@ public interface Client extends GameEngine * @return the corresponding NPC composition * @see NpcID */ - NPCComposition getNpcDefinition(int npcId); + NPCDefinition getNpcDefinition(int npcId); /** * Gets an array of all world areas @@ -881,7 +857,7 @@ public interface Client extends GameEngine * * @return all mini-map dots */ - SpritePixels[] getMapDots(); + Sprite[] getMapDots(); /** * Gets the local clients game cycle. @@ -897,7 +873,7 @@ public interface Client extends GameEngine * * @return the map icons */ - SpritePixels[] getMapIcons(); + Sprite[] getMapIcons(); /** * Gets an array of mod icon sprites. @@ -929,7 +905,7 @@ public interface Client extends GameEngine * @param height the height * @return the sprite image */ - SpritePixels createSpritePixels(int[] pixels, int width, int height); + Sprite createSprite(int[] pixels, int width, int height); /** * Gets the location of the local player. @@ -944,7 +920,7 @@ public interface Client extends GameEngine * * @return all projectiles */ - List getProjectiles(); + java.util.List getProjectiles(); /** * Gets a list of all graphics objects currently drawn. @@ -1181,7 +1157,7 @@ public interface Client extends GameEngine * factors towards {@code zero} when stretching. * * @param state new integer scaling state - */ + */ void setStretchedIntegerScaling(boolean state); /** @@ -1243,7 +1219,7 @@ public interface Client extends GameEngine * @param z the plane * @return the map sprite */ - SpritePixels drawInstanceMap(int z); + Sprite drawInstanceMap(int z); /** * Executes a client script from the cache @@ -1366,13 +1342,6 @@ public interface Client extends GameEngine */ boolean isInInstancedRegion(); - /** - * Get the number of client ticks an item has been pressed - * - * @return the number of client ticks an item has been pressed - */ - int getItemPressedDuration(); - /** * Sets whether the client is hiding entities. *

@@ -1469,13 +1438,10 @@ public interface Client extends GameEngine @Nullable CollisionData[] getCollisionMaps(); - @VisibleForDevtools int[] getBoostedSkillLevels(); - @VisibleForDevtools int[] getRealSkillLevels(); - @VisibleForDevtools int[] getSkillExperiences(); void queueChangedSkill(Skill skill); @@ -1486,7 +1452,7 @@ public interface Client extends GameEngine * The key value in the map corresponds to the ID of the sprite, * and the value the sprite to replace it with. */ - Map getSpriteOverrides(); + Map getSpriteOverrides(); /** * Gets a mapping of widget sprites to override. @@ -1494,14 +1460,14 @@ public interface Client extends GameEngine * The key value in the map corresponds to the packed widget ID, * and the value the sprite to replace the widgets sprite with. */ - Map getWidgetSpriteOverrides(); + Map getWidgetSpriteOverrides(); /** * Sets the compass sprite. * - * @param spritePixels the new sprite + * @param Sprite the new sprite */ - void setCompass(SpritePixels spritePixels); + void setCompass(Sprite Sprite); /** * Returns widget sprite cache, to be used with {@link Client#getSpriteOverrides()} @@ -1619,19 +1585,6 @@ public interface Client extends GameEngine void checkClickbox(Model model, int orientation, int pitchSin, int pitchCos, int yawSin, int yawCos, int x, int y, int z, long hash); - /** - * Get the if1 widget whose item is being dragged - * - * @return - */ - Widget getIf1DraggedWidget(); - - /** - * Get the item index of the item being dragged on an if1 widget - * @return - */ - int getIf1DraggedItemIndex(); - /** * Sets if a widget is in target mode */ @@ -1640,15 +1593,15 @@ public interface Client extends GameEngine /** * Returns client item composition cache */ - NodeCache getItemCompositionCache(); + NodeCache getItemDefinitionCache(); - EnumComposition getEnum(int id); + EnumDefinition getEnum(int id); void draw2010Menu(); NodeCache getHealthBarCache(); - - void toggleRenderSelf(); + + void setRenderSelf(boolean enabled); /** * @@ -1662,9 +1615,9 @@ public interface Client extends GameEngine * @param canvasY Canvas Y Point */ void invokeMenuAction(int param0, int param1, int type, int id, String menuEntry, String targetString, int canvasX, int canvasY); - + MouseRecorder getMouseRecorder(); - + void setPrintMenuActions(boolean b); - + } diff --git a/runelite-api/src/main/java/net/runelite/api/CollisionData.java b/runelite-api/src/main/java/net/runelite/api/CollisionData.java index e3840bcb62..b7af82375d 100644 --- a/runelite-api/src/main/java/net/runelite/api/CollisionData.java +++ b/runelite-api/src/main/java/net/runelite/api/CollisionData.java @@ -40,7 +40,7 @@ public interface CollisionData * values can be obtained and used with the {@link CollisionDataFlag} class. * * @return all collision flags for the tiles in the scene - * @see Constants#SCENE_SIZE + * @see api.config.Constants#SCENE_SIZE */ int[][] getFlags(); } \ No newline at end of file diff --git a/runelite-api/src/main/java/net/runelite/api/DecorativeObject.java b/runelite-api/src/main/java/net/runelite/api/DecorativeObject.java index 145531fa5d..b6e535b412 100644 --- a/runelite-api/src/main/java/net/runelite/api/DecorativeObject.java +++ b/runelite-api/src/main/java/net/runelite/api/DecorativeObject.java @@ -35,7 +35,7 @@ public interface DecorativeObject extends TileObject * Gets the convex hull of the objects model. * * @return the convex hull - * @see net.runelite.api.model.Jarvis + * @see api.model.Jarvis */ Polygon getConvexHull(); Polygon getConvexHull2(); diff --git a/runelite-api/src/main/java/net/runelite/api/EnumComposition.java b/runelite-api/src/main/java/net/runelite/api/EnumDefinition.java similarity index 97% rename from runelite-api/src/main/java/net/runelite/api/EnumComposition.java rename to runelite-api/src/main/java/net/runelite/api/EnumDefinition.java index 00f8c30814..57df54147f 100644 --- a/runelite-api/src/main/java/net/runelite/api/EnumComposition.java +++ b/runelite-api/src/main/java/net/runelite/api/EnumDefinition.java @@ -24,7 +24,7 @@ */ package net.runelite.api; -public interface EnumComposition +public interface EnumDefinition { int[] getKeys(); diff --git a/runelite-api/src/main/java/net/runelite/api/EquipmentInventorySlot.java b/runelite-api/src/main/java/net/runelite/api/EquipmentInventorySlot.java index 6c4064549d..c09abcf9e3 100644 --- a/runelite-api/src/main/java/net/runelite/api/EquipmentInventorySlot.java +++ b/runelite-api/src/main/java/net/runelite/api/EquipmentInventorySlot.java @@ -29,7 +29,7 @@ package net.runelite.api; *

* These values are intended for use with the local players equipment * {@link ItemContainer} corresponding. For obtaining information about equipment - * in the {@link PlayerComposition}, use {@link net.runelite.api.kit.KitType}. + * in the {@link PlayerAppearance}, use {@link api.kit.KitType}. * * @see Client#getItemContainer(InventoryID) * @see InventoryID#EQUIPMENT diff --git a/runelite-api/src/main/java/net/runelite/api/GameObject.java b/runelite-api/src/main/java/net/runelite/api/GameObject.java index c721f35067..450ad6ce6c 100644 --- a/runelite-api/src/main/java/net/runelite/api/GameObject.java +++ b/runelite-api/src/main/java/net/runelite/api/GameObject.java @@ -57,7 +57,7 @@ public interface GameObject extends TileObject * Gets the convex hull of the actors model. * * @return the convex hull - * @see net.runelite.api.model.Jarvis + * @see api.model.Jarvis */ Polygon getConvexHull(); diff --git a/runelite-api/src/main/java/net/runelite/api/GameEngine.java b/runelite-api/src/main/java/net/runelite/api/GameShell.java similarity index 94% rename from runelite-api/src/main/java/net/runelite/api/GameEngine.java rename to runelite-api/src/main/java/net/runelite/api/GameShell.java index 30faa9691d..89a85d54da 100644 --- a/runelite-api/src/main/java/net/runelite/api/GameEngine.java +++ b/runelite-api/src/main/java/net/runelite/api/GameShell.java @@ -25,11 +25,12 @@ package net.runelite.api; import java.awt.Canvas; +import net.runelite.api.hooks.DrawCallbacks; /** * Represents the client game engine. */ -public interface GameEngine +public interface GameShell { /** * Gets the canvas that contains everything. @@ -52,5 +53,7 @@ public interface GameEngine */ boolean isClientThread(); + DrawCallbacks getDrawCallbacks(); + void resizeCanvas(); } diff --git a/runelite-api/src/main/java/net/runelite/api/GameState.java b/runelite-api/src/main/java/net/runelite/api/GameState.java index 5f9083f9ca..0751fe0e71 100644 --- a/runelite-api/src/main/java/net/runelite/api/GameState.java +++ b/runelite-api/src/main/java/net/runelite/api/GameState.java @@ -41,10 +41,6 @@ public enum GameState * The client is at the login screen. */ LOGIN_SCREEN(10), - /** - * The client is at the login screen entering authenticator code. - */ - LOGIN_SCREEN_AUTHENTICATOR(11), /** * There is a player logging in. */ diff --git a/runelite-api/src/main/java/net/runelite/api/GrandExchangeOffer.java b/runelite-api/src/main/java/net/runelite/api/GrandExchangeOffer.java index bef6cafbd1..24957bc956 100644 --- a/runelite-api/src/main/java/net/runelite/api/GrandExchangeOffer.java +++ b/runelite-api/src/main/java/net/runelite/api/GrandExchangeOffer.java @@ -1,27 +1,3 @@ -/* - * Copyright (c) 2017, Adam - * All rights reserved. - * - * Redistribution and use in source and binary forms, with or without - * modification, are permitted provided that the following conditions are met: - * - * 1. Redistributions of source code must retain the above copyright notice, this - * list of conditions and the following disclaimer. - * 2. Redistributions in binary form must reproduce the above copyright notice, - * this list of conditions and the following disclaimer in the documentation - * and/or other materials provided with the distribution. - * - * THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS" AND - * ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED - * WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE - * DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT OWNER OR CONTRIBUTORS BE LIABLE FOR - * ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES - * (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; - * LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND - * ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT - * (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS - * SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. - */ package net.runelite.api; /** diff --git a/runelite-api/src/main/java/net/runelite/api/GrandExchangeOfferState.java b/runelite-api/src/main/java/net/runelite/api/GrandExchangeOfferState.java index 7bfb359b7c..8438e0a300 100644 --- a/runelite-api/src/main/java/net/runelite/api/GrandExchangeOfferState.java +++ b/runelite-api/src/main/java/net/runelite/api/GrandExchangeOfferState.java @@ -1,28 +1,3 @@ -/* - * Copyright (c) 2017, Adam - * All rights reserved. - * - * Redistribution and use in source and binary forms, with or without - * modification, are permitted provided that the following conditions are met: - * - * 1. Redistributions of source code must retain the above copyright notice, this - * list of conditions and the following disclaimer. - * 2. Redistributions in binary form must reproduce the above copyright notice, - * this list of conditions and the following disclaimer in the documentation - * and/or other materials provided with the distribution. - * - * THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS" AND - * ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED - * WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE - * DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT OWNER OR CONTRIBUTORS BE LIABLE FOR - * ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES - * (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; - * LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND - * ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT - * (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS - * SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. - */ - package net.runelite.api; /** diff --git a/runelite-api/src/main/java/net/runelite/api/GraphicID.java b/runelite-api/src/main/java/net/runelite/api/GraphicID.java index 17b47c4224..25b527c8a2 100644 --- a/runelite-api/src/main/java/net/runelite/api/GraphicID.java +++ b/runelite-api/src/main/java/net/runelite/api/GraphicID.java @@ -27,7 +27,6 @@ package net.runelite.api; public class GraphicID { - public static final int WINE_MAKE = 47; public static final int SPLASH = 85; public static final int GREY_BUBBLE_TELEPORT = 86; public static final int TELEPORT = 111; diff --git a/runelite-api/src/main/java/net/runelite/api/HashTable.java b/runelite-api/src/main/java/net/runelite/api/HashTable.java index a7adda6c32..b1c23931b5 100644 --- a/runelite-api/src/main/java/net/runelite/api/HashTable.java +++ b/runelite-api/src/main/java/net/runelite/api/HashTable.java @@ -1,27 +1,3 @@ -/* - * Copyright (c) 2017, Adam - * All rights reserved. - * - * Redistribution and use in source and binary forms, with or without - * modification, are permitted provided that the following conditions are met: - * - * 1. Redistributions of source code must retain the above copyright notice, this - * list of conditions and the following disclaimer. - * 2. Redistributions in binary form must reproduce the above copyright notice, - * this list of conditions and the following disclaimer in the documentation - * and/or other materials provided with the distribution. - * - * THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS" AND - * ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED - * WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE - * DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT OWNER OR CONTRIBUTORS BE LIABLE FOR - * ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES - * (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; - * LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND - * ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT - * (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS - * SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. - */ package net.runelite.api; import java.util.Collection; diff --git a/runelite-api/src/main/java/net/runelite/api/HealthBar.java b/runelite-api/src/main/java/net/runelite/api/HealthBar.java index 2ffeedca28..0d37e01c2a 100644 --- a/runelite-api/src/main/java/net/runelite/api/HealthBar.java +++ b/runelite-api/src/main/java/net/runelite/api/HealthBar.java @@ -26,9 +26,9 @@ package net.runelite.api; public interface HealthBar { - SpritePixels getHealthBarFrontSprite(); + Sprite getHealthBarFrontSprite(); - SpritePixels getHealthBarBackSprite(); + Sprite getHealthBarBackSprite(); void setPadding(int padding); } diff --git a/runelite-api/src/main/java/net/runelite/api/HealthBarOverride.java b/runelite-api/src/main/java/net/runelite/api/HealthBarOverride.java index b53b480518..e6d213e750 100644 --- a/runelite-api/src/main/java/net/runelite/api/HealthBarOverride.java +++ b/runelite-api/src/main/java/net/runelite/api/HealthBarOverride.java @@ -30,8 +30,8 @@ import lombok.Data; @Data public class HealthBarOverride { - public final SpritePixels frontSprite; - public final SpritePixels backSprite; - public final SpritePixels frontSpriteLarge; - public final SpritePixels backSpriteLarge; + public final Sprite frontSprite; + public final Sprite backSprite; + public final Sprite frontSpriteLarge; + public final Sprite backSpriteLarge; } 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 67de31469e..58fb7d498a 100644 --- a/runelite-api/src/main/java/net/runelite/api/IndexDataBase.java +++ b/runelite-api/src/main/java/net/runelite/api/IndexDataBase.java @@ -1,27 +1,3 @@ -/* - * Copyright (c) 2018 Abex - * All rights reserved. - * - * Redistribution and use in source and binary forms, with or without - * modification, are permitted provided that the following conditions are met: - * - * 1. Redistributions of source code must retain the above copyright notice, this - * list of conditions and the following disclaimer. - * 2. Redistributions in binary form must reproduce the above copyright notice, - * this list of conditions and the following disclaimer in the documentation - * and/or other materials provided with the distribution. - * - * THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS" AND - * ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED - * WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE - * DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT OWNER OR CONTRIBUTORS BE LIABLE FOR - * ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES - * (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; - * LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND - * ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT - * (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS - * SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. - */ package net.runelite.api; /** diff --git a/runelite-api/src/main/java/net/runelite/api/ItemComposition.java b/runelite-api/src/main/java/net/runelite/api/ItemDefinition.java similarity index 64% rename from runelite-api/src/main/java/net/runelite/api/ItemComposition.java rename to runelite-api/src/main/java/net/runelite/api/ItemDefinition.java index eaaed4e2aa..ece176145f 100644 --- a/runelite-api/src/main/java/net/runelite/api/ItemComposition.java +++ b/runelite-api/src/main/java/net/runelite/api/ItemDefinition.java @@ -1,33 +1,9 @@ -/* - * Copyright (c) 2016-2017, Adam - * All rights reserved. - * - * Redistribution and use in source and binary forms, with or without - * modification, are permitted provided that the following conditions are met: - * - * 1. Redistributions of source code must retain the above copyright notice, this - * list of conditions and the following disclaimer. - * 2. Redistributions in binary form must reproduce the above copyright notice, - * this list of conditions and the following disclaimer in the documentation - * and/or other materials provided with the distribution. - * - * THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS" AND - * ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED - * WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE - * DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT OWNER OR CONTRIBUTORS BE LIABLE FOR - * ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES - * (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; - * LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND - * ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT - * (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS - * SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. - */ package net.runelite.api; /** * Represents the template of a specific item type. */ -public interface ItemComposition +public interface ItemDefinition { /** * Gets the items name. diff --git a/runelite-api/src/main/java/net/runelite/api/ItemID.java b/runelite-api/src/main/java/net/runelite/api/ItemID.java index 517d093058..813c354a01 100644 --- a/runelite-api/src/main/java/net/runelite/api/ItemID.java +++ b/runelite-api/src/main/java/net/runelite/api/ItemID.java @@ -6618,7 +6618,6 @@ public final class ItemID public static final int NO_EGGS = 10563; public static final int GRANITE_BODY = 10564; public static final int FIRE_CAPE_10566 = 10566; - public static final int HEALER_ICON_10567 = 10567; public static final int KERIS = 10581; public static final int KERISP = 10582; public static final int KERISP_10583 = 10583; @@ -9484,7 +9483,6 @@ public final class ItemID public static final int KINDLING_20799 = 20799; public static final int EMPTY_GOURD_VIAL = 20800; public static final int WATERFILLED_GOURD_VIAL = 20801; - public static final int HEALER_ICON_20802 = 20802; public static final int SNOW_GLOBE = 20832; public static final int SACK_OF_PRESENTS = 20834; public static final int GIANT_PRESENT = 20836; @@ -10307,14 +10305,6 @@ public final class ItemID public static final int ANCIENT_MEDALLION = 22299; public static final int ANCIENT_EFFIGY = 22302; public static final int ANCIENT_RELIC = 22305; - public static final int HEALER_ICON_22308 = 22308; - public static final int HEALER_ICON_22309 = 22309; - public static final int HEALER_ICON_22310 = 22310; - public static final int HEALER_ICON_22311 = 22311; - public static final int COLLECTOR_ICON_22312 = 22312; - public static final int COLLECTOR_ICON_22313 = 22313; - public static final int COLLECTOR_ICON_22314 = 22314; - public static final int COLLECTOR_ICON_22315 = 22315; public static final int PROP_SWORD = 22316; public static final int PET_CORPOREAL_CRITTER = 22318; public static final int TZREKZUK = 22319; @@ -10331,19 +10321,6 @@ public final class ItemID public static final int STARTER_SWORD = 22331; public static final int STARTER_BOW = 22333; public static final int STARTER_STAFF = 22335; - public static final int COLLECTOR_ICON_22337 = 22337; - public static final int COLLECTOR_ICON_22338 = 22338; - public static final int COLLECTOR_ICON_22339 = 22339; - public static final int DEFENDER_ICON_22340 = 22340; - public static final int DEFENDER_ICON_22341 = 22341; - public static final int DEFENDER_ICON_22342 = 22342; - public static final int DEFENDER_ICON_22343 = 22343; - public static final int DEFENDER_ICON_22344 = 22344; - public static final int DEFENDER_ICON_22345 = 22345; - public static final int ATTACKER_ICON_22346 = 22346; - public static final int ATTACKER_ICON_22347 = 22347; - public static final int ATTACKER_ICON_22348 = 22348; - public static final int ATTACKER_ICON_22349 = 22349; public static final int EGGSHELL_PLATEBODY = 22351; public static final int EGGSHELL_PLATELEGS = 22353; public static final int HOLY_HANDEGG = 22355; @@ -10510,16 +10487,6 @@ public final class ItemID public static final int TREE_TOP = 22715; public static final int TREE_SKIRT = 22717; public static final int CANDY_CANE = 22719; - public static final int ATTACKER_ICON_22721 = 22721; - public static final int ATTACKER_ICON_22722 = 22722; - public static final int ATTACKER_ICON_22723 = 22723; - public static final int COLLECTOR_ICON_22724 = 22724; - public static final int DEFENDER_ICON_22725 = 22725; - public static final int DEFENDER_ICON_22726 = 22726; - public static final int DEFENDER_ICON_22727 = 22727; - public static final int DEFENDER_ICON_22728 = 22728; - public static final int ATTACKER_ICON_22729 = 22729; - public static final int ATTACKER_ICON_22730 = 22730; public static final int DRAGON_HASTA = 22731; public static final int DRAGON_HASTAP = 22734; public static final int DRAGON_HASTAP_22737 = 22737; @@ -10824,33 +10791,5 @@ public final class ItemID public static final int TORMENTED_BRACELET_OR = 23444; public static final int GIANT_EASTER_EGG = 23446; public static final int BUNNYMAN_MASK = 23448; - public static final int ENCHANTED_LYREI = 23458; - public static final int ATTACKER_ICON_23460 = 23460; - public static final int ATTACKER_ICON_23461 = 23461; - public static final int ATTACKER_ICON_23462 = 23462; - public static final int ATTACKER_ICON_23463 = 23463; - public static final int ATTACKER_ICON_23464 = 23464; - public static final int ATTACKER_ICON_23465 = 23465; - public static final int DEFENDER_ICON_23466 = 23466; - public static final int DEFENDER_ICON_23467 = 23467; - public static final int DEFENDER_ICON_23468 = 23468; - public static final int DEFENDER_ICON_23469 = 23469; - public static final int DEFENDER_ICON_23470 = 23470; - public static final int COLLECTOR_ICON_23471 = 23471; - public static final int COLLECTOR_ICON_23472 = 23472; - public static final int COLLECTOR_ICON_23473 = 23473; - public static final int COLLECTOR_ICON_23474 = 23474; - public static final int COLLECTOR_ICON_23475 = 23475; - public static final int COLLECTOR_ICON_23476 = 23476; - public static final int COLLECTOR_ICON_23477 = 23477; - public static final int HEALER_ICON_23478 = 23478; - public static final int HEALER_ICON_23479 = 23479; - public static final int HEALER_ICON_23480 = 23480; - public static final int HEALER_ICON_23481 = 23481; - public static final int HEALER_ICON_23482 = 23482; - public static final int HEALER_ICON_23483 = 23483; - public static final int HEALER_ICON_23484 = 23484; - public static final int HEALER_ICON_23485 = 23485; - public static final int HEALER_ICON_23486 = 23486; /* This file is automatically generated. Do not edit. */ } diff --git a/runelite-api/src/main/java/net/runelite/api/MainBufferProvider.java b/runelite-api/src/main/java/net/runelite/api/MainBufferProvider.java index 33b3fea3f0..c644859bd2 100644 --- a/runelite-api/src/main/java/net/runelite/api/MainBufferProvider.java +++ b/runelite-api/src/main/java/net/runelite/api/MainBufferProvider.java @@ -36,5 +36,5 @@ public interface MainBufferProvider * * @return the loaded image */ - Image getImage(); + Image getImage(); //TODO } diff --git a/runelite-api/src/main/java/net/runelite/api/MapElementConfig.java b/runelite-api/src/main/java/net/runelite/api/MapElementConfig.java index 5ed46e25b9..39ed26b546 100644 --- a/runelite-api/src/main/java/net/runelite/api/MapElementConfig.java +++ b/runelite-api/src/main/java/net/runelite/api/MapElementConfig.java @@ -35,5 +35,5 @@ public interface MapElementConfig * @param unused unused value * @return the sprite icon to display on the world map */ - SpritePixels getMapIcon(boolean unused); + Sprite getMapIcon(boolean unused); } diff --git a/runelite-api/src/main/java/net/runelite/api/NPC.java b/runelite-api/src/main/java/net/runelite/api/NPC.java index d0647604b7..6ce26db152 100644 --- a/runelite-api/src/main/java/net/runelite/api/NPC.java +++ b/runelite-api/src/main/java/net/runelite/api/NPC.java @@ -35,7 +35,7 @@ public interface NPC extends Actor * Gets the ID of the NPC. * * @return the ID of the NPC - * @see NpcID + * //@see NpcID */ int getId(); @@ -59,7 +59,7 @@ public interface NPC extends Actor * * @return the composition */ - NPCComposition getComposition(); + NPCDefinition getDefinition(); /** * Get the composition for this NPC and transform it if required @@ -67,7 +67,7 @@ public interface NPC extends Actor * @return the transformed NPC */ @Nullable - NPCComposition getTransformedComposition(); + NPCDefinition getTransformedDefinition(); /** * Returns true if this NPC has died diff --git a/runelite-api/src/main/java/net/runelite/api/NPCComposition.java b/runelite-api/src/main/java/net/runelite/api/NPCDefinition.java similarity index 95% rename from runelite-api/src/main/java/net/runelite/api/NPCComposition.java rename to runelite-api/src/main/java/net/runelite/api/NPCDefinition.java index 0386ba954f..fa70c5051e 100644 --- a/runelite-api/src/main/java/net/runelite/api/NPCComposition.java +++ b/runelite-api/src/main/java/net/runelite/api/NPCDefinition.java @@ -24,10 +24,7 @@ */ package net.runelite.api; -/** - * Represents the template of a specific NPC type. - */ -public interface NPCComposition +public interface NPCDefinition { /** * Gets the name of the NPC. @@ -99,7 +96,7 @@ public interface NPCComposition * * @return the transformed composition */ - NPCComposition transform(); + NPCDefinition transform(); /** * Gets the size of the NPC. diff --git a/runelite-api/src/main/java/net/runelite/api/NullItemID.java b/runelite-api/src/main/java/net/runelite/api/NullItemID.java index 9007300837..1bc9028389 100644 --- a/runelite-api/src/main/java/net/runelite/api/NullItemID.java +++ b/runelite-api/src/main/java/net/runelite/api/NullItemID.java @@ -3834,6 +3834,7 @@ public final class NullItemID public static final int NULL_10509 = 10509; public static final int NULL_10511 = 10511; public static final int NULL_10565 = 10565; + public static final int NULL_10567 = 10567; public static final int NULL_10568 = 10568; public static final int NULL_10569 = 10569; public static final int NULL_10570 = 10570; @@ -11131,6 +11132,7 @@ public final class NullItemID public static final int NULL_20793 = 20793; public static final int NULL_20795 = 20795; public static final int NULL_20797 = 20797; + public static final int NULL_20802 = 20802; public static final int NULL_20803 = 20803; public static final int NULL_20804 = 20804; public static final int NULL_20805 = 20805; @@ -11814,11 +11816,32 @@ public final class NullItemID public static final int NULL_22304 = 22304; public static final int NULL_22306 = 22306; public static final int NULL_22307 = 22307; + public static final int NULL_22308 = 22308; + public static final int NULL_22309 = 22309; + public static final int NULL_22310 = 22310; + public static final int NULL_22311 = 22311; + public static final int NULL_22312 = 22312; + public static final int NULL_22313 = 22313; + public static final int NULL_22314 = 22314; + public static final int NULL_22315 = 22315; public static final int NULL_22317 = 22317; public static final int NULL_22329 = 22329; public static final int NULL_22332 = 22332; public static final int NULL_22334 = 22334; public static final int NULL_22336 = 22336; + public static final int NULL_22337 = 22337; + public static final int NULL_22338 = 22338; + public static final int NULL_22339 = 22339; + public static final int NULL_22340 = 22340; + public static final int NULL_22341 = 22341; + public static final int NULL_22342 = 22342; + public static final int NULL_22343 = 22343; + public static final int NULL_22344 = 22344; + public static final int NULL_22345 = 22345; + public static final int NULL_22346 = 22346; + public static final int NULL_22347 = 22347; + public static final int NULL_22348 = 22348; + public static final int NULL_22349 = 22349; public static final int NULL_22350 = 22350; public static final int NULL_22352 = 22352; public static final int NULL_22354 = 22354; @@ -12024,6 +12047,16 @@ public final class NullItemID public static final int NULL_22716 = 22716; public static final int NULL_22718 = 22718; public static final int NULL_22720 = 22720; + public static final int NULL_22721 = 22721; + public static final int NULL_22722 = 22722; + public static final int NULL_22723 = 22723; + public static final int NULL_22724 = 22724; + public static final int NULL_22725 = 22725; + public static final int NULL_22726 = 22726; + public static final int NULL_22727 = 22727; + public static final int NULL_22728 = 22728; + public static final int NULL_22729 = 22729; + public static final int NULL_22730 = 22730; public static final int NULL_22732 = 22732; public static final int NULL_22733 = 22733; public static final int NULL_22735 = 22735; @@ -12423,6 +12456,5 @@ public final class NullItemID public static final int NULL_23455 = 23455; public static final int NULL_23456 = 23456; public static final int NULL_23457 = 23457; - public static final int NULL_23459 = 23459; /* This file is automatically generated. Do not edit. */ } diff --git a/runelite-api/src/main/java/net/runelite/api/ObjectComposition.java b/runelite-api/src/main/java/net/runelite/api/ObjectDefinition.java similarity index 97% rename from runelite-api/src/main/java/net/runelite/api/ObjectComposition.java rename to runelite-api/src/main/java/net/runelite/api/ObjectDefinition.java index 3b90539c19..bc2e4f5b0a 100644 --- a/runelite-api/src/main/java/net/runelite/api/ObjectComposition.java +++ b/runelite-api/src/main/java/net/runelite/api/ObjectDefinition.java @@ -27,7 +27,7 @@ package net.runelite.api; /** * Represents the template of a specific object. */ -public interface ObjectComposition +public interface ObjectDefinition { /** * Gets ID for the object. @@ -78,5 +78,5 @@ public interface ObjectComposition * * @return the impostor */ - ObjectComposition getImpostor(); + ObjectDefinition getImpostor(); } diff --git a/runelite-api/src/main/java/net/runelite/api/Perspective.java b/runelite-api/src/main/java/net/runelite/api/Perspective.java index 45469cc00c..a03af2049f 100644 --- a/runelite-api/src/main/java/net/runelite/api/Perspective.java +++ b/runelite-api/src/main/java/net/runelite/api/Perspective.java @@ -24,6 +24,7 @@ */ package net.runelite.api; +import static api.config.Constants.TILE_FLAG_BRIDGE; import java.awt.FontMetrics; import java.awt.Graphics2D; import java.awt.Polygon; @@ -36,7 +37,6 @@ import java.util.List; import java.util.stream.Collectors; import javax.annotation.Nonnull; import javax.annotation.Nullable; -import static net.runelite.api.Constants.TILE_FLAG_BRIDGE; import net.runelite.api.coords.LocalPoint; import net.runelite.api.model.Jarvis; import net.runelite.api.model.Triangle; @@ -471,7 +471,7 @@ public class Perspective public static Point getCanvasSpriteLocation( @Nonnull Client client, @Nonnull LocalPoint localLocation, - @Nonnull SpritePixels sprite, + @Nonnull Sprite sprite, int zOffset) { int plane = client.getPlane(); @@ -490,7 +490,7 @@ public class Perspective } /** - * You don't want this. Use {@link TileObject#getClickbox()} instead. + * You don't want this. Use {@link //TileObject#getClickbox()} instead. *

* Get the on-screen clickable area of {@code model} as though it's for the * object on the tile at ({@code localX}, {@code localY}) and rotated to @@ -555,7 +555,7 @@ public class Perspective for (Triangle triangle : triangles) { - Vertex _a = triangle.getA(); + api.model.Vertex _a = triangle.getA(); Point a = localToCanvas(client, point.getX() - _a.getX(), point.getY() - _a.getZ(), diff --git a/runelite-api/src/main/java/net/runelite/api/Player.java b/runelite-api/src/main/java/net/runelite/api/Player.java index 2e844c6ab6..7f77a461ee 100644 --- a/runelite-api/src/main/java/net/runelite/api/Player.java +++ b/runelite-api/src/main/java/net/runelite/api/Player.java @@ -34,7 +34,7 @@ public interface Player extends Actor { @Override int getCombatLevel(); - + int getPlayerId(); /** @@ -42,7 +42,7 @@ public interface Player extends Actor * * @return the composition */ - PlayerComposition getPlayerComposition(); + PlayerAppearance getPlayerAppearance(); /** * Gets the polygons that make up the players model. @@ -79,10 +79,9 @@ public interface Player extends Actor * @return the overhead icon */ HeadIcon getOverheadIcon(); - + /** * Gets the displayed skull icon of the player. - * Only works on the local player. * * @return the skull icon */ diff --git a/runelite-api/src/main/java/net/runelite/api/PlayerComposition.java b/runelite-api/src/main/java/net/runelite/api/PlayerAppearance.java similarity index 94% rename from runelite-api/src/main/java/net/runelite/api/PlayerComposition.java rename to runelite-api/src/main/java/net/runelite/api/PlayerAppearance.java index 20ac41b6cb..2348968eda 100644 --- a/runelite-api/src/main/java/net/runelite/api/PlayerComposition.java +++ b/runelite-api/src/main/java/net/runelite/api/PlayerAppearance.java @@ -24,13 +24,12 @@ */ package net.runelite.api; -import net.runelite.api.annotations.VisibleForDevtools; import net.runelite.api.kit.KitType; /** * Represents the template of a player. */ -public interface PlayerComposition +public interface PlayerAppearance { /** * Gets an array of IDs related to equipment slots. @@ -63,9 +62,7 @@ public interface PlayerComposition * Update the cached hash value for player equipment * Used to cache the player models based on equipment. */ - @VisibleForDevtools void setHash(); - @VisibleForDevtools void setTransformedNpcId(int id); } diff --git a/runelite-api/src/main/java/net/runelite/api/ScriptEvent.java b/runelite-api/src/main/java/net/runelite/api/ScriptEvent.java index 2af2c1bd92..c67610a79f 100644 --- a/runelite-api/src/main/java/net/runelite/api/ScriptEvent.java +++ b/runelite-api/src/main/java/net/runelite/api/ScriptEvent.java @@ -43,7 +43,7 @@ public interface ScriptEvent * Gets the widget of the event. * * @return the widget - * @see net.runelite.api.widgets.Widget + * @see api.widgets.Widget */ Widget getSource(); @@ -58,7 +58,7 @@ public interface ScriptEvent * Gets the target of the menu option * * @return the target - * @see net.runelite.api.events.MenuOptionClicked + * @see api.events.MenuOptionClicked */ String getOpbase(); } diff --git a/runelite-api/src/main/java/net/runelite/api/Skill.java b/runelite-api/src/main/java/net/runelite/api/Skill.java index 50ae201476..db84b6f364 100644 --- a/runelite-api/src/main/java/net/runelite/api/Skill.java +++ b/runelite-api/src/main/java/net/runelite/api/Skill.java @@ -1,28 +1,3 @@ -/* - * Copyright (c) 2016-2017, Adam - * All rights reserved. - * - * Redistribution and use in source and binary forms, with or without - * modification, are permitted provided that the following conditions are met: - * - * 1. Redistributions of source code must retain the above copyright notice, this - * list of conditions and the following disclaimer. - * 2. Redistributions in binary form must reproduce the above copyright notice, - * this list of conditions and the following disclaimer in the documentation - * and/or other materials provided with the distribution. - * - * THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS" AND - * ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED - * WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE - * DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT OWNER OR CONTRIBUTORS BE LIABLE FOR - * ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES - * (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; - * LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND - * ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT - * (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS - * SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. - */ - package net.runelite.api; /** diff --git a/runelite-api/src/main/java/net/runelite/api/SpritePixels.java b/runelite-api/src/main/java/net/runelite/api/Sprite.java similarity index 93% rename from runelite-api/src/main/java/net/runelite/api/SpritePixels.java rename to runelite-api/src/main/java/net/runelite/api/Sprite.java index 4ebdbdba1c..b6fed1bab4 100644 --- a/runelite-api/src/main/java/net/runelite/api/SpritePixels.java +++ b/runelite-api/src/main/java/net/runelite/api/Sprite.java @@ -30,7 +30,7 @@ import java.awt.image.BufferedImage; /** * Represents data about the pixels of a sprite image. */ -public interface SpritePixels +public interface Sprite { int DEFAULT_SHADOW_COLOR = 3153952; @@ -79,14 +79,14 @@ public interface SpritePixels void toBufferedImage(BufferedImage img) throws IllegalArgumentException; /** - * Writes the contents of the SpritePixels with chosen outline to the BufferedImage + * Writes the contents of the Sprite with chosen outline to the BufferedImage * * @param color target color */ BufferedImage toBufferedOutline(Color color); /** - * Writes the contents of the SpritePixels with chosen outline to the BufferedImage + * Writes the contents of the Sprite with chosen outline to the BufferedImage * * @param img target image * @param color target color diff --git a/runelite-api/src/main/java/net/runelite/api/Tile.java b/runelite-api/src/main/java/net/runelite/api/Tile.java index 0911c17de1..a0ff488924 100644 --- a/runelite-api/src/main/java/net/runelite/api/Tile.java +++ b/runelite-api/src/main/java/net/runelite/api/Tile.java @@ -134,8 +134,6 @@ public interface Tile /** * Return the tile under this one, if this tile is a bridge - * - * @return */ Tile getBridge(); } diff --git a/runelite-api/src/main/java/net/runelite/api/VarPlayer.java b/runelite-api/src/main/java/net/runelite/api/VarPlayer.java index 72c361c27b..56691e4a24 100644 --- a/runelite-api/src/main/java/net/runelite/api/VarPlayer.java +++ b/runelite-api/src/main/java/net/runelite/api/VarPlayer.java @@ -260,5 +260,5 @@ public enum VarPlayer - private final int id; + public final int id; } diff --git a/runelite-api/src/main/java/net/runelite/api/WallObject.java b/runelite-api/src/main/java/net/runelite/api/WallObject.java index ddc4a734cd..9a7156b654 100644 --- a/runelite-api/src/main/java/net/runelite/api/WallObject.java +++ b/runelite-api/src/main/java/net/runelite/api/WallObject.java @@ -25,33 +25,28 @@ package net.runelite.api; /** - * Represents one or two walls on a tile + * Represents the wall of a tile, which is an un-passable boundary. */ public interface WallObject extends TileObject { /** - * A bitfield with the orientation of a wall - * 1 = East - * 2 = North - * 4 = West - * 8 = South + * Gets the first orientation of the wall. + * + * @return the first orientation, 0-2048 where 0 is north */ int getOrientationA(); /** - * A bitfield containing the orientation of the second wall on this tile, - * or 0 if there is no second wall. - * @see #getOrientationA + * Gets the second orientation value of the wall. + * + * @return the second orientation, 0-2048 where 0 is north */ int getOrientationB(); /** - * A bitfield containing various flags: - *

{@code
-	 * object type id = bits & 0x20
-	 * orientation (0-3) = bits >>> 6 & 3
-	 * supports items = bits >>> 8 & 1
-	 * }
+ * Gets the boundary configuration of the wall. + * + * @return the boundary configuration */ int getConfig(); diff --git a/runelite-api/src/main/java/net/runelite/api/WidgetNode.java b/runelite-api/src/main/java/net/runelite/api/WidgetNode.java index dbdaf9936e..f44b6bf461 100644 --- a/runelite-api/src/main/java/net/runelite/api/WidgetNode.java +++ b/runelite-api/src/main/java/net/runelite/api/WidgetNode.java @@ -1,27 +1,3 @@ -/* - * Copyright (c) 2017, Adam - * All rights reserved. - * - * Redistribution and use in source and binary forms, with or without - * modification, are permitted provided that the following conditions are met: - * - * 1. Redistributions of source code must retain the above copyright notice, this - * list of conditions and the following disclaimer. - * 2. Redistributions in binary form must reproduce the above copyright notice, - * this list of conditions and the following disclaimer in the documentation - * and/or other materials provided with the distribution. - * - * THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS" AND - * ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED - * WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE - * DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT OWNER OR CONTRIBUTORS BE LIABLE FOR - * ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES - * (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; - * LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND - * ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT - * (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS - * SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. - */ package net.runelite.api; /** @@ -33,7 +9,7 @@ public interface WidgetNode extends Node * The ID of the widget. * * @return the ID of the widget - * @see net.runelite.api.widgets.Widget + * @see api.widgets.Widget */ int getId(); } diff --git a/runelite-api/src/main/java/net/runelite/api/World.java b/runelite-api/src/main/java/net/runelite/api/World.java index df26615843..19829149a0 100644 --- a/runelite-api/src/main/java/net/runelite/api/World.java +++ b/runelite-api/src/main/java/net/runelite/api/World.java @@ -1,29 +1,4 @@ -/* - * Copyright (c) 2018, Tomas Slusny - * All rights reserved. - * - * Redistribution and use in source and binary forms, with or without - * modification, are permitted provided that the following conditions are met: - * - * 1. Redistributions of source code must retain the above copyright notice, this - * list of conditions and the following disclaimer. - * 2. Redistributions in binary form must reproduce the above copyright notice, - * this list of conditions and the following disclaimer in the documentation - * and/or other materials provided with the distribution. - * - * THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS" AND - * ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED - * WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE - * DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT OWNER OR CONTRIBUTORS BE LIABLE FOR - * ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES - * (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; - * LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND - * ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT - * (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS - * SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. - */ package net.runelite.api; - import java.util.EnumSet; /** diff --git a/runelite-api/src/main/java/net/runelite/api/WorldType.java b/runelite-api/src/main/java/net/runelite/api/WorldType.java index 0ecfd1ed94..06ec983a12 100644 --- a/runelite-api/src/main/java/net/runelite/api/WorldType.java +++ b/runelite-api/src/main/java/net/runelite/api/WorldType.java @@ -1,27 +1,3 @@ -/* - * Copyright (c) 2018, Tomas Slusny - * All rights reserved. - * - * Redistribution and use in source and binary forms, with or without - * modification, are permitted provided that the following conditions are met: - * - * 1. Redistributions of source code must retain the above copyright notice, this - * list of conditions and the following disclaimer. - * 2. Redistributions in binary form must reproduce the above copyright notice, - * this list of conditions and the following disclaimer in the documentation - * and/or other materials provided with the distribution. - * - * THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS" AND - * ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED - * WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE - * DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT OWNER OR CONTRIBUTORS BE LIABLE FOR - * ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES - * (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; - * LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND - * ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT - * (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS - * SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. - */ package net.runelite.api; import java.util.Collection; diff --git a/runelite-api/src/main/java/net/runelite/api/coords/Angle.java b/runelite-api/src/main/java/net/runelite/api/coords/Angle.java index 93b830a2fe..1cb9184bf2 100644 --- a/runelite-api/src/main/java/net/runelite/api/coords/Angle.java +++ b/runelite-api/src/main/java/net/runelite/api/coords/Angle.java @@ -24,11 +24,11 @@ */ package net.runelite.api.coords; +import static api.coords.Direction.EAST; +import static api.coords.Direction.NORTH; +import static api.coords.Direction.SOUTH; +import static api.coords.Direction.WEST; import lombok.Value; -import static net.runelite.api.coords.Direction.EAST; -import static net.runelite.api.coords.Direction.NORTH; -import static net.runelite.api.coords.Direction.SOUTH; -import static net.runelite.api.coords.Direction.WEST; /** * Represents an in-game orientation that uses fixed point arithmetic. diff --git a/runelite-api/src/main/java/net/runelite/api/coords/WorldArea.java b/runelite-api/src/main/java/net/runelite/api/coords/WorldArea.java index 9abb3aeac8..1aca6430c7 100644 --- a/runelite-api/src/main/java/net/runelite/api/coords/WorldArea.java +++ b/runelite-api/src/main/java/net/runelite/api/coords/WorldArea.java @@ -31,9 +31,9 @@ import lombok.Getter; import net.runelite.api.Client; import net.runelite.api.CollisionData; import net.runelite.api.CollisionDataFlag; -import net.runelite.api.Constants; import net.runelite.api.Point; import net.runelite.api.Tile; +import net.runelite.api.config.Constants; /** * Represents an area on the world. @@ -208,7 +208,7 @@ public class WorldArea * Note that this method does not consider other actors as * a collision, but most non-boss NPCs do check for collision * with some actors. For actor collision checking, use the - * {@link #canTravelInDirection(Client, int, int, Predicate)} method. + * {@link #canTravelInDirection(Client, int, int, java.util.function.Predicate)} method. * * @param client the client to test in * @param dx the x-axis direction to travel (-1, 0, or 1) diff --git a/runelite-api/src/main/java/net/runelite/api/coords/WorldPoint.java b/runelite-api/src/main/java/net/runelite/api/coords/WorldPoint.java index ee7c67b20b..c6f84d3550 100644 --- a/runelite-api/src/main/java/net/runelite/api/coords/WorldPoint.java +++ b/runelite-api/src/main/java/net/runelite/api/coords/WorldPoint.java @@ -25,13 +25,13 @@ */ package net.runelite.api.coords; +import static api.config.Constants.CHUNK_SIZE; import java.util.ArrayList; import java.util.Collection; import java.util.Collections; import java.util.List; import lombok.Value; import net.runelite.api.Client; -import static net.runelite.api.Constants.CHUNK_SIZE; import net.runelite.api.Perspective; /** diff --git a/runelite-api/src/main/java/net/runelite/api/events/AnimationChanged.java b/runelite-api/src/main/java/net/runelite/api/events/AnimationChanged.java index fe3acab950..379ea5db36 100644 --- a/runelite-api/src/main/java/net/runelite/api/events/AnimationChanged.java +++ b/runelite-api/src/main/java/net/runelite/api/events/AnimationChanged.java @@ -1,27 +1,3 @@ -/* - * Copyright (c) 2016-2017, Abel Briggs - * All rights reserved. - * - * Redistribution and use in source and binary forms, with or without - * modification, are permitted provided that the following conditions are met: - * - * 1. Redistributions of source code must retain the above copyright notice, this - * list of conditions and the following disclaimer. - * 2. Redistributions in binary form must reproduce the above copyright notice, - * this list of conditions and the following disclaimer in the documentation - * and/or other materials provided with the distribution. - * - * THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS" AND - * ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED - * WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE - * DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT OWNER OR CONTRIBUTORS BE LIABLE FOR - * ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES - * (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; - * LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND - * ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT - * (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS - * SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. - */ package net.runelite.api.events; import lombok.Data; @@ -38,7 +14,7 @@ import net.runelite.api.Actor; *
  • A player starts or stops dancing
  • * * - * @see net.runelite.api.AnimationID + * @see api.AnimationID */ @Data public class AnimationChanged diff --git a/runelite-api/src/main/java/net/runelite/api/events/BoostedLevelChanged.java b/runelite-api/src/main/java/net/runelite/api/events/BoostedLevelChanged.java index 29dd7bd9b1..3bc2946bf8 100644 --- a/runelite-api/src/main/java/net/runelite/api/events/BoostedLevelChanged.java +++ b/runelite-api/src/main/java/net/runelite/api/events/BoostedLevelChanged.java @@ -38,7 +38,7 @@ import net.runelite.api.Skill; *
  • Levelling up a skill
  • * *

    - * Use {@link net.runelite.api.Client#getBoostedSkillLevel(Skill)} in order to + * Use {@link api.Client#getBoostedSkillLevel(Skill)} in order to * retrieve the newly boosted skill level. */ @Data diff --git a/runelite-api/src/main/java/net/runelite/api/events/GraphicChanged.java b/runelite-api/src/main/java/net/runelite/api/events/GraphicChanged.java deleted file mode 100644 index 9a50a5671c..0000000000 --- a/runelite-api/src/main/java/net/runelite/api/events/GraphicChanged.java +++ /dev/null @@ -1,52 +0,0 @@ -/* - * Copyright (c) 2018, Adam - * All rights reserved. - * - * Redistribution and use in source and binary forms, with or without - * modification, are permitted provided that the following conditions are met: - * - * 1. Redistributions of source code must retain the above copyright notice, this - * list of conditions and the following disclaimer. - * 2. Redistributions in binary form must reproduce the above copyright notice, - * this list of conditions and the following disclaimer in the documentation - * and/or other materials provided with the distribution. - * - * THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS" AND - * ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED - * WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE - * DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT OWNER OR CONTRIBUTORS BE LIABLE FOR - * ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES - * (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; - * LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND - * ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT - * (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS - * SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. - */ -package net.runelite.api.events; - -import lombok.Data; -import net.runelite.api.Actor; - -/** - * An event where the graphic of an {@link Actor} has changed. - *

    - * The graphic the player has changed to can be obtained using - * {@link Actor#getGraphic()}. - *

    - * Examples of when this event may trigger include: - *

      - *
    • Casting a magic spell
    • - *
    • Using a fairy ring
    • - *
    • Breaking a teleport tab
    • - *
    - * - * @see net.runelite.api.GraphicID - */ -@Data -public class GraphicChanged -{ - /** - * The actor that has had their graphic changed. - */ - private Actor actor; -} \ No newline at end of file diff --git a/runelite-api/src/main/java/net/runelite/api/events/InteractingChanged.java b/runelite-api/src/main/java/net/runelite/api/events/InteractingChanged.java index fdfe0d1272..0001fa96a0 100644 --- a/runelite-api/src/main/java/net/runelite/api/events/InteractingChanged.java +++ b/runelite-api/src/main/java/net/runelite/api/events/InteractingChanged.java @@ -1,27 +1,3 @@ -/* - * Copyright (c) 2018, Adam - * All rights reserved. - * - * Redistribution and use in source and binary forms, with or without - * modification, are permitted provided that the following conditions are met: - * - * 1. Redistributions of source code must retain the above copyright notice, this - * list of conditions and the following disclaimer. - * 2. Redistributions in binary form must reproduce the above copyright notice, - * this list of conditions and the following disclaimer in the documentation - * and/or other materials provided with the distribution. - * - * THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS" AND - * ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED - * WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE - * DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT OWNER OR CONTRIBUTORS BE LIABLE FOR - * ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES - * (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; - * LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND - * ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT - * (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS - * SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. - */ package net.runelite.api.events; import lombok.Value; diff --git a/runelite-api/src/main/java/net/runelite/api/events/ItemContainerChanged.java b/runelite-api/src/main/java/net/runelite/api/events/ItemContainerChanged.java index f4c5d8163f..f90914612f 100644 --- a/runelite-api/src/main/java/net/runelite/api/events/ItemContainerChanged.java +++ b/runelite-api/src/main/java/net/runelite/api/events/ItemContainerChanged.java @@ -28,7 +28,7 @@ import lombok.Value; import net.runelite.api.ItemContainer; /** - * An event called whenever the stack size of an {@link net.runelite.api.Item} + * An event called whenever the stack size of an {@link api.Item} * in an {@link ItemContainer} is modified. *

    * Examples of when this event may trigger include: diff --git a/runelite-api/src/main/java/net/runelite/api/events/MenuOptionClicked.java b/runelite-api/src/main/java/net/runelite/api/events/MenuOptionClicked.java index 8eb4707ae8..1ec640a031 100644 --- a/runelite-api/src/main/java/net/runelite/api/events/MenuOptionClicked.java +++ b/runelite-api/src/main/java/net/runelite/api/events/MenuOptionClicked.java @@ -64,7 +64,7 @@ public class MenuOptionClicked /** * The ID of the widget where the menu was clicked. * - * @see net.runelite.api.widgets.WidgetID + * @see api.WidgetID */ private int widgetId; /** diff --git a/runelite-api/src/main/java/net/runelite/api/events/NpcActionChanged.java b/runelite-api/src/main/java/net/runelite/api/events/NpcActionChanged.java index 7539821167..35838e067c 100644 --- a/runelite-api/src/main/java/net/runelite/api/events/NpcActionChanged.java +++ b/runelite-api/src/main/java/net/runelite/api/events/NpcActionChanged.java @@ -25,10 +25,10 @@ package net.runelite.api.events; import lombok.Data; -import net.runelite.api.NPCComposition; +import net.runelite.api.NPCDefinition; /** - * An event where an action of an {@link NPCComposition} has changed. + * An event where an action of an {@link NPCDefinition} has changed. */ @Data public class NpcActionChanged @@ -36,7 +36,7 @@ public class NpcActionChanged /** * The NPC composition that has been changed. */ - private NPCComposition npcComposition; + private NPCDefinition npcDefinition; /** * The raw index of the modified action. */ diff --git a/runelite-api/src/main/java/net/runelite/api/events/OverheadTextChanged.java b/runelite-api/src/main/java/net/runelite/api/events/OverheadTextChanged.java index a366eb297a..a6b6c87a81 100644 --- a/runelite-api/src/main/java/net/runelite/api/events/OverheadTextChanged.java +++ b/runelite-api/src/main/java/net/runelite/api/events/OverheadTextChanged.java @@ -1,35 +1,8 @@ -/* - * Copyright (c) 2018, Magic fTail - * All rights reserved. - * - * Redistribution and use in source and binary forms, with or without - * modification, are permitted provided that the following conditions are met: - * - * 1. Redistributions of source code must retain the above copyright notice, this - * list of conditions and the following disclaimer. - * 2. Redistributions in binary form must reproduce the above copyright notice, - * this list of conditions and the following disclaimer in the documentation - * and/or other materials provided with the distribution. - * - * THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS" AND - * ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED - * WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE - * DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT OWNER OR CONTRIBUTORS BE LIABLE FOR - * ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES - * (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; - * LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND - * ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT - * (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS - * SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. - */ package net.runelite.api.events; import lombok.Value; import net.runelite.api.Actor; -/** - * Event fired when an actors overhead text is changed. - */ @Value public class OverheadTextChanged { diff --git a/runelite-api/src/main/java/net/runelite/api/events/PostItemComposition.java b/runelite-api/src/main/java/net/runelite/api/events/PostItemDefinition.java similarity index 89% rename from runelite-api/src/main/java/net/runelite/api/events/PostItemComposition.java rename to runelite-api/src/main/java/net/runelite/api/events/PostItemDefinition.java index 1e9000cfd1..35718b5ea9 100644 --- a/runelite-api/src/main/java/net/runelite/api/events/PostItemComposition.java +++ b/runelite-api/src/main/java/net/runelite/api/events/PostItemDefinition.java @@ -25,17 +25,17 @@ package net.runelite.api.events; import lombok.Data; -import net.runelite.api.ItemComposition; +import net.runelite.api.ItemDefinition; /** - * An event called after a new {@link ItemComposition} is created and + * An event called after a new {@link ItemDefinition} is created and * its data is initialized. */ @Data -public class PostItemComposition +public class PostItemDefinition { /** * The newly created item. */ - private ItemComposition itemComposition; + private ItemDefinition itemDefinition; } diff --git a/runelite-api/src/main/java/net/runelite/api/events/SpotAnimationChanged.java b/runelite-api/src/main/java/net/runelite/api/events/SpotAnimationChanged.java new file mode 100644 index 0000000000..7cfbd0bc86 --- /dev/null +++ b/runelite-api/src/main/java/net/runelite/api/events/SpotAnimationChanged.java @@ -0,0 +1,28 @@ +package net.runelite.api.events; + +import lombok.Data; +import net.runelite.api.Actor; + +/** + * An event where the graphic of an {@link Actor} has changed. + *

    + * The graphic the player has changed to can be obtained using + * {@link Actor#getSpotAnimation()}. + *

    + * Examples of when this event may trigger include: + *

      + *
    • Casting a magic spell
    • + *
    • Using a fairy ring
    • + *
    • Breaking a teleport tab
    • + *
    + * + * @see api.GraphicID + */ +@Data +public class SpotAnimationChanged +{ + /** + * The actor that has had their graphic changed. + */ + private Actor actor; +} \ No newline at end of file diff --git a/runelite-api/src/main/java/net/runelite/api/events/WidgetLoaded.java b/runelite-api/src/main/java/net/runelite/api/events/WidgetLoaded.java index c71bc41634..fa99117af8 100644 --- a/runelite-api/src/main/java/net/runelite/api/events/WidgetLoaded.java +++ b/runelite-api/src/main/java/net/runelite/api/events/WidgetLoaded.java @@ -27,7 +27,7 @@ package net.runelite.api.events; import lombok.Data; /** - * An event where a {@link net.runelite.api.widgets.Widget} has been loaded. + * An event where a {@link api.widgets.Widget} has been loaded. */ @Data public class WidgetLoaded diff --git a/runelite-api/src/main/java/net/runelite/api/events/WidgetMenuOptionClicked.java b/runelite-api/src/main/java/net/runelite/api/events/WidgetMenuOptionClicked.java index 9662a98ee8..114806abe7 100644 --- a/runelite-api/src/main/java/net/runelite/api/events/WidgetMenuOptionClicked.java +++ b/runelite-api/src/main/java/net/runelite/api/events/WidgetMenuOptionClicked.java @@ -28,7 +28,7 @@ import lombok.Data; import net.runelite.api.widgets.WidgetInfo; /** - * An event where an option has been clicked in a {@link net.runelite.api.widgets.Widget}s menu. + * An event where an option has been clicked in a {@link api.widgets.Widget}s menu. */ @Data public class WidgetMenuOptionClicked diff --git a/runelite-api/src/main/java/net/runelite/api/events/WidgetPositioned.java b/runelite-api/src/main/java/net/runelite/api/events/WidgetPositioned.java index d5479e3485..c5c7681fa0 100644 --- a/runelite-api/src/main/java/net/runelite/api/events/WidgetPositioned.java +++ b/runelite-api/src/main/java/net/runelite/api/events/WidgetPositioned.java @@ -27,7 +27,7 @@ package net.runelite.api.events; import lombok.Value; /** - * An event where the position of a {@link net.runelite.api.widgets.Widget} + * An event where the position of a {@link api.widgets.Widget} * relative to its parent has changed. */ @Value diff --git a/runelite-api/src/main/java/net/runelite/api/hooks/Callbacks.java b/runelite-api/src/main/java/net/runelite/api/hooks/Callbacks.java index b6960d761f..f585653836 100644 --- a/runelite-api/src/main/java/net/runelite/api/hooks/Callbacks.java +++ b/runelite-api/src/main/java/net/runelite/api/hooks/Callbacks.java @@ -37,7 +37,7 @@ import net.runelite.api.widgets.WidgetItem; public interface Callbacks { /** - * Post an event. See the events in net.runelite.api.events. + * Post an event. See the events in api.events. * * @param event the event */ diff --git a/runelite-api/src/main/java/net/runelite/api/kit/KitType.java b/runelite-api/src/main/java/net/runelite/api/kit/KitType.java index a808f2e899..156f0a8fd1 100644 --- a/runelite-api/src/main/java/net/runelite/api/kit/KitType.java +++ b/runelite-api/src/main/java/net/runelite/api/kit/KitType.java @@ -24,15 +24,15 @@ */ package net.runelite.api.kit; -import net.runelite.api.PlayerComposition; +import net.runelite.api.PlayerAppearance; /** * Represents an equipment slot in a players composition. *

    - * These values are intended for use with {@link PlayerComposition} equipment + * These values are intended for use with {@link PlayerAppearance} equipment * slots. For obtaining information about equipment in the local players - * equipment {@link net.runelite.api.ItemContainer}, use - * {@link net.runelite.api.EquipmentInventorySlot}. + * equipment {@link api.ItemContainer}, use + * {@link api.EquipmentInventorySlot}. */ public enum KitType { @@ -61,7 +61,7 @@ public enum KitType } /** - * Gets the raw equipment index for use in {@link PlayerComposition#getEquipmentIds()}. + * Gets the raw equipment index for use in {@link PlayerAppearance#getEquipmentIds()}. * * @return raw equipment index */ diff --git a/runelite-api/src/main/java/net/runelite/api/vars/AccountType.java b/runelite-api/src/main/java/net/runelite/api/vars/AccountType.java index 63c5e953f7..e35a1f00ad 100644 --- a/runelite-api/src/main/java/net/runelite/api/vars/AccountType.java +++ b/runelite-api/src/main/java/net/runelite/api/vars/AccountType.java @@ -1,27 +1,3 @@ -/* - * Copyright (c) 2018, Joshua Filby - * All rights reserved. - * - * Redistribution and use in source and binary forms, with or without - * modification, are permitted provided that the following conditions are met: - * - * 1. Redistributions of source code must retain the above copyright notice, this - * list of conditions and the following disclaimer. - * 2. Redistributions in binary form must reproduce the above copyright notice, - * this list of conditions and the following disclaimer in the documentation - * and/or other materials provided with the distribution. - * - * THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS" AND - * ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED - * WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE - * DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT OWNER OR CONTRIBUTORS BE LIABLE FOR - * ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES - * (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; - * LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND - * ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT - * (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS - * SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. - */ package net.runelite.api.vars; /** @@ -56,4 +32,4 @@ public enum AccountType return this.ordinal() >= IRONMAN.ordinal() && this.ordinal() <= HARDCORE_IRONMAN.ordinal(); } -} +} \ No newline at end of file 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 41b843f417..64bc95418c 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 @@ -28,6 +28,7 @@ import java.awt.Rectangle; import java.util.Collection; import net.runelite.api.FontTypeFace; import net.runelite.api.Point; +import net.runelite.api.SpriteID; /** * Represents an on-screen UI element that is drawn on the canvas. @@ -252,7 +253,7 @@ public interface Widget * Gets the sprite ID displayed in the widget. * * @return the sprite ID - * @see net.runelite.api.SpriteID + * @see SpriteID */ int getSpriteId(); @@ -260,7 +261,7 @@ public interface Widget * Sets the sprite ID displayed in the widget. * * @param spriteId the sprite ID - * @see net.runelite.api.SpriteID + * @see SpriteID */ void setSpriteId(int spriteId); @@ -306,7 +307,7 @@ public interface Widget /** * Gets the width of the widget. *

    - * If this widget is storing any {@link WidgetItem}s, this value is + * If this widget is storing any {@link // WidgetItem}s, this value is * used to store the number of item slot columns. * * @return the width @@ -625,14 +626,14 @@ public interface Widget /** * Returns the archive id of the font used * - * @see net.runelite.api.FontID + * @see api.FontID */ int getFontId(); /** * Sets the archive id of the font * - * @see net.runelite.api.FontID + * @see api.FontID */ void setFontId(int id); @@ -680,12 +681,12 @@ public interface Widget void setDragDeadTime(int deadTime); /** - * Returns widget {@link net.runelite.api.widgets.ItemQuantityMode}. + * Returns widget {@link api.widgets.ItemQuantityMode}. */ int getItemQuantityMode(); /** - * Sets the widget {@link net.runelite.api.widgets.ItemQuantityMode} + * Sets the widget {@link api.widgets.ItemQuantityMode} */ void setItemQuantityMode(int itemQuantityMode); diff --git a/runelite-api/src/main/java/net/runelite/api/widgets/WidgetConfig.java b/runelite-api/src/main/java/net/runelite/api/widgets/WidgetConfig.java index 31829b5417..96b60bd63d 100644 --- a/runelite-api/src/main/java/net/runelite/api/widgets/WidgetConfig.java +++ b/runelite-api/src/main/java/net/runelite/api/widgets/WidgetConfig.java @@ -24,7 +24,6 @@ */ package net.runelite.api.widgets; -import net.runelite.api.MenuAction; /** * Utility class used for defining options to be used on the click mask @@ -92,7 +91,7 @@ public class WidgetConfig /** * Add a USE option * - * @see MenuAction#ITEM_USE + * @see// MenuAction#ITEM_USE */ public static final int ITEM_USE_OP = 1 << 31; } diff --git a/runelite-api/src/main/java/net/runelite/api/widgets/WidgetInfo.java b/runelite-api/src/main/java/net/runelite/api/widgets/WidgetInfo.java index 4ae996c3d4..1a3df6c480 100644 --- a/runelite-api/src/main/java/net/runelite/api/widgets/WidgetInfo.java +++ b/runelite-api/src/main/java/net/runelite/api/widgets/WidgetInfo.java @@ -27,7 +27,7 @@ package net.runelite.api.widgets; /** * Represents a group-child {@link Widget} relationship. *

    - * For getting a specific widget from the client, see {@link net.runelite.api.Client#getWidget(WidgetInfo)}. + * For getting a specific widget from the client, see {@link api.Client#getWidget(WidgetInfo)}. */ public enum WidgetInfo { diff --git a/runelite-api/src/main/java/net/runelite/api/widgets/WidgetItem.java b/runelite-api/src/main/java/net/runelite/api/widgets/WidgetItem.java index c39e961f81..0c8dde7ee3 100644 --- a/runelite-api/src/main/java/net/runelite/api/widgets/WidgetItem.java +++ b/runelite-api/src/main/java/net/runelite/api/widgets/WidgetItem.java @@ -41,7 +41,7 @@ public class WidgetItem /** * The ID of the item represented. * - * @see net.runelite.api.ItemID + * @see api.ItemID */ private final int id; /**