Search in sources :

Example 1 with ChunkMonitorEntry

use of org.terasology.engine.monitoring.chunk.ChunkMonitorEntry in project Terasology by MovingBlocks.

the class ChunkMonitorDisplay method recomputeRenderY.

private void recomputeRenderY() {
    int min = 0;
    int max = 0;
    int y = renderY;
    for (ChunkMonitorEntry chunk : chunks) {
        final Vector3i pos = chunk.getPosition();
        if (pos.y < min) {
            min = pos.y;
        }
        if (pos.y > max) {
            max = pos.y;
        }
    }
    if (y < min) {
        y = min;
    }
    if (y > max) {
        y = max;
    }
    minRenderY = min;
    maxRenderY = max;
    renderY = y;
}
Also used : Vector3i(org.joml.Vector3i) ChunkMonitorEntry(org.terasology.engine.monitoring.chunk.ChunkMonitorEntry) Point(java.awt.Point)

Aggregations

Point (java.awt.Point)1 Vector3i (org.joml.Vector3i)1 ChunkMonitorEntry (org.terasology.engine.monitoring.chunk.ChunkMonitorEntry)1