compile fixes

compile fixes

compile fixes
This commit is contained in:
Jason Penilla
2024-04-24 20:40:32 -07:00
parent aa5add485f
commit 1db3411c0e
20 changed files with 73 additions and 55 deletions

View File

@@ -13,17 +13,17 @@ index 0000000000000000000000000000000000000000..00000000000000000000000000000000
}
+ // Paper start - Allow delegation to vanilla chunk gen
+ private static final List<net.minecraft.world.level.chunk.ChunkStatus> VANILLA_GEN_STATUSES = List.of(
+ net.minecraft.world.level.chunk.ChunkStatus.EMPTY,
+ net.minecraft.world.level.chunk.ChunkStatus.STRUCTURE_STARTS,
+ net.minecraft.world.level.chunk.ChunkStatus.STRUCTURE_REFERENCES,
+ net.minecraft.world.level.chunk.ChunkStatus.BIOMES,
+ net.minecraft.world.level.chunk.ChunkStatus.NOISE,
+ net.minecraft.world.level.chunk.ChunkStatus.SURFACE,
+ net.minecraft.world.level.chunk.ChunkStatus.CARVERS,
+ net.minecraft.world.level.chunk.ChunkStatus.FEATURES,
+ net.minecraft.world.level.chunk.ChunkStatus.INITIALIZE_LIGHT,
+ net.minecraft.world.level.chunk.ChunkStatus.LIGHT
+ private static final List<net.minecraft.world.level.chunk.status.ChunkStatus> VANILLA_GEN_STATUSES = List.of(
+ net.minecraft.world.level.chunk.status.ChunkStatus.EMPTY,
+ net.minecraft.world.level.chunk.status.ChunkStatus.STRUCTURE_STARTS,
+ net.minecraft.world.level.chunk.status.ChunkStatus.STRUCTURE_REFERENCES,
+ net.minecraft.world.level.chunk.status.ChunkStatus.BIOMES,
+ net.minecraft.world.level.chunk.status.ChunkStatus.NOISE,
+ net.minecraft.world.level.chunk.status.ChunkStatus.SURFACE,
+ net.minecraft.world.level.chunk.status.ChunkStatus.CARVERS,
+ net.minecraft.world.level.chunk.status.ChunkStatus.FEATURES,
+ net.minecraft.world.level.chunk.status.ChunkStatus.INITIALIZE_LIGHT,
+ net.minecraft.world.level.chunk.status.ChunkStatus.LIGHT
+ );
+
+ @Override
@@ -52,7 +52,7 @@ index 0000000000000000000000000000000000000000..00000000000000000000000000000000
+ net.minecraft.Util.backgroundExecutor(),
+ "CraftServer#createVanillaChunkData(worldName='" + world.getName() + "', x='" + x + "', z='" + z + "')"
+ );
+ for (final net.minecraft.world.level.chunk.ChunkStatus chunkStatus : VANILLA_GEN_STATUSES) {
+ for (final net.minecraft.world.level.chunk.status.ChunkStatus chunkStatus : VANILLA_GEN_STATUSES) {
+ final List<net.minecraft.world.level.chunk.ChunkAccess> chunks = Lists.newArrayList();
+ final int statusRange = Math.max(1, chunkStatus.getRange());
+
@@ -79,8 +79,8 @@ index 0000000000000000000000000000000000000000..00000000000000000000000000000000
+ },
+ chunks
+ ).thenAccept(either -> {
+ if (chunkStatus == net.minecraft.world.level.chunk.ChunkStatus.NOISE) {
+ either.left().ifPresent(chunk -> net.minecraft.world.level.levelgen.Heightmap.primeHeightmaps(chunk, net.minecraft.world.level.chunk.ChunkStatus.POST_FEATURES));
+ if (chunkStatus == net.minecraft.world.level.chunk.status.ChunkStatus.NOISE) {
+ either.left().ifPresent(chunk -> net.minecraft.world.level.levelgen.Heightmap.primeHeightmaps(chunk, net.minecraft.world.level.chunk.status.ChunkStatus.POST_FEATURES));
+ }
+ }).join();
+ }