public void getChunkAt(IChunkProvider ichunkprovider, int i, int j) { BlockSand.instaFall = true; int k = i * 16; int l = j * 16; BiomeBase biomebase = this.m.getBiome(k + 16, l + 16); biomebase.a(this.m, this.m.random, k, l); BlockSand.instaFall = false; }
public void changeBlockBiome(Location location) { int x = location.getBlockX(); int z = location.getBlockZ(); World world = ((CraftWorld) location.getWorld()).getHandle(); if (world.isLoaded(new BlockPosition(x, 0, z))) { Chunk chunk = world.getChunkAtWorldCoords(new BlockPosition(x, 0, z)); if (chunk != null) { byte[] biomevals = chunk.getBiomeIndex(); biomevals[((z & 0xF) << 4) | (x & 0xF)] = (byte) BiomeBase.a(biomeBase); } } }
public BiomeBase[] a(BiomeBase[] abiomebase, int i, int j, int k, int l) { if (abiomebase == null || abiomebase.length < k * l) { abiomebase = new BiomeBase[k * l]; } this.temperature = this.e.a( this.temperature, (double) i, (double) j, k, k, 0.02500000037252903D, 0.02500000037252903D, 0.25D); this.rain = this.f.a( this.rain, (double) i, (double) j, k, k, 0.05000000074505806D, 0.05000000074505806D, 0.3333333333333333D); this.c = this.g.a(this.c, (double) i, (double) j, k, k, 0.25D, 0.25D, 0.5882352941176471D); int i1 = 0; for (int j1 = 0; j1 < k; ++j1) { for (int k1 = 0; k1 < l; ++k1) { double d0 = this.c[i1] * 1.1D + 0.5D; double d1 = 0.01D; double d2 = 1.0D - d1; double d3 = (this.temperature[i1] * 0.15D + 0.7D) * d2 + d0 * d1; d1 = 0.0020D; d2 = 1.0D - d1; double d4 = (this.rain[i1] * 0.15D + 0.5D) * d2 + d0 * d1; d3 = 1.0D - (1.0D - d3) * (1.0D - d3); if (d3 < 0.0D) { d3 = 0.0D; } if (d4 < 0.0D) { d4 = 0.0D; } if (d3 > 1.0D) { d3 = 1.0D; } if (d4 > 1.0D) { d4 = 1.0D; } this.temperature[i1] = d3; this.rain[i1] = d4; abiomebase[i1++] = BiomeBase.a(d3, d4); } } return abiomebase; }