use of io.xol.chunkstories.api.rendering.world.chunk.ChunkRenderable in project chunkstories by Hugobros3.
the class HashMapWorldRegionsHolder method markChunkForReRender.
public void markChunkForReRender(int chunkX, int chunkY, int chunkZ) {
int worldSizeInChunks = world.getWorldInfo().getSize().sizeInChunks;
if (chunkX < 0)
chunkX += worldSizeInChunks;
if (chunkY < 0)
chunkY += worldSizeInChunks;
if (chunkZ < 0)
chunkZ += worldSizeInChunks;
chunkX = chunkX % worldSizeInChunks;
chunkZ = chunkZ % worldSizeInChunks;
if (chunkY < 0 || chunkY >= worldSizeInChunks)
return;
Chunk c = getChunk(chunkX, chunkY, chunkZ);
if (c != null && c instanceof ChunkRenderable)
((ChunkRenderable) c).meshUpdater().requestMeshUpdate();
}
Aggregations