mirror of
https://github.com/GTMEGA/EndlessIDs.git
synced 2026-11-24 10:34:29 +00:00
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) {
|
||||
|
||||
Reference in new issue
Block a user