mirror of
https://github.com/VolmitSoftware/Iris.git
synced 2025-07-19 02:36:59 +00:00
Regen inf
This commit is contained in:
parent
44ef039321
commit
0755e8f618
@ -498,11 +498,6 @@ public class EngineCompositeGenerator extends ChunkGenerator implements IrisAcce
|
||||
|
||||
@Override
|
||||
public void clearRegeneratedLists(int x, int z) {
|
||||
if (true)
|
||||
{
|
||||
return;
|
||||
}
|
||||
|
||||
for(int i = 0; i < getComposite().getSize(); i++)
|
||||
{
|
||||
getComposite().getEngine(i).getParallax().delete(x, z);
|
||||
@ -511,6 +506,9 @@ public class EngineCompositeGenerator extends ChunkGenerator implements IrisAcce
|
||||
|
||||
@Override
|
||||
public void regenerate(int x, int z) {
|
||||
clearRegeneratedLists(x, z);
|
||||
int xx = x*16;
|
||||
int zz = z*16;
|
||||
generateChunkRawData(getComposite().getWorld(), x, z, new TerrainChunk() {
|
||||
@Override
|
||||
public void setRaw(ChunkData data) {
|
||||
@ -544,12 +542,15 @@ public class EngineCompositeGenerator extends ChunkGenerator implements IrisAcce
|
||||
|
||||
@Override
|
||||
public void setBlock(int x, int y, int z, BlockData blockData) {
|
||||
Iris.edit.set(compound.getWorld(), x, y, z, blockData);
|
||||
if(!getBlockData(x,y,z).matches(blockData))
|
||||
{
|
||||
Iris.edit.set(compound.getWorld(), x+xx, y, z+zz, blockData);
|
||||
}
|
||||
}
|
||||
|
||||
@Override
|
||||
public BlockData getBlockData(int x, int y, int z) {
|
||||
return Iris.edit.get(compound.getWorld(), x, y, z);
|
||||
return Iris.edit.get(compound.getWorld(), x+xx, y, z+zz);
|
||||
}
|
||||
|
||||
@Override
|
||||
@ -607,10 +608,6 @@ public class EngineCompositeGenerator extends ChunkGenerator implements IrisAcce
|
||||
|
||||
Iris.edit.flushNow();
|
||||
|
||||
for (BlockPopulator i : populators) {
|
||||
Chunk chunk = getComposite().getWorld().getChunkAt(x, z);
|
||||
i.populate(compound.getWorld(), new RNG(Cache.key(x, z)), chunk);
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
|
@ -409,13 +409,9 @@ public interface EngineParallaxManager extends DataProvider, IObjectPlacer
|
||||
}
|
||||
}
|
||||
|
||||
x = Math.max(z, x);
|
||||
x = (Math.max(x, 16) + 16) >> 4;
|
||||
z = (Math.max(z, 16) + 16) >> 4;
|
||||
x = x % 2 == 0 ? x + 1 : x;
|
||||
z = z % 2 == 0 ? z + 1 : z;
|
||||
x = Math.max(x, z);
|
||||
z = x;
|
||||
Iris.verbose(getEngine().getDimension().getName() + " Parallax Size: " + x + ", " + z);
|
||||
return x;
|
||||
}
|
||||
|
||||
|
@ -56,11 +56,19 @@ public class EnginePlayer {
|
||||
}
|
||||
|
||||
public void sample() {
|
||||
if(ticksSinceLastSample() > 55 && player.getLocation().distanceSquared(lastLocation) > 9 * 9)
|
||||
try
|
||||
{
|
||||
lastLocation = player.getLocation().clone();
|
||||
lastSample = M.ms();
|
||||
sampleBiomeRegion();
|
||||
if(ticksSinceLastSample() > 55 && player.getLocation().distanceSquared(lastLocation) > 9 * 9)
|
||||
{
|
||||
lastLocation = player.getLocation().clone();
|
||||
lastSample = M.ms();
|
||||
sampleBiomeRegion();
|
||||
}
|
||||
}
|
||||
|
||||
catch(Throwable ew)
|
||||
{
|
||||
|
||||
}
|
||||
}
|
||||
|
||||
|
Loading…
x
Reference in New Issue
Block a user