Advertisement
gt22

Untitled

Aug 18th, 2019
260
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
Java 3.11 KB | None | 0 0
  1. public int[] getInts(int areaX, int areaY, int areaWidth, int areaHeight)
  2.     {
  3.         int[] aint = this.parent.getInts(areaX, areaY, areaWidth, areaHeight);
  4.         int[] aint1 = IntCache.getIntCache(areaWidth * areaHeight);
  5.  
  6.         for (int i = 0; i < areaHeight; ++i)
  7.         {
  8.             for (int j = 0; j < areaWidth; ++j)
  9.             {
  10.                 this.initChunkSeed((long)(j + areaX), (long)(i + areaY));
  11.                 int k = aint[j + i * areaWidth];
  12.                 int l = (k & 3840) >> 8;
  13.                 k = k & -3841;
  14.  
  15.                 if (this.settings != null && this.settings.fixedBiome >= 0)
  16.                 {
  17.                     aint1[j + i * areaWidth] = this.settings.fixedBiome;
  18.                 }
  19.                 else if (isBiomeOceanic(k))
  20.                 {
  21.                     aint1[j + i * areaWidth] = k;
  22.                 }
  23.                 else if (k == Biome.getIdForBiome(Biomes.MUSHROOM_ISLAND))
  24.                 {
  25.                     aint1[j + i * areaWidth] = k;
  26.                 }
  27.                 else if (k == 1)
  28.                 {
  29.                     if (l > 0)
  30.                     {
  31.                         if (this.nextInt(3) == 0)
  32.                         {
  33.                             aint1[j + i * areaWidth] = Biome.getIdForBiome(Biomes.MESA_CLEAR_ROCK);
  34.                         }
  35.                         else
  36.                         {
  37.                             aint1[j + i * areaWidth] = Biome.getIdForBiome(Biomes.MESA_ROCK);
  38.                         }
  39.                     }
  40.                     else
  41.                     {
  42.                         aint1[j + i * areaWidth] = Biome.getIdForBiome(getWeightedBiomeEntry(net.minecraftforge.common.BiomeManager.BiomeType.DESERT).biome);
  43.                     }
  44.                 }
  45.                 else if (k == 2)
  46.                 {
  47.                     if (l > 0)
  48.                     {
  49.                         aint1[j + i * areaWidth] = Biome.getIdForBiome(Biomes.JUNGLE);
  50.                     }
  51.                     else
  52.                     {
  53.                         aint1[j + i * areaWidth] = Biome.getIdForBiome(getWeightedBiomeEntry(net.minecraftforge.common.BiomeManager.BiomeType.WARM).biome);
  54.                     }
  55.                 }
  56.                 else if (k == 3)
  57.                 {
  58.                     if (l > 0)
  59.                     {
  60.                         aint1[j + i * areaWidth] = Biome.getIdForBiome(Biomes.REDWOOD_TAIGA);
  61.                     }
  62.                     else
  63.                     {
  64.                         aint1[j + i * areaWidth] = Biome.getIdForBiome(getWeightedBiomeEntry(net.minecraftforge.common.BiomeManager.BiomeType.COOL).biome);
  65.                     }
  66.                 }
  67.                 else if (k == 4)
  68.                 {
  69.                     aint1[j + i * areaWidth] = Biome.getIdForBiome(getWeightedBiomeEntry(net.minecraftforge.common.BiomeManager.BiomeType.ICY).biome);
  70.                 }
  71.                 else
  72.                 {
  73.                     aint1[j + i * areaWidth] = Biome.getIdForBiome(Biomes.MUSHROOM_ISLAND);
  74.                 }
  75.             }
  76.         }
  77.  
  78.         return aint1;
  79.     }
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement