mirror of
https://github.com/VolmitSoftware/Iris.git
synced 2025-07-18 10:12:53 +00:00
Late engine start fix issues
This commit is contained in:
parent
fc94fe30d0
commit
e393442df9
@ -40,6 +40,8 @@ import java.io.File;
|
||||
import java.util.concurrent.CompletableFuture;
|
||||
import java.util.concurrent.atomic.AtomicBoolean;
|
||||
import java.util.concurrent.atomic.AtomicReference;
|
||||
import java.util.function.Consumer;
|
||||
import java.util.function.Supplier;
|
||||
|
||||
/**
|
||||
* Makes it a lot easier to setup an engine, world, studio or whatever
|
||||
@ -119,9 +121,19 @@ public class IrisCreator {
|
||||
J.a(() ->
|
||||
{
|
||||
int req = 441;
|
||||
Supplier<Integer> g = () -> {
|
||||
try
|
||||
{
|
||||
return finalAccess1.getEngine().getGenerated();
|
||||
}
|
||||
|
||||
while (finalAccess1.getEngine().getGenerated() < req) {
|
||||
double v = (double) finalAccess1.getEngine().getGenerated() / (double) req;
|
||||
catch(Throwable e)
|
||||
{
|
||||
return 0;
|
||||
}
|
||||
};
|
||||
while (g.get() < req) {
|
||||
double v = (double) g.get() / (double) req;
|
||||
|
||||
if (sender.isPlayer()) {
|
||||
sender.sendProgress(v, "Generating");
|
||||
|
@ -31,6 +31,7 @@ public class EngineMetrics {
|
||||
private final AtomicRollingSequence parallax;
|
||||
private final AtomicRollingSequence parallaxInsert;
|
||||
private final AtomicRollingSequence post;
|
||||
private final AtomicRollingSequence perfection;
|
||||
private final AtomicRollingSequence decoration;
|
||||
private final AtomicRollingSequence cave;
|
||||
private final AtomicRollingSequence ravine;
|
||||
@ -40,6 +41,7 @@ public class EngineMetrics {
|
||||
this.total = new AtomicRollingSequence(mem);
|
||||
this.terrain = new AtomicRollingSequence(mem);
|
||||
this.biome = new AtomicRollingSequence(mem);
|
||||
this.perfection = new AtomicRollingSequence(mem);
|
||||
this.parallax = new AtomicRollingSequence(mem);
|
||||
this.parallaxInsert = new AtomicRollingSequence(mem);
|
||||
this.post = new AtomicRollingSequence(mem);
|
||||
@ -58,6 +60,7 @@ public class EngineMetrics {
|
||||
v.put("parallax", parallax.getAverage());
|
||||
v.put("parallax.insert", parallaxInsert.getAverage());
|
||||
v.put("post", post.getAverage());
|
||||
v.put("perfection", perfection.getAverage());
|
||||
v.put("decoration", decoration.getAverage());
|
||||
v.put("updates", updates.getAverage());
|
||||
v.put("cave", cave.getAverage());
|
||||
|
Loading…
x
Reference in New Issue
Block a user