mirror of
https://github.com/VolmitSoftware/Iris.git
synced 2025-07-18 18:23:06 +00:00
Init engine on world touch / access / checks
This commit is contained in:
parent
79299112eb
commit
4b3a016d70
@ -87,7 +87,13 @@ public class IrisToolbelt {
|
|||||||
return false;
|
return false;
|
||||||
}
|
}
|
||||||
|
|
||||||
return world.getGenerator() instanceof PlatformChunkGenerator;
|
if(world.getGenerator() instanceof PlatformChunkGenerator f)
|
||||||
|
{
|
||||||
|
f.touch(world);
|
||||||
|
return true;
|
||||||
|
}
|
||||||
|
|
||||||
|
return false;
|
||||||
}
|
}
|
||||||
|
|
||||||
public static boolean isIrisStudioWorld(World world) {
|
public static boolean isIrisStudioWorld(World world) {
|
||||||
|
@ -263,6 +263,11 @@ public class BukkitChunkGenerator extends ChunkGenerator implements PlatformChun
|
|||||||
});
|
});
|
||||||
}
|
}
|
||||||
|
|
||||||
|
@Override
|
||||||
|
public void touch(World world) {
|
||||||
|
getEngine(world);
|
||||||
|
}
|
||||||
|
|
||||||
@Override
|
@Override
|
||||||
public @NotNull ChunkData generateChunkData(@NotNull World world, @NotNull Random ignored, int x, int z, @NotNull BiomeGrid biome) {
|
public @NotNull ChunkData generateChunkData(@NotNull World world, @NotNull Random ignored, int x, int z, @NotNull BiomeGrid biome) {
|
||||||
try {
|
try {
|
||||||
|
@ -153,6 +153,11 @@ public class HeadlessGenerator implements PlatformChunkGenerator {
|
|||||||
return false;
|
return false;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
@Override
|
||||||
|
public void touch(World world) {
|
||||||
|
|
||||||
|
}
|
||||||
|
|
||||||
public KList<Position2> getChunksInRegion(int x, int z) {
|
public KList<Position2> getChunksInRegion(int x, int z) {
|
||||||
try {
|
try {
|
||||||
return MCAUtil.sampleChunkPositions(writer.getRegionFile(x, z));
|
return MCAUtil.sampleChunkPositions(writer.getRegionFile(x, z));
|
||||||
|
@ -46,4 +46,6 @@ public interface PlatformChunkGenerator extends Hotloadable, DataProvider {
|
|||||||
void close();
|
void close();
|
||||||
|
|
||||||
boolean isStudio();
|
boolean isStudio();
|
||||||
|
|
||||||
|
void touch(World world);
|
||||||
}
|
}
|
||||||
|
Loading…
x
Reference in New Issue
Block a user