9
0
mirror of https://github.com/VolmitSoftware/Iris.git synced 2025-12-29 12:09:07 +00:00

Performance!

This commit is contained in:
Daniel Mills
2020-11-12 21:02:09 -05:00
parent bf9c4c602b
commit 0dbff85bd8
10 changed files with 257 additions and 77 deletions

View File

@@ -79,6 +79,14 @@ public class EditManager implements Listener
}
}
public void flushNow()
{
for(World i : editors.k())
{
editors.remove(i).close();
}
}
public BlockEditor open(World world)
{
if(editors.containsKey(world))

View File

@@ -46,10 +46,10 @@ public class CommandIrisRegen extends MortarCommand
return true;
}
//TODO: IrisWorlds.access(world).clearRegeneratedLists();
if(args.length == 0)
{
sender.sendMessage("Regenerating your chunk");
IrisWorlds.access(world).clearRegeneratedLists(p.getLocation().getChunk().getX(), p.getLocation().getChunk().getZ());
IrisWorlds.access(world).regenerate(p.getLocation().getChunk().getX(), p.getLocation().getChunk().getZ());
return true;
}
@@ -58,6 +58,7 @@ public class CommandIrisRegen extends MortarCommand
{
int m = Integer.valueOf(args[0]);
sender.sendMessage("Regenerating " + (m * m) + " Chunks Surrounding you");
new Spiraler(m, m, (a, b) -> IrisWorlds.access(world).clearRegeneratedLists(a + p.getLocation().getChunk().getX(), b + p.getLocation().getChunk().getZ())).drain();
new Spiraler(m, m, (a, b) -> IrisWorlds.access(world).regenerate(a + p.getLocation().getChunk().getX(), b + p.getLocation().getChunk().getZ())).drain();
}
catch(Throwable e)