synchronized(chunks) {
for (int chunkX = minChunkX; chunkX <= maxChunkX; chunkX+=levelOfDetail) {
for (int chunkZ = minChunkZ; chunkZ <= maxChunkZ; chunkZ+=levelOfDetail) {
Map map = getChunkMap(levelOfDetail).get(chunkX, chunkZ);
if (dirty || map == null || random .nextInt(10000) == 0) {
renderer.renderQueue.add(new Point(chunkX, chunkZ));
}
if (map != null && map != blankMap) {
GL11.glPushMatrix();
int x = chunkX * 16;
int y = chunkZ * 16;
int width = x + 16 * levelOfDetail;
int height = y + 16 * levelOfDetail;
map.loadColorImage();
MinecraftTessellator tessellator = Spoutcraft.getTessellator();
tessellator.startDrawingQuads();
tessellator.addVertexWithUV((double) width, (double) height, -90, 1, 1);
tessellator.addVertexWithUV((double) width, (double) y, -90, 1, 0);
tessellator.addVertexWithUV((double) x, (double) y, -90, 0, 0);
tessellator.addVertexWithUV((double) x, (double) height, -90, 0, 1);
tessellator.draw();
// GL11.glBlendFunc(GL11.GL_SRC_ALPHA, GL11.GL_ONE_MINUS_SRC_ALPHA);
// RenderUtil.drawRectangle(x, y, width, height, 0x88ffffff);
if (MinimapConfig.getInstance().isHeightmap()) {
GL11.glBlendFunc(GL11.GL_SRC_ALPHA, GL11.GL_DST_COLOR);
map.loadHeightImage();
tessellator.startDrawingQuads();
tessellator.addVertexWithUV((double) width, (double) height, -90, 1, 1);
tessellator.addVertexWithUV((double) width, (double) y, -90, 1, 0);
tessellator.addVertexWithUV((double) x, (double) y, -90, 0, 0);
tessellator.addVertexWithUV((double) x, (double) height, -90, 0, 1);
tessellator.draw();
}
GL11.glPopMatrix();
}
}
}
}
int x = (int) SpoutClient.getHandle().thePlayer.posX;
int z = (int) SpoutClient.getHandle().thePlayer.posZ;
drawPOI("You", x, z, 0xffff0000);
for (Waypoint waypoint : MinimapConfig.getInstance().getAllWaypoints(MinimapUtils.getWorldName())) {
if (!waypoint.deathpoint || MinimapConfig.getInstance().isDeathpoints()) {
drawPOI(waypoint.name, waypoint.x, waypoint.z, 0xff00ff00);
}
}
if (MinimapConfig.getInstance().getFocussedWaypoint() != null) {
Waypoint pos = MinimapConfig.getInstance().getFocussedWaypoint();
drawPOI("Marker", pos.x, pos.z, 0xff00ffff);
}
GL11.glPopMatrix();
GL11.glBlendFunc(GL11.GL_SRC_ALPHA, GL11.GL_ONE_MINUS_SRC_ALPHA);
GL11.glEnable(2929);
GL11.glDisable(3042);
dirty = false;
Point newpos = getPlayerPosition();
if (lastPlayerPos.getX() != newpos.getX() || lastPlayerPos.getY() != newpos.getY()) {
showPlayer(0);
lastPlayerPos = newpos;
}
}