Examples of ChunkMonitorEntry


Examples of org.terasology.monitoring.chunk.ChunkMonitorEntry

                map.clear();
                recomputeRenderY();
            } else if (event instanceof ChunkMonitorEvent.BasicChunkEvent) {
                final ChunkMonitorEvent.BasicChunkEvent bEvent = (ChunkMonitorEvent.BasicChunkEvent) event;
                final Vector3i pos = bEvent.getPosition();
                final ChunkMonitorEntry entry;
                if (event instanceof ChunkMonitorEvent.Created) {
                    final ChunkMonitorEvent.Created cEvent = (ChunkMonitorEvent.Created) event;
                    entry = cEvent.getEntry();
                    if (pos.y < minRenderY) {
                        minRenderY = pos.y;
                    }
                    if (pos.y > maxRenderY) {
                        maxRenderY = pos.y;
                    }
                    chunks.add(entry);
                    map.put(pos, entry);
                } else {
                    entry = map.get(pos);
                }
                if (entry != null) {
                    entry.addEvent(bEvent);
                } else {
                    logger.error("No chunk monitor entry found for position {}", pos);
                }
            }
        }
View Full Code Here
TOP
Copyright © 2018 www.massapi.com. All rights reserved.
All source code are property of their respective owners. Java is a trademark of Sun Microsystems, Inc and owned by ORACLE Inc. Contact coftware#gmail.com.