mixin: add getItemDefinition, fuck it, let's have both
This commit is contained in:
@@ -403,6 +403,16 @@ public interface Client extends GameEngine
|
|||||||
@Nonnull
|
@Nonnull
|
||||||
ItemComposition getItemComposition(int id);
|
ItemComposition getItemComposition(int id);
|
||||||
|
|
||||||
|
/**
|
||||||
|
* Gets the item composition corresponding to an items ID.
|
||||||
|
*
|
||||||
|
* @param id the item ID
|
||||||
|
* @return the corresponding item composition
|
||||||
|
* @see ItemID
|
||||||
|
*/
|
||||||
|
@Nonnull
|
||||||
|
ItemComposition getItemDefinition(int id);
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* Creates an item icon sprite with passed variables.
|
* Creates an item icon sprite with passed variables.
|
||||||
*
|
*
|
||||||
|
|||||||
@@ -2040,10 +2040,18 @@ public abstract class RSClientMixin implements RSClient
|
|||||||
@Nonnull
|
@Nonnull
|
||||||
public ItemComposition getItemComposition(int id)
|
public ItemComposition getItemComposition(int id)
|
||||||
{
|
{
|
||||||
assert this.isClientThread() : "getItemDefinition must be called on client thread";
|
assert this.isClientThread() : "getItemComposition must be called on client thread";
|
||||||
return getRSItemDefinition(id);
|
return getRSItemDefinition(id);
|
||||||
}
|
}
|
||||||
|
|
||||||
|
@Inject
|
||||||
|
@Override
|
||||||
|
@Nonnull
|
||||||
|
public ItemComposition getItemDefinition(int id)
|
||||||
|
{
|
||||||
|
return getItemComposition(id);
|
||||||
|
}
|
||||||
|
|
||||||
@Inject
|
@Inject
|
||||||
@Override
|
@Override
|
||||||
public NPCComposition getNpcDefinition(int id)
|
public NPCComposition getNpcDefinition(int id)
|
||||||
|
|||||||
Reference in New Issue
Block a user