Store last delay, so if a search takes a long time, it does not bog the server down.

This commit is contained in:
zontreck 2023-12-18 18:59:52 -07:00
parent 949ec511b7
commit 1c866e304e
3 changed files with 11 additions and 3 deletions

View file

@ -52,6 +52,13 @@ public class RTP
public WorldPosition position;
private List<Block> BLACKLIST = Lists.of(Blocks.LAVA, Blocks.WATER);
protected int tries;
protected int lastThreadDelay = 1;
protected RTP withThreadDelay(int delay)
{
lastThreadDelay=delay;
return this;
}
public boolean isDimension(ServerLevel level)
{