use of net.runelite.api.WallObject in project runelite by runelite.
the class BarrowsPlugin method onWallObjectChanged.
@Subscribe
public void onWallObjectChanged(WallObjectChanged event) {
WallObject previous = event.getPrevious();
WallObject wallObject = event.getWallObject();
walls.remove(previous);
if (BARROWS_WALLS.contains(wallObject.getId())) {
walls.add(wallObject);
}
}
use of net.runelite.api.WallObject in project runelite by runelite.
the class MotherlodePlugin method onWallObjectDespawned.
@Subscribe
public void onWallObjectDespawned(WallObjectDespawned event) {
WallObject wallObject = event.getWallObject();
veins.remove(wallObject);
}
use of net.runelite.api.WallObject in project runelite by runelite.
the class RSTileMixin method wallObjectChanged.
@FieldHook("wallObject")
@Inject
public void wallObjectChanged(int idx) {
WallObject previous = previousWallObject;
WallObject current = getWallObject();
previousWallObject = current;
if (current == null && previous != null) {
WallObjectDespawned wallObjectDespawned = new WallObjectDespawned();
wallObjectDespawned.setTile(this);
wallObjectDespawned.setWallObject(previous);
eventBus.post(wallObjectDespawned);
} else if (current != null && previous == null) {
WallObjectSpawned wallObjectSpawned = new WallObjectSpawned();
wallObjectSpawned.setTile(this);
wallObjectSpawned.setWallObject(current);
eventBus.post(wallObjectSpawned);
} else if (current != null && previous != null) {
WallObjectChanged wallObjectChanged = new WallObjectChanged();
wallObjectChanged.setTile(this);
wallObjectChanged.setPrevious(previous);
wallObjectChanged.setWallObject(current);
eventBus.post(wallObjectChanged);
}
}
use of net.runelite.api.WallObject in project runelite by runelite.
the class BarrowsPlugin method onWallObjectDespawned.
@Subscribe
public void onWallObjectDespawned(WallObjectDespawned event) {
WallObject wallObject = event.getWallObject();
walls.remove(wallObject);
}
use of net.runelite.api.WallObject in project runelite by runelite.
the class MotherlodePlugin method onWallObjectChanged.
@Subscribe
public void onWallObjectChanged(WallObjectChanged event) {
WallObject previous = event.getPrevious();
WallObject wallObject = event.getWallObject();
veins.remove(previous);
if (MINE_SPOTS.contains(wallObject.getId())) {
veins.add(wallObject);
}
}
Aggregations