final RSPlayer player = ctx.players.getMyPlayer();
if (player == null) {
return;
}
final FontMetrics metrics = render.getFontMetrics();
final RSTile location = player.getLocation();
final int locX = location.getX();
final int locY = location.getY();
final int tHeight = metrics.getHeight();
for (int x = locX - 25; x < locX + 25; x++) {
for (int y = locY - 25; y < locY + 25; y++) {
final RSGroundItem[] items = ctx.groundItems.getAllAt(x, y);
if (items.length > 0) {
final RSModel model = items[0].getModel();
if (model != null) {
render.setColor(Color.BLUE);
model.drawWireFrame(render);
}
}
for (int i = 0; i < items.length; i++) {
final Point screen = ctx.calc.tileToScreen(new RSTile(x, y), items[i].getHeight());
if (!ctx.calc.pointOnScreen(screen)) {
continue;
}
render.setColor(Color.RED);
render.fillRect((int) screen.getX() - 1, (int) screen.getY() - 1, 2, 2);