Java Code Examples for cn.nukkit.Server#getLevel()
The following examples show how to use
cn.nukkit.Server#getLevel() .
You can vote up the ones you like or vote down the ones you don't like,
and go to the original project or source file by following the links above each example. You may check out the related API usage on the sidebar.
Example 1
Source File: GenerationTask.java From Jupiter with GNU General Public License v3.0 | 6 votes |
@Override public void onCompletion(Server server) { Level level = server.getLevel(this.levelId); if (level != null) { if (!this.state) { level.registerGenerator(); return; } BaseFullChunk chunk = this.chunk.clone(); if (chunk == null) { return; } level.generateChunkCallback(chunk.getX(), chunk.getZ(), chunk); } }
Example 2
Source File: GenerationTask.java From Nukkit with GNU General Public License v3.0 | 6 votes |
@Override public void onCompletion(Server server) { Level level = server.getLevel(this.levelId); if (level != null) { if (!this.state) { level.registerGenerator(); return; } BaseFullChunk chunk = this.chunk.clone(); if (chunk == null) { return; } level.generateChunkCallback(chunk.getX(), chunk.getZ(), chunk); } }
Example 3
Source File: LightPopulationTask.java From Jupiter with GNU General Public License v3.0 | 5 votes |
@Override public void onCompletion(Server server) { Level level = server.getLevel(this.levelId); BaseFullChunk chunk = this.chunk.clone(); if (level != null) { if (chunk == null) { return; } level.generateChunkCallback(chunk.getX(), chunk.getZ(), chunk); } }
Example 4
Source File: PopulationTask.java From Jupiter with GNU General Public License v3.0 | 5 votes |
@Override public void onCompletion(Server server) { Level level = server.getLevel(this.levelId); if (level != null) { if (!this.state) { level.registerGenerator(); return; } BaseFullChunk chunk = this.chunk.clone(); if (chunk == null) { return; } for (int i = 0; i < 9; i++) { if (i == 4) { continue; } BaseFullChunk c = this.chunks[i]; if (c != null) { c = c.clone(); level.generateChunkCallback(c.getX(), c.getZ(), c); } } level.generateChunkCallback(chunk.getX(), chunk.getZ(), chunk); } }
Example 5
Source File: ChunkRequestTask.java From Jupiter with GNU General Public License v3.0 | 5 votes |
@Override public void onCompletion(Server server) { Level level = server.getLevel(this.levelId); if (level != null && this.hasResult()) { level.chunkRequestCallback(this.chunkX, this.chunkZ, (byte[]) this.getResult()); } }
Example 6
Source File: LightPopulationTask.java From Nukkit with GNU General Public License v3.0 | 5 votes |
@Override public void onCompletion(Server server) { Level level = server.getLevel(this.levelId); BaseFullChunk chunk = this.chunk.clone(); if (level != null) { if (chunk == null) { return; } level.generateChunkCallback(chunk.getX(), chunk.getZ(), chunk); } }
Example 7
Source File: LightPopulationTask.java From Nukkit with GNU General Public License v3.0 | 5 votes |
@Override public void onCompletion(Server server) { Level level = server.getLevel(this.levelId); BaseFullChunk chunk = this.chunk.clone(); if (level != null) { if (chunk == null) { return; } level.generateChunkCallback(chunk.getX(), chunk.getZ(), chunk); } }
Example 8
Source File: PopulationTask.java From Nukkit with GNU General Public License v3.0 | 5 votes |
@Override public void onCompletion(Server server) { Level level = server.getLevel(this.levelId); if (level != null) { if (!this.state) { level.registerGenerator(); return; } BaseFullChunk chunk = this.chunk.clone(); if (chunk == null) { return; } for (int i = 0; i < 9; i++) { if (i == 4) { continue; } BaseFullChunk c = this.chunks[i]; if (c != null) { c = c.clone(); level.generateChunkCallback(c.getX(), c.getZ(), c); } } level.generateChunkCallback(chunk.getX(), chunk.getZ(), chunk); } }
Example 9
Source File: ChunkRequestTask.java From Nukkit with GNU General Public License v3.0 | 5 votes |
@Override public void onCompletion(Server server) { Level level = server.getLevel(this.levelId); if (level != null && this.hasResult()) { level.chunkRequestCallback(timeStamp, this.chunkX, this.chunkZ, (byte[]) this.getResult()); } }