WIP Caching Hints and Caching Sampler

This commit is contained in:
Zoe Gidiere
2024-10-09 23:36:12 -06:00
parent 370b2e0122
commit 1ae0d1f867
11 changed files with 222 additions and 9 deletions

View File

@@ -51,7 +51,13 @@ public class PlatformImpl extends AbstractPlatform {
private final TerraBukkitPlugin plugin;
private int generationThreads;
public PlatformImpl(TerraBukkitPlugin plugin) {
generationThreads = getGenerationThreadsWithReflection("ca.spottedleaf.moonrise.common.util.MoonriseCommon", "WORKER_THREADS", "Moonrise");
if (generationThreads == 0) {
generationThreads = 1;
}
this.plugin = plugin;
load();
}
@@ -108,6 +114,11 @@ public class PlatformImpl extends AbstractPlatform {
return itemHandle;
}
@Override
public int getGenerationThreads() {
return generationThreads;
}
@Override
public void register(TypeRegistry registry) {
super.register(registry);