TARDIS Mod compat

#220
This commit is contained in:
FalsePattern committed 2025-06-06 12:30:08 +02:00
1 parent 00688eb30d
commit a0c8fe49a3
5 files changed
+57 -1

No files matched your search

@@ -29,16 +29,20 @@ import net.minecraft.world.chunk.Chunk;
import java.util.function.IntFunction;
import static com.falsepattern.endlessids.EndlessIDs.FAKE_BIOME_ARRAY_PLACEHOLDER;
import static com.falsepattern.endlessids.EndlessIDs.ZERO_LENGTH_BIOME_ARRAY_PLACEHOLDER;
public class BiomePatchHelper {
public static byte[] getBiomeArrayTweaked(Chunk chunk, IntFunction<BiomeGenBase> biomesForGeneration) {
return getBiomeArrayTweaked(chunk, false, biomesForGeneration);
}
public static byte[] getBiomeArrayTweaked(Chunk chunk, boolean fake, IntFunction<BiomeGenBase> biomesForGeneration) {
val chunkBiomes = ((ChunkBiomeHook) chunk).getBiomeShortArray();
for (int i = 0; i < chunkBiomes.length; ++i) {
chunkBiomes[i] = (short) biomesForGeneration.apply(i).biomeID;
}
return ZERO_LENGTH_BIOME_ARRAY_PLACEHOLDER;
return fake ? FAKE_BIOME_ARRAY_PLACEHOLDER : ZERO_LENGTH_BIOME_ARRAY_PLACEHOLDER;
}
public static byte[] getBiomeArrayTweaked(Chunk chunk, BiomeGenBase[] biomesForGeneration) {