Ejemplo n.º 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);
   }
 }
Ejemplo n.º 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);
     }
   }
 }
Ejemplo n.º 3
0
 void setRemoteWorldProvider(RemoteChunkProvider remoteWorldProvider) {
   this.remoteWorldProvider = remoteWorldProvider;
   remoteWorldProvider.subscribe(this);
 }