Rework rx eventbus implementation
This commit is contained in:
@@ -188,7 +188,7 @@ public abstract class RSActorMixin implements RSActor
|
||||
{
|
||||
AnimationChanged animationChange = new AnimationChanged();
|
||||
animationChange.setActor(this);
|
||||
client.getCallbacks().post(animationChange);
|
||||
client.getCallbacks().post(AnimationChanged.class, animationChange);
|
||||
}
|
||||
|
||||
@FieldHook("spotAnimation")
|
||||
@@ -197,7 +197,7 @@ public abstract class RSActorMixin implements RSActor
|
||||
{
|
||||
SpotAnimationChanged spotAnimationChanged = new SpotAnimationChanged();
|
||||
spotAnimationChanged.setActor(this);
|
||||
client.getCallbacks().post(spotAnimationChanged);
|
||||
client.getCallbacks().post(SpotAnimationChanged.class, spotAnimationChanged);
|
||||
}
|
||||
|
||||
@FieldHook("targetIndex")
|
||||
@@ -205,7 +205,7 @@ public abstract class RSActorMixin implements RSActor
|
||||
public void interactingChanged(int idx)
|
||||
{
|
||||
InteractingChanged interactingChanged = new InteractingChanged(this, getInteracting());
|
||||
client.getCallbacks().post(interactingChanged);
|
||||
client.getCallbacks().post(InteractingChanged.class, interactingChanged);
|
||||
}
|
||||
|
||||
@FieldHook("overheadText")
|
||||
@@ -216,7 +216,7 @@ public abstract class RSActorMixin implements RSActor
|
||||
if (overheadText != null)
|
||||
{
|
||||
OverheadTextChanged overheadTextChanged = new OverheadTextChanged(this, overheadText);
|
||||
client.getCallbacks().post(overheadTextChanged);
|
||||
client.getCallbacks().post(OverheadTextChanged.class, overheadTextChanged);
|
||||
}
|
||||
}
|
||||
|
||||
@@ -252,7 +252,7 @@ public abstract class RSActorMixin implements RSActor
|
||||
client.getLogger().debug("You died!");
|
||||
|
||||
LocalPlayerDeath event = LocalPlayerDeath.INSTANCE;
|
||||
client.getCallbacks().post(event);
|
||||
client.getCallbacks().post(LocalPlayerDeath.class, event);
|
||||
}
|
||||
else if (this instanceof RSNPC)
|
||||
{
|
||||
@@ -281,6 +281,6 @@ public abstract class RSActorMixin implements RSActor
|
||||
final HitsplatApplied event = new HitsplatApplied();
|
||||
event.setActor(this);
|
||||
event.setHitsplat(hitsplat);
|
||||
client.getCallbacks().post(event);
|
||||
client.getCallbacks().post(HitsplatApplied.class, event);
|
||||
}
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user