mirror of
https://github.com/VolmitSoftware/Iris.git
synced 2025-07-18 10:12:53 +00:00
Fix engine hotloading
This commit is contained in:
parent
18b962dc57
commit
742fa27029
@ -23,10 +23,7 @@ import com.volmit.iris.core.gui.components.IrisRenderer;
|
||||
import com.volmit.iris.core.gui.components.RenderType;
|
||||
import com.volmit.iris.core.tools.IrisWorlds;
|
||||
import com.volmit.iris.engine.IrisComplex;
|
||||
import com.volmit.iris.engine.IrisEngine;
|
||||
import com.volmit.iris.engine.framework.Engine;
|
||||
import com.volmit.iris.engine.framework.EngineCompositeGenerator;
|
||||
import com.volmit.iris.engine.framework.EngineFramework;
|
||||
import com.volmit.iris.engine.framework.IrisAccess;
|
||||
import com.volmit.iris.engine.object.IrisBiome;
|
||||
import com.volmit.iris.engine.object.IrisRegion;
|
||||
@ -157,22 +154,15 @@ public class VisionGUI extends JPanel implements MouseWheelListener, KeyListener
|
||||
});
|
||||
}
|
||||
|
||||
public boolean updateEngine()
|
||||
{
|
||||
if(engine.isClosed())
|
||||
{
|
||||
public boolean updateEngine() {
|
||||
if (engine.isClosed()) {
|
||||
int index = engine.getIndex();
|
||||
|
||||
if(world.hasRealWorld())
|
||||
{
|
||||
try
|
||||
{
|
||||
if (world.hasRealWorld()) {
|
||||
try {
|
||||
engine = IrisWorlds.access(world.realWorld()).getCompound().getEngine(index);
|
||||
return !engine.isClosed();
|
||||
}
|
||||
|
||||
catch(Throwable e)
|
||||
{
|
||||
} catch (Throwable e) {
|
||||
|
||||
}
|
||||
}
|
||||
@ -413,8 +403,7 @@ public class VisionGUI extends JPanel implements MouseWheelListener, KeyListener
|
||||
|
||||
@Override
|
||||
public void paint(Graphics gx) {
|
||||
if(updateEngine())
|
||||
{
|
||||
if (updateEngine()) {
|
||||
dump();
|
||||
}
|
||||
|
||||
|
Loading…
x
Reference in New Issue
Block a user