Merge pull request #735 from CocoTheOwner/noConsoleNPE

Enable edit context
This commit is contained in:
Brian Fopiano 2022-02-09 13:47:09 -08:00 committed by GitHub
commit c0fa6db602
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23

View File

@ -125,11 +125,10 @@ public class IrisCreator {
{
int req = 441;
Supplier<Integer> g = () -> {
try {
return finalAccess1.getEngine().getGenerated();
} catch(Throwable e) {
if (finalAccess1 == null || finalAccess1.getEngine() == null) {
return 0;
}
return finalAccess1.getEngine().getGenerated();
};
while(g.get() < req) {
double v = (double) g.get() / (double) req;
@ -138,7 +137,7 @@ public class IrisCreator {
sender.sendProgress(v, "Generating");
J.sleep(16);
} else {
sender.sendMessage(C.WHITE + "Generating " + Form.pc(v) + ((C.GRAY + " (" + (req - finalAccess1.getEngine().getGenerated()) + " Left)")));
sender.sendMessage(C.WHITE + "Generating " + Form.pc(v) + ((C.GRAY + " (" + (req - g.get()) + " Left)")));
J.sleep(1000);
}
}