mirror of
https://github.com/VolmitSoftware/Iris.git
synced 2025-07-03 16:36:00 +00:00
v+
This commit is contained in:
parent
30bc725631
commit
a5725439ee
2
pom.xml
2
pom.xml
@ -4,7 +4,7 @@
|
|||||||
<modelVersion>4.0.0</modelVersion>
|
<modelVersion>4.0.0</modelVersion>
|
||||||
<groupId>com.volmit</groupId>
|
<groupId>com.volmit</groupId>
|
||||||
<artifactId>Iris</artifactId>
|
<artifactId>Iris</artifactId>
|
||||||
<version>1.1.4</version>
|
<version>1.1.5</version>
|
||||||
<name>Iris</name>
|
<name>Iris</name>
|
||||||
<properties>
|
<properties>
|
||||||
<skip.copy>false</skip.copy>
|
<skip.copy>false</skip.copy>
|
||||||
|
@ -38,7 +38,7 @@ public class ParallaxWorld implements ParallaxAccess
|
|||||||
{
|
{
|
||||||
int m = 0;
|
int m = 0;
|
||||||
|
|
||||||
synchronized (loadedRegions)
|
try
|
||||||
{
|
{
|
||||||
for(ParallaxRegion i : loadedRegions.values())
|
for(ParallaxRegion i : loadedRegions.values())
|
||||||
{
|
{
|
||||||
@ -46,6 +46,11 @@ public class ParallaxWorld implements ParallaxAccess
|
|||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
catch(Throwable e)
|
||||||
|
{
|
||||||
|
|
||||||
|
}
|
||||||
|
|
||||||
return m;
|
return m;
|
||||||
}
|
}
|
||||||
|
|
||||||
@ -201,19 +206,16 @@ public class ParallaxWorld implements ParallaxAccess
|
|||||||
@Override
|
@Override
|
||||||
public void cleanup(long r, long c) {
|
public void cleanup(long r, long c) {
|
||||||
J.a(() -> {
|
J.a(() -> {
|
||||||
synchronized (loadedRegions)
|
for(ParallaxRegion i : loadedRegions.v())
|
||||||
{
|
{
|
||||||
for(ParallaxRegion i : loadedRegions.v())
|
if(i.hasBeenIdleLongerThan(r))
|
||||||
{
|
{
|
||||||
if(i.hasBeenIdleLongerThan(r))
|
unload(i.getX(), i.getZ());
|
||||||
{
|
}
|
||||||
unload(i.getX(), i.getZ());
|
|
||||||
}
|
|
||||||
|
|
||||||
else
|
else
|
||||||
{
|
{
|
||||||
i.cleanup(c);
|
i.cleanup(c);
|
||||||
}
|
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
});
|
});
|
||||||
@ -226,16 +228,13 @@ public class ParallaxWorld implements ParallaxAccess
|
|||||||
|
|
||||||
@Override
|
@Override
|
||||||
public synchronized void saveAllNOW() {
|
public synchronized void saveAllNOW() {
|
||||||
synchronized (loadedRegions)
|
for(ParallaxRegion i : loadedRegions.v())
|
||||||
{
|
{
|
||||||
for(ParallaxRegion i : loadedRegions.v())
|
synchronized (save)
|
||||||
{
|
{
|
||||||
synchronized (save)
|
if(save.contains(key(i.getX(), i.getZ())))
|
||||||
{
|
{
|
||||||
if(save.contains(key(i.getX(), i.getZ())))
|
save(i.getX(), i.getZ());
|
||||||
{
|
|
||||||
save(i.getX(), i.getZ());
|
|
||||||
}
|
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
Loading…
x
Reference in New Issue
Block a user