Advertisement
Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- public int[] getInts(int areaX, int areaY, int areaWidth, int areaHeight)
- {
- int[] aint = this.parent.getInts(areaX, areaY, areaWidth, areaHeight);
- int[] aint1 = IntCache.getIntCache(areaWidth * areaHeight);
- for (int i = 0; i < areaHeight; ++i)
- {
- for (int j = 0; j < areaWidth; ++j)
- {
- this.initChunkSeed((long)(j + areaX), (long)(i + areaY));
- int k = aint[j + i * areaWidth];
- int l = (k & 3840) >> 8;
- k = k & -3841;
- if (this.settings != null && this.settings.fixedBiome >= 0)
- {
- aint1[j + i * areaWidth] = this.settings.fixedBiome;
- }
- else if (isBiomeOceanic(k))
- {
- aint1[j + i * areaWidth] = k;
- }
- else if (k == Biome.getIdForBiome(Biomes.MUSHROOM_ISLAND))
- {
- aint1[j + i * areaWidth] = k;
- }
- else if (k == 1)
- {
- if (l > 0)
- {
- if (this.nextInt(3) == 0)
- {
- aint1[j + i * areaWidth] = Biome.getIdForBiome(Biomes.MESA_CLEAR_ROCK);
- }
- else
- {
- aint1[j + i * areaWidth] = Biome.getIdForBiome(Biomes.MESA_ROCK);
- }
- }
- else
- {
- aint1[j + i * areaWidth] = Biome.getIdForBiome(getWeightedBiomeEntry(net.minecraftforge.common.BiomeManager.BiomeType.DESERT).biome);
- }
- }
- else if (k == 2)
- {
- if (l > 0)
- {
- aint1[j + i * areaWidth] = Biome.getIdForBiome(Biomes.JUNGLE);
- }
- else
- {
- aint1[j + i * areaWidth] = Biome.getIdForBiome(getWeightedBiomeEntry(net.minecraftforge.common.BiomeManager.BiomeType.WARM).biome);
- }
- }
- else if (k == 3)
- {
- if (l > 0)
- {
- aint1[j + i * areaWidth] = Biome.getIdForBiome(Biomes.REDWOOD_TAIGA);
- }
- else
- {
- aint1[j + i * areaWidth] = Biome.getIdForBiome(getWeightedBiomeEntry(net.minecraftforge.common.BiomeManager.BiomeType.COOL).biome);
- }
- }
- else if (k == 4)
- {
- aint1[j + i * areaWidth] = Biome.getIdForBiome(getWeightedBiomeEntry(net.minecraftforge.common.BiomeManager.BiomeType.ICY).biome);
- }
- else
- {
- aint1[j + i * areaWidth] = Biome.getIdForBiome(Biomes.MUSHROOM_ISLAND);
- }
- }
- }
- return aint1;
- }
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement