mirror of
https://github.com/VolmitSoftware/Iris.git
synced 2025-07-19 10:43:14 +00:00
Parallax tweaks
This commit is contained in:
parent
6c8db56474
commit
c7c1b2b8c1
@ -88,4 +88,8 @@ public interface ParallaxAccess
|
|||||||
public void saveAll();
|
public void saveAll();
|
||||||
|
|
||||||
public void saveAllNOW();
|
public void saveAllNOW();
|
||||||
|
|
||||||
|
public int getRegionCount();
|
||||||
|
|
||||||
|
public int getChunkCount();
|
||||||
}
|
}
|
||||||
|
@ -173,4 +173,8 @@ public class ParallaxRegion extends HunkRegion
|
|||||||
objectSlice.cleanup(c);
|
objectSlice.cleanup(c);
|
||||||
updateSlice.cleanup(c);
|
updateSlice.cleanup(c);
|
||||||
}
|
}
|
||||||
|
|
||||||
|
public int getChunkCount() {
|
||||||
|
return blockSlice.getLoadCount() + objectSlice.getLoadCount() + updateSlice.getLoadCount();
|
||||||
|
}
|
||||||
}
|
}
|
||||||
|
@ -22,10 +22,30 @@ public class ParallaxWorld implements ParallaxAccess
|
|||||||
this.folder = folder;
|
this.folder = folder;
|
||||||
save = new KList<>();
|
save = new KList<>();
|
||||||
loadedRegions = new KMap<>();
|
loadedRegions = new KMap<>();
|
||||||
cleanup = new ChronoLatch(10000);
|
cleanup = new ChronoLatch(5000);
|
||||||
folder.mkdirs();
|
folder.mkdirs();
|
||||||
}
|
}
|
||||||
|
|
||||||
|
public int getRegionCount()
|
||||||
|
{
|
||||||
|
return loadedRegions.size();
|
||||||
|
}
|
||||||
|
|
||||||
|
public int getChunkCount()
|
||||||
|
{
|
||||||
|
int m = 0;
|
||||||
|
|
||||||
|
synchronized (loadedRegions)
|
||||||
|
{
|
||||||
|
for(ParallaxRegion i : loadedRegions.values())
|
||||||
|
{
|
||||||
|
m+= i.getChunkCount();
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
|
return m;
|
||||||
|
}
|
||||||
|
|
||||||
public synchronized void close()
|
public synchronized void close()
|
||||||
{
|
{
|
||||||
for(ParallaxRegion i : loadedRegions.v())
|
for(ParallaxRegion i : loadedRegions.v())
|
||||||
|
Loading…
x
Reference in New Issue
Block a user