示例#1
0
 private void processInvalidatedChunks(NetData.NetMessage message) {
   for (NetData.InvalidateChunkMessage chunk : message.getInvalidateChunkList()) {
     Vector3i chunkPos = NetMessageUtil.convert(chunk.getPos());
     remoteWorldProvider.invalidateChunks(chunkPos);
     awaitingChunkReadyBlockUpdates.removeAll(chunkPos);
     awaitingChunkReadyBiomeUpdates.removeAll(chunkPos);
   }
 }
示例#2
0
 private void processReceivedChunks() {
   if (remoteWorldProvider != null) {
     List<Chunk> chunks = Lists.newArrayListWithExpectedSize(chunkQueue.size());
     chunkQueue.drainTo(chunks);
     for (Chunk chunk : chunks) {
       remoteWorldProvider.receiveChunk(chunk);
     }
   }
 }
示例#3
0
 void setRemoteWorldProvider(RemoteChunkProvider remoteWorldProvider) {
   this.remoteWorldProvider = remoteWorldProvider;
   remoteWorldProvider.subscribe(this);
 }