aboutsummaryrefslogtreecommitdiff
path: root/src/Java/gtPlusPlus/everglades/biome/GenLayerBiomes.java
diff options
context:
space:
mode:
authorJordan Byrne <draknyte1@hotmail.com>2018-03-14 04:40:57 +1000
committerJordan Byrne <draknyte1@hotmail.com>2018-03-14 04:40:57 +1000
commitbf6713f0d1669e400b4545b173c18a3b66cad113 (patch)
tree169c30de9539cd3249045280fcea32372d4f7c25 /src/Java/gtPlusPlus/everglades/biome/GenLayerBiomes.java
parentdde7a2c8c7daabc31b577d5876ef654340658bf7 (diff)
downloadGT5-Unofficial-bf6713f0d1669e400b4545b173c18a3b66cad113.tar.gz
GT5-Unofficial-bf6713f0d1669e400b4545b173c18a3b66cad113.tar.bz2
GT5-Unofficial-bf6713f0d1669e400b4545b173c18a3b66cad113.zip
% Refactored all Everglades stuff to it's own package.
$ Fixed inverted EIO tooltip logic.
Diffstat (limited to 'src/Java/gtPlusPlus/everglades/biome/GenLayerBiomes.java')
-rw-r--r--src/Java/gtPlusPlus/everglades/biome/GenLayerBiomes.java31
1 files changed, 31 insertions, 0 deletions
diff --git a/src/Java/gtPlusPlus/everglades/biome/GenLayerBiomes.java b/src/Java/gtPlusPlus/everglades/biome/GenLayerBiomes.java
new file mode 100644
index 0000000000..b69a8ea555
--- /dev/null
+++ b/src/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