Package net.eternalclient.api.utilities
Class SpriteUtility
- java.lang.Object
-
- net.eternalclient.api.utilities.SpriteUtility
-
public class SpriteUtility extends java.lang.Object
-
-
Constructor Summary
Constructors Constructor Description SpriteUtility()
-
Method Summary
All Methods Static Methods Concrete Methods Modifier and Type Method Description static java.awt.image.BufferedImage
getItemOutlineSprite(int itemId, int itemQuantity, java.awt.Color outlineColor)
Get item outline with a specific color.static AsyncBufferedImage
getItemSprite(int itemId)
Get item sprite image as BufferedImage.static AsyncBufferedImage
getItemSprite(int itemId, int quantity, boolean stackable)
Get item sprite image as BufferedImage.
-
-
-
Method Detail
-
getItemSprite
@Nullable public static AsyncBufferedImage getItemSprite(int itemId)
Get item sprite image as BufferedImage.This method may return immediately with a blank image if not called on the game thread. The image will be filled in later. If this is used for a UI label/button, it should be added using AsyncBufferedImage::addTo to ensure it is painted properly
- Parameters:
itemId
-- Returns:
- image
-
getItemSprite
@Nullable public static AsyncBufferedImage getItemSprite(int itemId, int quantity, boolean stackable)
Get item sprite image as BufferedImage.This method may return immediately with a blank image if not called on the game thread. The image will be filled in later. If this is used for a UI label/button, it should be added using AsyncBufferedImage::addTo to ensure it is painted properly
- Parameters:
itemId
- item idquantity
- item quantitystackable
- whether the item is stackable- Returns:
- image
-
getItemOutlineSprite
@Nullable public static java.awt.image.BufferedImage getItemOutlineSprite(int itemId, int itemQuantity, java.awt.Color outlineColor)
Get item outline with a specific color.- Parameters:
itemId
- item iditemQuantity
- item quantityoutlineColor
- outline color- Returns:
- image
-
-