mirror of
https://github.com/VolmitSoftware/Iris.git
synced 2025-07-19 10:43:14 +00:00
Pregen utils for commands
This commit is contained in:
parent
5d5a1fadd9
commit
66894c2e8a
@ -18,6 +18,7 @@
|
|||||||
|
|
||||||
package com.volmit.iris.core.gui;
|
package com.volmit.iris.core.gui;
|
||||||
|
|
||||||
|
import com.sk89q.worldedit.function.factory.ApplyRegion;
|
||||||
import com.volmit.iris.Iris;
|
import com.volmit.iris.Iris;
|
||||||
import com.volmit.iris.core.IrisSettings;
|
import com.volmit.iris.core.IrisSettings;
|
||||||
import com.volmit.iris.core.gui.components.Pregenerator;
|
import com.volmit.iris.core.gui.components.Pregenerator;
|
||||||
@ -61,6 +62,46 @@ public class PregeneratorJob implements PregenListener {
|
|||||||
this.pregenerator.start();
|
this.pregenerator.start();
|
||||||
}
|
}
|
||||||
|
|
||||||
|
public static boolean shutdownInstance() {
|
||||||
|
if(instance == null)
|
||||||
|
{
|
||||||
|
return false;
|
||||||
|
}
|
||||||
|
|
||||||
|
J.a(() -> instance.pregenerator.close());
|
||||||
|
return true;
|
||||||
|
}
|
||||||
|
|
||||||
|
public static PregeneratorJob getInstance() {
|
||||||
|
return instance;
|
||||||
|
}
|
||||||
|
|
||||||
|
public static void pauseResume() {
|
||||||
|
if(instance == null)
|
||||||
|
{
|
||||||
|
return;
|
||||||
|
}
|
||||||
|
|
||||||
|
if(isPaused())
|
||||||
|
{
|
||||||
|
instance.pregenerator.resume();
|
||||||
|
}
|
||||||
|
|
||||||
|
else
|
||||||
|
{
|
||||||
|
instance.pregenerator.pause();
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
|
public static boolean isPaused() {
|
||||||
|
if(instance == null)
|
||||||
|
{
|
||||||
|
return true;
|
||||||
|
}
|
||||||
|
|
||||||
|
return instance.paused();
|
||||||
|
}
|
||||||
|
|
||||||
public void draw(int x, int z, Color color)
|
public void draw(int x, int z, Color color)
|
||||||
{
|
{
|
||||||
try
|
try
|
||||||
|
Loading…
x
Reference in New Issue
Block a user