diff options
author | Johann Bernhardt <johann.bernhardt@tum.de> | 2021-12-12 19:38:06 +0100 |
---|---|---|
committer | Johann Bernhardt <johann.bernhardt@tum.de> | 2021-12-12 19:38:06 +0100 |
commit | 311ab89f93558233a40079f7cb16605b141b5346 (patch) | |
tree | c5f44ef47f441a57c5f57aa801f639c7879ed760 /src/main/java/gtPlusPlus/everglades/biome/GenLayerBiomes.java | |
parent | 896143b96132f5ac54aa8d8f7386f27487e5e530 (diff) | |
download | GT5-Unofficial-311ab89f93558233a40079f7cb16605b141b5346.tar.gz GT5-Unofficial-311ab89f93558233a40079f7cb16605b141b5346.tar.bz2 GT5-Unofficial-311ab89f93558233a40079f7cb16605b141b5346.zip |
Move sources and resources
Diffstat (limited to 'src/main/java/gtPlusPlus/everglades/biome/GenLayerBiomes.java')
-rw-r--r-- | src/main/java/gtPlusPlus/everglades/biome/GenLayerBiomes.java | 31 |
1 files changed, 31 insertions, 0 deletions
diff --git a/src/main/java/gtPlusPlus/everglades/biome/GenLayerBiomes.java b/src/main/java/gtPlusPlus/everglades/biome/GenLayerBiomes.java new file mode 100644 index 0000000000..b69a8ea555 --- /dev/null +++ b/src/main/java/gtPlusPlus/everglades/biome/GenLayerBiomes.java @@ -0,0 +1,31 @@ +package gtPlusPlus.everglades.biome; + +import net.minecraft.world.biome.BiomeGenBase; +import net.minecraft.world.gen.layer.GenLayer; +import net.minecraft.world.gen.layer.IntCache; + +public class GenLayerBiomes extends GenLayer { + + protected BiomeGenBase[] allowedBiomes = { Biome_Everglades.biome, }; + + public GenLayerBiomes(long seed) { + super(seed); + } + + public GenLayerBiomes(long seed, GenLayer genlayer) { + super(seed); + this.parent = genlayer; + } + + @Override + public int[] getInts(int x, int z, int width, int depth) { + int[] dest = IntCache.getIntCache(width * depth); + for (int dz = 0; dz < depth; dz++) { + for (int dx = 0; dx < width; dx++) { + this.initChunkSeed(dx + x, dz + z); + dest[(dx + dz * width)] = this.allowedBiomes[nextInt(this.allowedBiomes.length)].biomeID; + } + } + return dest; + } +}
\ No newline at end of file |