mirror of
https://github.com/VolmitSoftware/Iris.git
synced 2025-07-19 10:43:14 +00:00
Add thread count getter
This commit is contained in:
parent
527a0f5c70
commit
23136be280
@ -22,12 +22,6 @@ public class CommandIrisCTC extends MortarCommand
|
|||||||
@Override
|
@Override
|
||||||
public boolean handle(MortarSender sender, String[] args)
|
public boolean handle(MortarSender sender, String[] args)
|
||||||
{
|
{
|
||||||
if(args.length == 0)
|
|
||||||
{
|
|
||||||
sender.sendMessage("/iris ctc " + getArgsUsage());
|
|
||||||
return true;
|
|
||||||
}
|
|
||||||
|
|
||||||
if(sender.isPlayer())
|
if(sender.isPlayer())
|
||||||
{
|
{
|
||||||
Player p = sender.player();
|
Player p = sender.player();
|
||||||
@ -38,8 +32,14 @@ public class CommandIrisCTC extends MortarCommand
|
|||||||
sender.sendMessage("You must be in an iris world.");
|
sender.sendMessage("You must be in an iris world.");
|
||||||
return true;
|
return true;
|
||||||
}
|
}
|
||||||
|
|
||||||
IrisTerrainProvider g = IrisWorlds.getProvider(world);
|
IrisTerrainProvider g = IrisWorlds.getProvider(world);
|
||||||
|
|
||||||
|
if(args.length == 0){
|
||||||
|
sender.sendMessage("Current threads: " + g.getThreadCount());
|
||||||
|
return true;
|
||||||
|
}
|
||||||
|
|
||||||
|
|
||||||
int m = Math.min(Math.max(Integer.valueOf(args[0]), 2), 256);
|
int m = Math.min(Math.max(Integer.valueOf(args[0]), 2), 256);
|
||||||
g.changeThreadCount(m);
|
g.changeThreadCount(m);
|
||||||
sender.sendMessage("Thread count changed to " + m);
|
sender.sendMessage("Thread count changed to " + m);
|
||||||
|
@ -45,6 +45,10 @@ public abstract class ParallelTerrainProvider extends DimensionalTerrainProvider
|
|||||||
Iris.info("Thread Count changed to " + getThreads());
|
Iris.info("Thread Count changed to " + getThreads());
|
||||||
}
|
}
|
||||||
|
|
||||||
|
public int getThreadCount(){
|
||||||
|
return getThreads();
|
||||||
|
}
|
||||||
|
|
||||||
protected abstract int onGenerateColumn(int cx, int cz, int wx, int wz, int x, int z, AtomicSliver sliver, BiomeMap biomeMap, boolean sampled);
|
protected abstract int onGenerateColumn(int cx, int cz, int wx, int wz, int x, int z, AtomicSliver sliver, BiomeMap biomeMap, boolean sampled);
|
||||||
|
|
||||||
protected void onGenerateColumn(int cx, int cz, int wx, int wz, int x, int z, AtomicSliver sliver, BiomeMap biomeMap)
|
protected void onGenerateColumn(int cx, int cz, int wx, int wz, int x, int z, AtomicSliver sliver, BiomeMap biomeMap)
|
||||||
|
Loading…
x
Reference in New Issue
Block a user