mirror of
https://github.com/VolmitSoftware/Iris.git
synced 2025-07-19 10:43:14 +00:00
Stop overlocking
This commit is contained in:
parent
633fea8c68
commit
81f6ce26d4
@ -34,7 +34,6 @@ import com.volmit.iris.object.IrisRegion;
|
||||
import com.volmit.iris.object.IrisStructure;
|
||||
import com.volmit.iris.util.B;
|
||||
import com.volmit.iris.util.ChronoLatch;
|
||||
import com.volmit.iris.util.IrisLock;
|
||||
import com.volmit.iris.util.J;
|
||||
import com.volmit.iris.util.M;
|
||||
import com.volmit.iris.util.PrecisionStopwatch;
|
||||
@ -59,7 +58,6 @@ public abstract class ContextualChunkGenerator extends ChunkGenerator implements
|
||||
protected ChronoLatch tickLatch;
|
||||
protected ChronoLatch pushLatch;
|
||||
protected IrisMetrics metrics;
|
||||
protected IrisLock hlock;
|
||||
protected World world;
|
||||
protected int generated;
|
||||
protected int ticks;
|
||||
@ -74,7 +72,6 @@ public abstract class ContextualChunkGenerator extends ChunkGenerator implements
|
||||
tickLatch = new ChronoLatch(650);
|
||||
perSecond = new ChronoLatch(1000);
|
||||
hlast = M.ms();
|
||||
hlock = new IrisLock("HotLock");
|
||||
cache = new AtomicMulticache();
|
||||
CNG.creates = 0;
|
||||
generated = 0;
|
||||
@ -318,7 +315,6 @@ public abstract class ContextualChunkGenerator extends ChunkGenerator implements
|
||||
@Override
|
||||
public ChunkData generateChunkData(World world, Random no, int x, int z, BiomeGrid biomeGrid)
|
||||
{
|
||||
hlock.lock();
|
||||
setHotloadable(false);
|
||||
if(!dev)
|
||||
{
|
||||
@ -330,7 +326,6 @@ public abstract class ContextualChunkGenerator extends ChunkGenerator implements
|
||||
|
||||
if(failing)
|
||||
{
|
||||
hlock.unlock();
|
||||
return generateChunkDataFailure(world, no, x, z, biomeGrid);
|
||||
}
|
||||
|
||||
@ -359,7 +354,6 @@ public abstract class ContextualChunkGenerator extends ChunkGenerator implements
|
||||
Iris.instance.hit(hits);
|
||||
metrics.getLoss().put(sx.getMilliseconds() - s.getMilliseconds());
|
||||
setHotloadable(true);
|
||||
hlock.unlock();
|
||||
return c;
|
||||
}
|
||||
|
||||
@ -369,7 +363,6 @@ public abstract class ContextualChunkGenerator extends ChunkGenerator implements
|
||||
}
|
||||
|
||||
setHotloadable(true);
|
||||
hlock.unlock();
|
||||
return generateChunkDataFailure(world, no, x, z, biomeGrid);
|
||||
}
|
||||
|
||||
@ -380,12 +373,10 @@ public abstract class ContextualChunkGenerator extends ChunkGenerator implements
|
||||
return;
|
||||
}
|
||||
|
||||
hlock.lock();
|
||||
if(world != null)
|
||||
{
|
||||
checkHotload(world);
|
||||
}
|
||||
hlock.unlock();
|
||||
}
|
||||
|
||||
private void checkHotload(World world)
|
||||
|
@ -8,7 +8,6 @@ import com.volmit.iris.gen.atomics.AtomicSliverMap;
|
||||
import com.volmit.iris.util.BiomeMap;
|
||||
import com.volmit.iris.util.GroupedExecutor;
|
||||
import com.volmit.iris.util.HeightMap;
|
||||
import com.volmit.iris.util.IrisLock;
|
||||
import com.volmit.iris.util.PrecisionStopwatch;
|
||||
import com.volmit.iris.util.RNG;
|
||||
|
||||
@ -23,7 +22,6 @@ public abstract class ParallelChunkGenerator extends DimensionChunkGenerator
|
||||
private int threads;
|
||||
protected int cacheX;
|
||||
protected int cacheZ;
|
||||
private IrisLock genlock;
|
||||
protected boolean cachingAllowed;
|
||||
|
||||
public ParallelChunkGenerator(String dimensionName, int threads)
|
||||
@ -32,7 +30,6 @@ public abstract class ParallelChunkGenerator extends DimensionChunkGenerator
|
||||
cacheX = 0;
|
||||
cacheZ = 0;
|
||||
this.threads = threads;
|
||||
genlock = new IrisLock("ParallelGenLock");
|
||||
cachingAllowed = false;
|
||||
}
|
||||
|
||||
@ -67,7 +64,6 @@ public abstract class ParallelChunkGenerator extends DimensionChunkGenerator
|
||||
|
||||
protected void onGenerate(RNG random, int x, int z, ChunkData data, BiomeGrid grid)
|
||||
{
|
||||
genlock.lock();
|
||||
cacheX = x;
|
||||
cacheZ = z;
|
||||
getCache().targetChunk(cacheX, cacheZ);
|
||||
@ -101,7 +97,6 @@ public abstract class ParallelChunkGenerator extends DimensionChunkGenerator
|
||||
getMetrics().getTerrain().put(p.getMilliseconds());
|
||||
p = PrecisionStopwatch.start();
|
||||
onPostGenerate(random, x, z, data, grid, height, biomeMap);
|
||||
genlock.unlock();
|
||||
}
|
||||
|
||||
protected void onClose()
|
||||
|
@ -644,10 +644,6 @@ public abstract class TerrainChunkGenerator extends ParallelChunkGenerator
|
||||
return Math.max(getTerrainHeight(x, z), getFluidHeight());
|
||||
}
|
||||
|
||||
////////////////////
|
||||
// BIOME METHODS
|
||||
///////////////////
|
||||
|
||||
@Override
|
||||
public void onHotload()
|
||||
{
|
||||
|
Loading…
x
Reference in New Issue
Block a user