mirror of
https://github.com/VolmitSoftware/Iris.git
synced 2025-12-27 19:19:07 +00:00
Fixes
This commit is contained in:
@@ -47,6 +47,7 @@ import org.bukkit.Material;
|
||||
import org.bukkit.block.Biome;
|
||||
import org.bukkit.block.data.BlockData;
|
||||
|
||||
import java.lang.reflect.Field;
|
||||
import java.util.List;
|
||||
import java.util.UUID;
|
||||
|
||||
@@ -502,4 +503,20 @@ public class IrisComplex implements DataProvider {
|
||||
biome.setInferredType(b.getInferredType());
|
||||
return implode(biome, x, z, max - 1);
|
||||
}
|
||||
|
||||
public void close() {
|
||||
// I know this looks awful, but it helps gc not deal with the spaghetti reference soup going on here
|
||||
for (Field i : getClass().getDeclaredFields())
|
||||
{
|
||||
if(i.getType().equals(ProceduralStream.class))
|
||||
{
|
||||
i.setAccessible(true);
|
||||
try {
|
||||
i.set(this, null);
|
||||
} catch (IllegalAccessException e) {
|
||||
e.printStackTrace();
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
@@ -303,6 +303,7 @@ public class IrisEngine extends BlockPopulator implements Engine {
|
||||
getCaveModifier().close();
|
||||
getPostModifier().close();
|
||||
getMantle().close();
|
||||
getComplex().close();
|
||||
Iris.debug("Engine Fully Shutdown!");
|
||||
}
|
||||
|
||||
|
||||
Reference in New Issue
Block a user