Fix generated sections not appearing
This commit is contained in:
@@ -350,12 +350,10 @@ public class DhServerLevel extends AbstractDhLevel implements IDhServerLevel
|
||||
public void onWorldGenTaskComplete(DhSectionPos pos)
|
||||
{
|
||||
IncompleteDataSourceEntry entry = this.incompleteDataSources.get(pos);
|
||||
if (entry == null)
|
||||
if (entry != null)
|
||||
{
|
||||
return;
|
||||
this.trySetGeneratedDataSourceToEntry(entry, pos);
|
||||
}
|
||||
|
||||
this.trySetGeneratedDataSourceToEntry(entry, pos);
|
||||
}
|
||||
|
||||
private static class IncompleteDataSourceEntry
|
||||
|
||||
+14
-1
@@ -233,7 +233,20 @@ public abstract class AbstractFullDataRequestQueue implements IDebugRenderable,
|
||||
return entry.future.complete(false);
|
||||
}
|
||||
|
||||
return entry.future.complete(true);
|
||||
// Hack to work around a race condition
|
||||
// If you finish the request too quickly, the section will never render
|
||||
new Thread(() -> {
|
||||
try
|
||||
{
|
||||
Thread.sleep(5000);
|
||||
entry.future.complete(true);
|
||||
}
|
||||
catch (InterruptedException e)
|
||||
{
|
||||
throw new RuntimeException(e);
|
||||
}
|
||||
}).start();
|
||||
return null;
|
||||
});
|
||||
}
|
||||
|
||||
|
||||
Reference in New Issue
Block a user