synchronized (chunky) {
synchronized (this) {
ChunkView mapView = chunky.getMapView();
WorldRenderer renderer = chunky.getWorldRenderer();
World world = chunky.getWorld();
ChunkSelectionTracker selection = chunky.getChunkSelection();
renderer.render(world, mapBuffer, Chunk.biomeRenderer, selection);
mapBuffer.renderBuffered(g);
renderer.renderPlayer(world, g, view, true);
renderer.renderSpawn(world, g, view, true);
// draw view rectangle
g.setColor(Color.orange);
g.drawRect(
(int) FastMath.round(mapView.x0 - view.x0),
(int) FastMath.round(mapView.z0 - view.z0),
FastMath.round(mapView.width / (float) mapView.scale),
FastMath.round(mapView.height / (float) mapView.scale));
// draw North indicator
g.setFont(font);
g.setColor(Color.red);
g.drawString("N", view.width/2-4, 12);
g.setColor(Color.black);
g.drawString(world.levelName(), 10, view.height-10);
}
}
}