diff --git a/src/main/kotlin/ru/dbotthepony/mc/otm/worldgen/EnhancedPlacedFeature.kt b/src/main/kotlin/ru/dbotthepony/mc/otm/worldgen/EnhancedPlacedFeature.kt index 9f0902b44..38969a7cb 100644 --- a/src/main/kotlin/ru/dbotthepony/mc/otm/worldgen/EnhancedPlacedFeature.kt +++ b/src/main/kotlin/ru/dbotthepony/mc/otm/worldgen/EnhancedPlacedFeature.kt @@ -16,6 +16,7 @@ import net.minecraft.Util import net.minecraft.core.BlockPos import net.minecraft.core.Holder import net.minecraft.core.SectionPos +import net.minecraft.server.level.ServerLevel import net.minecraft.world.level.ChunkPos import net.minecraft.world.level.WorldGenLevel import net.minecraft.world.level.levelgen.feature.ConfiguredFeature @@ -173,10 +174,10 @@ object EnhancedPlacedFeature : Feature( .executor(Util.backgroundExecutor()) .expireAfterAccess(Duration.ofMinutes(10)) .weakKeys() - .build>() + .build>() private fun getCache(level: WorldGenLevel): Cache { - return level2cache.get(level) { + return level2cache.get(level.level) { Caffeine.newBuilder() .scheduler(Scheduler.systemScheduler()) .executor(Util.backgroundExecutor())