openrune: NPCDefinition -> NPCComposition
This commit is contained in:
@@ -27,7 +27,7 @@ package net.runelite.mixins;
|
||||
import net.runelite.api.Actor;
|
||||
import net.runelite.api.Hitsplat;
|
||||
import net.runelite.api.NPC;
|
||||
import net.runelite.api.NPCDefinition;
|
||||
import net.runelite.api.NPCComposition;
|
||||
import net.runelite.api.Perspective;
|
||||
import net.runelite.api.Player;
|
||||
import net.runelite.api.Point;
|
||||
@@ -229,7 +229,7 @@ public abstract class RSActorMixin implements RSActor
|
||||
int size = 1;
|
||||
if (this instanceof NPC)
|
||||
{
|
||||
NPCDefinition composition = ((NPC)this).getDefinition();
|
||||
NPCComposition composition = ((NPC)this).getDefinition();
|
||||
if (composition != null && composition.getConfigs() != null)
|
||||
{
|
||||
composition = composition.transform();
|
||||
|
||||
@@ -64,7 +64,7 @@ import static net.runelite.api.MenuAction.PLAYER_SIXTH_OPTION;
|
||||
import static net.runelite.api.MenuAction.PLAYER_THIRD_OPTION;
|
||||
import net.runelite.api.MessageNode;
|
||||
import net.runelite.api.NPC;
|
||||
import net.runelite.api.NPCDefinition;
|
||||
import net.runelite.api.NPCComposition;
|
||||
import net.runelite.api.NameableContainer;
|
||||
import net.runelite.api.Node;
|
||||
import net.runelite.api.ObjectDefinition;
|
||||
@@ -1942,7 +1942,7 @@ public abstract class RSClientMixin implements RSClient
|
||||
|
||||
@Inject
|
||||
@Override
|
||||
public NPCDefinition getNpcDefinition(int id)
|
||||
public NPCComposition getNpcDefinition(int id)
|
||||
{
|
||||
assert this.isClientThread() : "getNpcDefinition must be called on client thread";
|
||||
return getRSNpcDefinition(id);
|
||||
|
||||
@@ -11,10 +11,10 @@ import net.runelite.api.mixins.Inject;
|
||||
import net.runelite.api.mixins.Mixin;
|
||||
import net.runelite.api.mixins.Shadow;
|
||||
import net.runelite.rs.api.RSClient;
|
||||
import net.runelite.rs.api.RSNPCDefinition;
|
||||
import net.runelite.rs.api.RSNPCComposition;
|
||||
|
||||
@Mixin(RSNPCDefinition.class)
|
||||
public abstract class RSNPCDefinitionMixin implements RSNPCDefinition
|
||||
@Mixin(RSNPCComposition.class)
|
||||
public abstract class RSNPCCompositionMixin implements RSNPCComposition
|
||||
{
|
||||
@Shadow("client")
|
||||
private static RSClient client;
|
||||
@@ -43,7 +43,7 @@ public abstract class RSNPCDefinitionMixin implements RSNPCDefinition
|
||||
public void actionsHook(int idx)
|
||||
{
|
||||
NpcActionChanged npcActionChanged = new NpcActionChanged();
|
||||
npcActionChanged.setNpcDefinition(this);
|
||||
npcActionChanged.setNpcComposition(this);
|
||||
npcActionChanged.setIdx(idx);
|
||||
client.getCallbacks().post(NpcActionChanged.class, npcActionChanged);
|
||||
}
|
||||
@@ -26,7 +26,7 @@ package net.runelite.mixins;
|
||||
|
||||
import java.awt.Shape;
|
||||
import net.runelite.api.AnimationID;
|
||||
import net.runelite.api.NPCDefinition;
|
||||
import net.runelite.api.NPCComposition;
|
||||
import net.runelite.api.Perspective;
|
||||
import net.runelite.api.coords.LocalPoint;
|
||||
import net.runelite.api.events.NpcDefinitionChanged;
|
||||
@@ -40,7 +40,7 @@ import net.runelite.api.mixins.Shadow;
|
||||
import net.runelite.rs.api.RSClient;
|
||||
import net.runelite.rs.api.RSModel;
|
||||
import net.runelite.rs.api.RSNPC;
|
||||
import net.runelite.rs.api.RSNPCDefinition;
|
||||
import net.runelite.rs.api.RSNPCComposition;
|
||||
|
||||
@Mixin(RSNPC.class)
|
||||
public abstract class RSNPCMixin implements RSNPC
|
||||
@@ -55,7 +55,7 @@ public abstract class RSNPCMixin implements RSNPC
|
||||
@Override
|
||||
public int getId()
|
||||
{
|
||||
RSNPCDefinition composition = getDefinition();
|
||||
RSNPCComposition composition = getDefinition();
|
||||
if (composition != null && composition.getConfigs() != null)
|
||||
{
|
||||
composition = composition.transform();
|
||||
@@ -67,7 +67,7 @@ public abstract class RSNPCMixin implements RSNPC
|
||||
@Override
|
||||
public String getName()
|
||||
{
|
||||
RSNPCDefinition composition = getDefinition();
|
||||
RSNPCComposition composition = getDefinition();
|
||||
if (composition != null && composition.getConfigs() != null)
|
||||
{
|
||||
composition = composition.transform();
|
||||
@@ -79,7 +79,7 @@ public abstract class RSNPCMixin implements RSNPC
|
||||
@Override
|
||||
public int getCombatLevel()
|
||||
{
|
||||
RSNPCDefinition composition = getDefinition();
|
||||
RSNPCComposition composition = getDefinition();
|
||||
if (composition != null && composition.getConfigs() != null)
|
||||
{
|
||||
composition = composition.transform();
|
||||
@@ -103,7 +103,7 @@ public abstract class RSNPCMixin implements RSNPC
|
||||
|
||||
@FieldHook(value = "definition", before = true)
|
||||
@Inject
|
||||
public void onDefinitionChanged(RSNPCDefinition composition)
|
||||
public void onDefinitionChanged(RSNPCComposition composition)
|
||||
{
|
||||
if (composition == null)
|
||||
{
|
||||
@@ -148,9 +148,9 @@ public abstract class RSNPCMixin implements RSNPC
|
||||
|
||||
@Inject
|
||||
@Override
|
||||
public NPCDefinition getTransformedDefinition()
|
||||
public NPCComposition getTransformedDefinition()
|
||||
{
|
||||
RSNPCDefinition composition = getDefinition();
|
||||
RSNPCComposition composition = getDefinition();
|
||||
if (composition != null && composition.getConfigs() != null)
|
||||
{
|
||||
composition = composition.transform();
|
||||
|
||||
Reference in New Issue
Block a user