@Override public void populate(IChunkProvider chunk, int x, int z) { BlockFalling.fallInstantly = true; int var4 = x * 16; int var5 = z * 16; BiomeGenBase biomeGen = this.worldObj.getBiomeGenForCoords(var4 + 16, var5 + 16); this.worldObj.getBiomeGenForCoords(var4 + 16, var5 + 16); this.rand.setSeed(this.worldObj.getSeed()); long var7 = this.rand.nextLong() / 2L * 2L + 1L; long var9 = this.rand.nextLong() / 2L * 2L + 1L; this.rand.setSeed(x * var7 + z * var9 ^ this.worldObj.getSeed()); biomeGen.decorate(this.worldObj, this.rand, var4, var5); this.decoratePlanet(this.worldObj, this.rand, var4, var5); SpawnerAnimals.performWorldGenSpawning(this.worldObj, biomeGen, var4 + 8, var5 + 8, 16, 16, this.rand); this.onPopulate(chunk, x, z); BlockFalling.fallInstantly = false; }
private static int getSpawnMode(Chunk chunk, int x, int y, int z) { if (!SpawnerAnimals.canCreatureTypeSpawnAtLocation(EnumCreatureType.monster, chunk.worldObj, x, y, z) || chunk.getSavedLightValue(EnumSkyBlock.Block, x & 15, y, z & 15) >= 8) return 0; aabb.minX = x + 0.2; aabb.maxX = x + 0.8; aabb.minY = y + 0.01; aabb.maxY = y + 1.8; aabb.minZ = z + 0.2; aabb.maxZ = z + 0.8; if (!chunk.worldObj.checkNoEntityCollision(aabb) || !chunk.worldObj.getCollidingBoundingBoxes(dummyEntity, aabb).isEmpty() || chunk.worldObj.isAnyLiquid(aabb)) return 0; if (chunk.getSavedLightValue(EnumSkyBlock.Sky, x & 15, y, z & 15) >= 8) return 1; return 2; }
private static int getSpawnMode(Chunk chunk, int x, int y, int z) { World world = chunk.getWorld(); BlockPos pos = new BlockPos(x, y, z); if (!SpawnerAnimals.canCreatureTypeSpawnAtLocation(SpawnPlacementType.ON_GROUND, world, pos) || chunk.getLightFor(EnumSkyBlock.BLOCK, pos) >= 8) return 0; c.set(x+0.2, y+0.01, z+0.2, x+0.8, y+1.8, z+0.8); AxisAlignedBB aabb = c.aabb(); if (!world.checkNoEntityCollision(aabb) || !world.getCollidingBoundingBoxes(dummyEntity, aabb).isEmpty() || world.isAnyLiquid(aabb)) return 0; if (chunk.getLightFor(EnumSkyBlock.SKY, pos) >= 8) return 1; return 2; }
private Vec3 func_75527_a(int par1, int par2, int par3) { for (int var4 = 0; var4 < 10; ++var4) { int var5 = par1 + this.worldObj.rand.nextInt(16) - 8; int var6 = par2 + this.worldObj.rand.nextInt(6) - 3; int var7 = par3 + this.worldObj.rand.nextInt(16) - 8; if (this.theVillage.isInRange(var5, var6, var7) && SpawnerAnimals.canCreatureTypeSpawnAtLocation(EnumCreatureType.monster, this.worldObj, var5, var6, var7)) { this.worldObj.getWorldVec3Pool().getVecFromPool((double)var5, (double)var6, (double)var7); } } return null; }
private Vec3 func_75527_a(int p_75527_1_, int p_75527_2_, int p_75527_3_) { for (int l = 0; l < 10; ++l) { int i1 = p_75527_1_ + this.worldObj.rand.nextInt(16) - 8; int j1 = p_75527_2_ + this.worldObj.rand.nextInt(6) - 3; int k1 = p_75527_3_ + this.worldObj.rand.nextInt(16) - 8; if (this.theVillage.isInRange(i1, j1, k1) && SpawnerAnimals.canCreatureTypeSpawnAtLocation(EnumCreatureType.monster, this.worldObj, i1, j1, k1)) { Vec3.createVectorHelper((double)i1, (double)j1, (double)k1); } } return null; }
private Vec3 func_75527_a(int par1, int par2, int par3) { for (int l = 0; l < 10; ++l) { int i1 = par1 + this.worldObj.rand.nextInt(16) - 8; int j1 = par2 + this.worldObj.rand.nextInt(6) - 3; int k1 = par3 + this.worldObj.rand.nextInt(16) - 8; if (this.theVillage.isInRange(i1, j1, k1) && SpawnerAnimals.canCreatureTypeSpawnAtLocation(EnumCreatureType.monster, this.worldObj, i1, j1, k1)) { this.worldObj.getWorldVec3Pool().getVecFromPool((double)i1, (double)j1, (double)k1); } } return null; }
private Vec3 func_179867_a(BlockPos p_179867_1_) { for (int i = 0; i < 10; ++i) { BlockPos blockpos = p_179867_1_.add(this.worldObj.rand.nextInt(16) - 8, this.worldObj.rand.nextInt(6) - 3, this.worldObj.rand.nextInt(16) - 8); if (this.theVillage.func_179866_a(blockpos) && SpawnerAnimals.canCreatureTypeSpawnAtLocation(EntityLiving.SpawnPlacementType.ON_GROUND, this.worldObj, blockpos)) { return new Vec3((double)blockpos.getX(), (double)blockpos.getY(), (double)blockpos.getZ()); } } return null; }
/** * Populates chunk with ores etc etc */ public void populate(IChunkProvider p_73153_1_, int p_73153_2_, int p_73153_3_) { BlockFalling.fallInstantly = true; int k = p_73153_2_ * 16; int l = p_73153_3_ * 16; BiomeGenBase biomegenbase = this.worldObj.getBiomeGenForCoords(k + 16, l + 16); this.rand.setSeed(this.worldObj.getSeed()); long i1 = this.rand.nextLong() / 2L * 2L + 1L; long j1 = this.rand.nextLong() / 2L * 2L + 1L; this.rand.setSeed((long)p_73153_2_ * i1 + (long)p_73153_3_ * j1 ^ this.worldObj.getSeed()); MinecraftForge.EVENT_BUS.post(new PopulateChunkEvent.Pre(p_73153_1_, worldObj, rand, p_73153_2_, p_73153_3_, false)); int k1; int l1; int i2; if (this.rand.nextInt(4) == 0) { k1 = k + this.rand.nextInt(16) + 8; l1 = this.rand.nextInt(256); i2 = l + this.rand.nextInt(16) + 8; (new WorldGenLakes(Blocks.water)).generate(this.worldObj, this.rand, k1, l1, i2); } if (biomegenbase.theBiomeDecorator.currentWorld == null) biomegenbase.decorate(this.worldObj, this.rand, k, l); if (TerrainGen.populate(p_73153_1_, worldObj, rand, p_73153_2_, p_73153_3_, false, ANIMALS)) { SpawnerAnimals.performWorldGenSpawning(this.worldObj, biomegenbase, k + 8, l + 8, 16, 16, this.rand); } k += 8; l += 8; MinecraftForge.EVENT_BUS.post(new PopulateChunkEvent.Post(p_73153_1_, worldObj, rand, p_73153_2_, p_73153_3_, false)); BlockFalling.fallInstantly = false; }
private Vec3 func_75527_a(int p_75527_1_, int p_75527_2_, int p_75527_3_) { for(int var4 = 0; var4 < 10; ++var4) { int var5 = p_75527_1_ + this.field_75537_a.field_73012_v.nextInt(16) - 8; int var6 = p_75527_2_ + this.field_75537_a.field_73012_v.nextInt(6) - 3; int var7 = p_75527_3_ + this.field_75537_a.field_73012_v.nextInt(16) - 8; if(this.field_75531_f.func_75570_a(var5, var6, var7) && SpawnerAnimals.func_77190_a(EnumCreatureType.monster, this.field_75537_a, var5, var6, var7)) { this.field_75537_a.func_82732_R().func_72345_a((double)var5, (double)var6, (double)var7); } } return null; }
@Override public void populate(IChunkProvider par1IChunkProvider, int par2, int par3) { net.minecraft.block.BlockSand.fallInstantly = true; int var4 = par2 * 16; int var5 = par3 * 16; BiomeGenBase var6 = worldObj.getBiomeGenForCoords(var4 + 16, var5 + 16); rand.setSeed(worldObj.getSeed()); long var7 = rand.nextLong() / 2L * 2L + 1L; long var9 = rand.nextLong() / 2L * 2L + 1L; rand.setSeed(par2 * var7 + par3 * var9 ^ worldObj.getSeed()); boolean var11 = false; if (mapFeaturesEnabled) { mineshaftGenerator.generateStructuresInChunk(worldObj, rand, par2, par3); var11 = villageGenerator.generateStructuresInChunk(worldObj, rand, par2, par3); strongholdGenerator.generateStructuresInChunk(worldObj, rand, par2, par3); scatteredFeatureGenerator.generateStructuresInChunk(worldObj, rand, par2, par3); } if (!var11 && rand.nextInt(4) == 0) { int var12 = var4 + rand.nextInt(16) + 8; int var13 = rand.nextInt(128); int var14 = var5 + rand.nextInt(16) + 8; new WorldGenLakes(Block.waterStill.blockID).generate(worldObj, rand, var12, var13, var14); } var6.decorate(worldObj, rand, var4, var5); SpawnerAnimals.performWorldGenSpawning(worldObj, var6, var4 + 8, var5 + 8, 16, 16, rand); var4 += 8; var5 += 8; net.minecraft.block.BlockSand.fallInstantly = false; }
/** * Populates chunk with ores etc etc */ @Override public void populate(IChunkProvider par1IChunkProvider, int par2, int par3) { BlockFalling.fallInstantly = true; int k = par2 * 16; int l = par3 * 16; BiomeGenBase biomegenbase = this.worldObj.getBiomeGenForCoords(k + 16, l + 16); this.rand.setSeed(this.worldObj.getSeed()); long i1 = this.rand.nextLong() / 2L * 2L + 1L; long j1 = this.rand.nextLong() / 2L * 2L + 1L; this.rand.setSeed((long)par2 * i1 + (long)par3 * j1 ^ this.worldObj.getSeed()); boolean flag = false; MinecraftForge.EVENT_BUS.post(new PopulateChunkEvent.Pre(par1IChunkProvider, worldObj, rand, par2, par3, flag)); //Enable map features ?? if (this.mapFeaturesEnabled) { this.scatteredFeatureGenerator.generateStructuresInChunk(this.worldObj, this.rand, par2, par3); } int k1; int l1; int i2; //Add Lakes ?? if (biomegenbase != BiomeGenBase.desert && biomegenbase != BiomeGenBase.desertHills && !flag && this.rand.nextInt(4) == 0 && TerrainGen.populate(par1IChunkProvider, worldObj, rand, par2, par3, flag, LAKE)) { k1 = k + this.rand.nextInt(16) + 8; l1 = this.rand.nextInt(256); i2 = l + this.rand.nextInt(16) + 8; (new WorldGenLakes(Blocks.water)).generate(this.worldObj, this.rand, k1, l1, i2); } //Add Lakes ?? if (TerrainGen.populate(par1IChunkProvider, worldObj, rand, par2, par3, flag, LAVA) && !flag && this.rand.nextInt(8) == 0) { k1 = k + this.rand.nextInt(16) + 8; l1 = this.rand.nextInt(this.rand.nextInt(248) + 8); i2 = l + this.rand.nextInt(16) + 8; if (l1 < 63 || this.rand.nextInt(10) == 0) { (new WorldGenLakes(Blocks.lava)).generate(this.worldObj, this.rand, k1, l1, i2); } } //Add Dungeons ?? boolean doGen = TerrainGen.populate(par1IChunkProvider, worldObj, rand, par2, par3, flag, DUNGEON); for (k1 = 0; doGen && k1 < 8; ++k1) { l1 = k + this.rand.nextInt(16) + 8; i2 = this.rand.nextInt(256); int j2 = l + this.rand.nextInt(16) + 8; (new WorldGenDungeons()).generate(this.worldObj, this.rand, l1, i2, j2); } //Add Animals ?? biomegenbase.decorate(this.worldObj, this.rand, k, l); if (TerrainGen.populate(par1IChunkProvider, worldObj, rand, par2, par3, flag, ANIMALS)) { SpawnerAnimals.performWorldGenSpawning(this.worldObj, biomegenbase, k + 8, l + 8, 16, 16, this.rand); } k += 8; l += 8; //Creates snow and ice in world. doGen = TerrainGen.populate(par1IChunkProvider, worldObj, rand, par2, par3, flag, ICE); for (k1 = 0; doGen && k1 < 16; ++k1) { for (l1 = 0; l1 < 16; ++l1) { i2 = this.worldObj.getPrecipitationHeight(k + k1, l + l1); if (this.worldObj.isBlockFreezable(k1 + k, i2 - 1, l1 + l)) { this.worldObj.setBlock(k1 + k, i2 - 1, l1 + l, Blocks.ice, 0, 2); } if (this.worldObj.func_147478_e(k1 + k, i2, l1 + l, true)) { this.worldObj.setBlock(k1 + k, i2, l1 + l, Blocks.snow_layer, 0, 2); } } } MinecraftForge.EVENT_BUS.post(new PopulateChunkEvent.Post(par1IChunkProvider, worldObj, rand, par2, par3, flag)); BlockFalling.fallInstantly = false; }
/** * Populates chunk with ores etc etc */ public void populate(IChunkProvider par1IChunkProvider, int par2, int par3) { BlockFalling.fallInstantly = true; int k = par2 * 16; int l = par3 * 16; BiomeGenBase biomegenbase = this.worldObj.getBiomeGenForCoords(new BlockPos(k + 16, 0, l + 16));//warn this.rand.setSeed(this.worldObj.getSeed()); long i1 = this.rand.nextLong() / 2L * 2L + 1L; long j1 = this.rand.nextLong() / 2L * 2L + 1L; this.rand.setSeed((long)par2 * i1 + (long)par3 * j1 ^ this.worldObj.getSeed()); boolean flag = false; MinecraftForge.EVENT_BUS.post(new PopulateChunkEvent.Pre(par1IChunkProvider, worldObj, rand, par2, par3, flag)); int k1; int l1; int i2; if (biomegenbase != BiomeGenBase.desert && biomegenbase != BiomeGenBase.desertHills && !flag && this.rand.nextInt(4) == 0 && TerrainGen.populate(par1IChunkProvider, worldObj, rand, par2, par3, flag, LAKE)) { k1 = k + this.rand.nextInt(16) + 8; l1 = this.rand.nextInt(256); i2 = l + this.rand.nextInt(16) + 8; (new WorldGenLakes(Blocks.redstone_block)).generate(this.worldObj, this.rand, new BlockPos(k1, l1, i2)); } if (TerrainGen.populate(par1IChunkProvider, worldObj, rand, par2, par3, flag, LAVA) && !flag && this.rand.nextInt(8) == 0) { k1 = k + this.rand.nextInt(16) + 8; l1 = this.rand.nextInt(this.rand.nextInt(248) + 8); i2 = l + this.rand.nextInt(16) + 8; if (l1 < 63 || this.rand.nextInt(10) == 0) { (new WorldGenLakes(Blocks.redstone_block)).generate(this.worldObj, this.rand, new BlockPos(k1, l1, i2)); } } biomegenbase.decorate(this.worldObj, this.rand, new BlockPos(k, 0, l)); SpawnerAnimals.performWorldGenSpawning(this.worldObj, biomegenbase, k + 8, l + 8, 16, 16, this.rand); k += 8; l += 8; MinecraftForge.EVENT_BUS.post(new PopulateChunkEvent.Post(par1IChunkProvider, worldObj, rand, par2, par3, flag)); BlockFalling.fallInstantly = false; }
/** * Populates chunk with ores etc etc */ public void populate(IChunkProvider par1IChunkProvider, int par2, int par3) { BlockFalling.fallInstantly = true; int k = par2 * 16; int l = par3 * 16; BiomeGenBase biomegenbase = this.worldObj.getBiomeGenForCoords(new BlockPos(k + 16, 0, l + 16));// warn this.rand.setSeed(this.worldObj.getSeed()); long i1 = this.rand.nextLong() / 2L * 2L + 1L; long j1 = this.rand.nextLong() / 2L * 2L + 1L; this.rand.setSeed((long) par2 * i1 + (long) par3 * j1 ^ this.worldObj.getSeed()); boolean flag = false; MinecraftForge.EVENT_BUS .post(new PopulateChunkEvent.Pre(par1IChunkProvider, worldObj, rand, par2, par3, flag)); int k1; int l1; int i2; if (biomegenbase != BiomeGenBase.desert && biomegenbase != BiomeGenBase.desertHills && !flag && this.rand.nextInt(4) == 0 && TerrainGen.populate(par1IChunkProvider, worldObj, rand, par2, par3, flag, LAKE)) { k1 = k + this.rand.nextInt(16) + 8; l1 = this.rand.nextInt(256); i2 = l + this.rand.nextInt(16) + 8; (new WorldGenLakes(Blocks.emerald_block)).generate(this.worldObj, this.rand, new BlockPos(k1, l1, i2)); } if (TerrainGen.populate(par1IChunkProvider, worldObj, rand, par2, par3, flag, LAVA) && !flag && this.rand.nextInt(8) == 0) { k1 = k + this.rand.nextInt(16) + 8; l1 = this.rand.nextInt(this.rand.nextInt(248) + 8); i2 = l + this.rand.nextInt(16) + 8; if (l1 < 63 || this.rand.nextInt(10) == 0) { (new WorldGenLakes(Blocks.emerald_block)).generate(this.worldObj, this.rand, new BlockPos(k1, l1, i2)); } } biomegenbase.decorate(this.worldObj, this.rand, new BlockPos(k, 0, l)); SpawnerAnimals.performWorldGenSpawning(this.worldObj, biomegenbase, k + 8, l + 8, 16, 16, this.rand); k += 8; l += 8; MinecraftForge.EVENT_BUS .post(new PopulateChunkEvent.Post(par1IChunkProvider, worldObj, rand, par2, par3, flag)); BlockFalling.fallInstantly = false; }
/** * Populates chunk with ores etc etc */ public void populate(IChunkProvider par1IChunkProvider, int par2, int par3) { BlockFalling.fallInstantly = true; int k = par2 * 16; int l = par3 * 16; BiomeGenBase biomegenbase = this.worldObj.getBiomeGenForCoords(new BlockPos(k + 16, 0, l + 16));// warn this.rand.setSeed(this.worldObj.getSeed()); long i1 = this.rand.nextLong() / 2L * 2L + 1L; long j1 = this.rand.nextLong() / 2L * 2L + 1L; this.rand.setSeed((long) par2 * i1 + (long) par3 * j1 ^ this.worldObj.getSeed()); boolean flag = false; MinecraftForge.EVENT_BUS .post(new PopulateChunkEvent.Pre(par1IChunkProvider, worldObj, rand, par2, par3, flag)); int k1; int l1; int i2; if (biomegenbase != BiomeGenBase.desert && biomegenbase != BiomeGenBase.desertHills && !flag && this.rand.nextInt(4) == 0 && TerrainGen.populate(par1IChunkProvider, worldObj, rand, par2, par3, flag, LAKE)) { k1 = k + this.rand.nextInt(16) + 8; l1 = this.rand.nextInt(256); i2 = l + this.rand.nextInt(16) + 8; (new WorldGenLakes(Blocks.quartz_block)).generate(this.worldObj, this.rand, new BlockPos(k1, l1, i2)); } if (TerrainGen.populate(par1IChunkProvider, worldObj, rand, par2, par3, flag, LAVA) && !flag && this.rand.nextInt(8) == 0) { k1 = k + this.rand.nextInt(16) + 8; l1 = this.rand.nextInt(this.rand.nextInt(248) + 8); i2 = l + this.rand.nextInt(16) + 8; if (l1 < 63 || this.rand.nextInt(10) == 0) { (new WorldGenLakes(Blocks.quartz_block)).generate(this.worldObj, this.rand, new BlockPos(k1, l1, i2)); } } biomegenbase.decorate(this.worldObj, this.rand, new BlockPos(k, 0, l)); SpawnerAnimals.performWorldGenSpawning(this.worldObj, biomegenbase, k + 8, l + 8, 16, 16, this.rand); k += 8; l += 8; MinecraftForge.EVENT_BUS .post(new PopulateChunkEvent.Post(par1IChunkProvider, worldObj, rand, par2, par3, flag)); BlockFalling.fallInstantly = false; }
/** * Populates chunk with ores etc etc */ public void populate(IChunkProvider par1IChunkProvider, int par2, int par3) { BlockFalling.fallInstantly = true; int k = par2 * 16; int l = par3 * 16; BiomeGenBase biomegenbase = this.worldObj.getBiomeGenForCoords(new BlockPos(k + 16, 0, l + 16));// warn this.rand.setSeed(this.worldObj.getSeed()); long i1 = this.rand.nextLong() / 2L * 2L + 1L; long j1 = this.rand.nextLong() / 2L * 2L + 1L; this.rand.setSeed((long) par2 * i1 + (long) par3 * j1 ^ this.worldObj.getSeed()); boolean flag = false; MinecraftForge.EVENT_BUS .post(new PopulateChunkEvent.Pre(par1IChunkProvider, worldObj, rand, par2, par3, flag)); int k1; int l1; int i2; if (biomegenbase != BiomeGenBase.desert && biomegenbase != BiomeGenBase.desertHills && !flag && this.rand.nextInt(4) == 0 && TerrainGen.populate(par1IChunkProvider, worldObj, rand, par2, par3, flag, LAKE)) { k1 = k + this.rand.nextInt(16) + 8; l1 = this.rand.nextInt(256); i2 = l + this.rand.nextInt(16) + 8; (new WorldGenLakes(Blocks.ice)).generate(this.worldObj, this.rand, new BlockPos(k1, l1, i2)); } if (TerrainGen.populate(par1IChunkProvider, worldObj, rand, par2, par3, flag, LAVA) && !flag && this.rand.nextInt(8) == 0) { k1 = k + this.rand.nextInt(16) + 8; l1 = this.rand.nextInt(this.rand.nextInt(248) + 8); i2 = l + this.rand.nextInt(16) + 8; if (l1 < 63 || this.rand.nextInt(10) == 0) { (new WorldGenLakes(Blocks.ice)).generate(this.worldObj, this.rand, new BlockPos(k1, l1, i2)); } } biomegenbase.decorate(this.worldObj, this.rand, new BlockPos(k, 0, l)); SpawnerAnimals.performWorldGenSpawning(this.worldObj, biomegenbase, k + 8, l + 8, 16, 16, this.rand); k += 8; l += 8; MinecraftForge.EVENT_BUS .post(new PopulateChunkEvent.Post(par1IChunkProvider, worldObj, rand, par2, par3, flag)); BlockFalling.fallInstantly = false; }
/** * Populates chunk with ores etc etc */ public void populate(IChunkProvider par1IChunkProvider, int par2, int par3) { BlockFalling.fallInstantly = true; int k = par2 * 16; int l = par3 * 16; BiomeGenBase biomegenbase = this.worldObj.getBiomeGenForCoords(new BlockPos(k + 16, 0, l + 16));// warn this.rand.setSeed(this.worldObj.getSeed()); long i1 = this.rand.nextLong() / 2L * 2L + 1L; long j1 = this.rand.nextLong() / 2L * 2L + 1L; this.rand.setSeed((long) par2 * i1 + (long) par3 * j1 ^ this.worldObj.getSeed()); boolean flag = false; MinecraftForge.EVENT_BUS .post(new PopulateChunkEvent.Pre(par1IChunkProvider, worldObj, rand, par2, par3, flag)); int k1; int l1; int i2; if (biomegenbase != BiomeGenBase.desert && biomegenbase != BiomeGenBase.desertHills && !flag && this.rand.nextInt(4) == 0 && TerrainGen.populate(par1IChunkProvider, worldObj, rand, par2, par3, flag, LAKE)) { k1 = k + this.rand.nextInt(16) + 8; l1 = this.rand.nextInt(256); i2 = l + this.rand.nextInt(16) + 8; (new WorldGenLakes(Blocks.iron_block)).generate(this.worldObj, this.rand, new BlockPos(k1, l1, i2)); } if (TerrainGen.populate(par1IChunkProvider, worldObj, rand, par2, par3, flag, LAVA) && !flag && this.rand.nextInt(8) == 0) { k1 = k + this.rand.nextInt(16) + 8; l1 = this.rand.nextInt(this.rand.nextInt(248) + 8); i2 = l + this.rand.nextInt(16) + 8; if (l1 < 63 || this.rand.nextInt(10) == 0) { (new WorldGenLakes(Blocks.iron_block)).generate(this.worldObj, this.rand, new BlockPos(k1, l1, i2)); } } biomegenbase.decorate(this.worldObj, this.rand, new BlockPos(k, 0, l)); SpawnerAnimals.performWorldGenSpawning(this.worldObj, biomegenbase, k + 8, l + 8, 16, 16, this.rand); k += 8; l += 8; MinecraftForge.EVENT_BUS .post(new PopulateChunkEvent.Post(par1IChunkProvider, worldObj, rand, par2, par3, flag)); BlockFalling.fallInstantly = false; }
/** * Populates chunk with ores etc etc */ public void populate(IChunkProvider par1IChunkProvider, int par2, int par3) { BlockFalling.fallInstantly = true; int k = par2 * 16; int l = par3 * 16; BiomeGenBase biomegenbase = this.worldObj.getBiomeGenForCoords(new BlockPos(k + 16, 0, l + 16));// warn this.rand.setSeed(this.worldObj.getSeed()); long i1 = this.rand.nextLong() / 2L * 2L + 1L; long j1 = this.rand.nextLong() / 2L * 2L + 1L; this.rand.setSeed((long) par2 * i1 + (long) par3 * j1 ^ this.worldObj.getSeed()); boolean flag = false; MinecraftForge.EVENT_BUS .post(new PopulateChunkEvent.Pre(par1IChunkProvider, worldObj, rand, par2, par3, flag)); int k1; int l1; int i2; if (biomegenbase != BiomeGenBase.desert && biomegenbase != BiomeGenBase.desertHills && !flag && this.rand.nextInt(4) == 0 && TerrainGen.populate(par1IChunkProvider, worldObj, rand, par2, par3, flag, LAKE)) { k1 = k + this.rand.nextInt(16) + 8; l1 = this.rand.nextInt(256); i2 = l + this.rand.nextInt(16) + 8; (new WorldGenLakes(Blocks.lava)).generate(this.worldObj, this.rand, new BlockPos(k1, l1, i2)); } if (TerrainGen.populate(par1IChunkProvider, worldObj, rand, par2, par3, flag, LAVA) && !flag && this.rand.nextInt(8) == 0) { k1 = k + this.rand.nextInt(16) + 8; l1 = this.rand.nextInt(this.rand.nextInt(248) + 8); i2 = l + this.rand.nextInt(16) + 8; if (l1 < 63 || this.rand.nextInt(10) == 0) { (new WorldGenLakes(Blocks.lava)).generate(this.worldObj, this.rand, new BlockPos(k1, l1, i2)); } } biomegenbase.decorate(this.worldObj, this.rand, new BlockPos(k, 0, l)); SpawnerAnimals.performWorldGenSpawning(this.worldObj, biomegenbase, k + 8, l + 8, 16, 16, this.rand); k += 8; l += 8; MinecraftForge.EVENT_BUS .post(new PopulateChunkEvent.Post(par1IChunkProvider, worldObj, rand, par2, par3, flag)); BlockFalling.fallInstantly = false; }
/** * Populates chunk with ores etc etc */ public void populate(IChunkProvider par1IChunkProvider, int par2, int par3) { BlockFalling.fallInstantly = true; int k = par2 * 16; int l = par3 * 16; BiomeGenBase biomegenbase = this.worldObj.getBiomeGenForCoords(new BlockPos(k + 16, 0, l + 16));// warn this.rand.setSeed(this.worldObj.getSeed()); long i1 = this.rand.nextLong() / 2L * 2L + 1L; long j1 = this.rand.nextLong() / 2L * 2L + 1L; this.rand.setSeed((long) par2 * i1 + (long) par3 * j1 ^ this.worldObj.getSeed()); boolean flag = false; MinecraftForge.EVENT_BUS .post(new PopulateChunkEvent.Pre(par1IChunkProvider, worldObj, rand, par2, par3, flag)); int k1; int l1; int i2; if (biomegenbase != BiomeGenBase.desert && biomegenbase != BiomeGenBase.desertHills && !flag && this.rand.nextInt(4) == 0 && TerrainGen.populate(par1IChunkProvider, worldObj, rand, par2, par3, flag, LAKE)) { k1 = k + this.rand.nextInt(16) + 8; l1 = this.rand.nextInt(256); i2 = l + this.rand.nextInt(16) + 8; (new WorldGenLakes(Blocks.lapis_block)).generate(this.worldObj, this.rand, new BlockPos(k1, l1, i2)); } if (TerrainGen.populate(par1IChunkProvider, worldObj, rand, par2, par3, flag, LAVA) && !flag && this.rand.nextInt(8) == 0) { k1 = k + this.rand.nextInt(16) + 8; l1 = this.rand.nextInt(this.rand.nextInt(248) + 8); i2 = l + this.rand.nextInt(16) + 8; if (l1 < 63 || this.rand.nextInt(10) == 0) { (new WorldGenLakes(Blocks.lapis_block)).generate(this.worldObj, this.rand, new BlockPos(k1, l1, i2)); } } biomegenbase.decorate(this.worldObj, this.rand, new BlockPos(k, 0, l)); SpawnerAnimals.performWorldGenSpawning(this.worldObj, biomegenbase, k + 8, l + 8, 16, 16, this.rand); k += 8; l += 8; MinecraftForge.EVENT_BUS .post(new PopulateChunkEvent.Post(par1IChunkProvider, worldObj, rand, par2, par3, flag)); BlockFalling.fallInstantly = false; }
/** * Populates chunk with ores etc etc */ public void populate(IChunkProvider par1IChunkProvider, int par2, int par3) { BlockFalling.fallInstantly = true; int k = par2 * 16; int l = par3 * 16; BiomeGenBase biomegenbase = this.worldObj.getBiomeGenForCoords(new BlockPos(k + 16, 0, l + 16));// warn this.rand.setSeed(this.worldObj.getSeed()); long i1 = this.rand.nextLong() / 2L * 2L + 1L; long j1 = this.rand.nextLong() / 2L * 2L + 1L; this.rand.setSeed((long) par2 * i1 + (long) par3 * j1 ^ this.worldObj.getSeed()); boolean flag = false; MinecraftForge.EVENT_BUS .post(new PopulateChunkEvent.Pre(par1IChunkProvider, worldObj, rand, par2, par3, flag)); int k1; int l1; int i2; if (biomegenbase != BiomeGenBase.desert && biomegenbase != BiomeGenBase.desertHills && !flag && this.rand.nextInt(4) == 0 && TerrainGen.populate(par1IChunkProvider, worldObj, rand, par2, par3, flag, LAKE)) { k1 = k + this.rand.nextInt(16) + 8; l1 = this.rand.nextInt(256); i2 = l + this.rand.nextInt(16) + 8; (new WorldGenLakes(Blocks.gold_block)).generate(this.worldObj, this.rand, new BlockPos(k1, l1, i2)); } if (TerrainGen.populate(par1IChunkProvider, worldObj, rand, par2, par3, flag, LAVA) && !flag && this.rand.nextInt(8) == 0) { k1 = k + this.rand.nextInt(16) + 8; l1 = this.rand.nextInt(this.rand.nextInt(248) + 8); i2 = l + this.rand.nextInt(16) + 8; if (l1 < 63 || this.rand.nextInt(10) == 0) { (new WorldGenLakes(Blocks.gold_block)).generate(this.worldObj, this.rand, new BlockPos(k1, l1, i2)); } } biomegenbase.decorate(this.worldObj, this.rand, new BlockPos(k, 0, l)); SpawnerAnimals.performWorldGenSpawning(this.worldObj, biomegenbase, k + 8, l + 8, 16, 16, this.rand); k += 8; l += 8; MinecraftForge.EVENT_BUS .post(new PopulateChunkEvent.Post(par1IChunkProvider, worldObj, rand, par2, par3, flag)); BlockFalling.fallInstantly = false; }
/** * Populates chunk with ores etc etc */ public void populate(IChunkProvider par1IChunkProvider, int par2, int par3) { BlockFalling.fallInstantly = true; int k = par2 * 16; int l = par3 * 16; BiomeGenBase biomegenbase = this.worldObj.getBiomeGenForCoords(new BlockPos(k + 16, 0, l + 16));// warn this.rand.setSeed(this.worldObj.getSeed()); long i1 = this.rand.nextLong() / 2L * 2L + 1L; long j1 = this.rand.nextLong() / 2L * 2L + 1L; this.rand.setSeed((long) par2 * i1 + (long) par3 * j1 ^ this.worldObj.getSeed()); boolean flag = false; MinecraftForge.EVENT_BUS .post(new PopulateChunkEvent.Pre(par1IChunkProvider, worldObj, rand, par2, par3, flag)); int k1; int l1; int i2; if (biomegenbase != BiomeGenBase.desert && biomegenbase != BiomeGenBase.desertHills && !flag && this.rand.nextInt(4) == 0 && TerrainGen.populate(par1IChunkProvider, worldObj, rand, par2, par3, flag, LAKE)) { k1 = k + this.rand.nextInt(16) + 8; l1 = this.rand.nextInt(256); i2 = l + this.rand.nextInt(16) + 8; (new WorldGenLakes(Blocks.glass)).generate(this.worldObj, this.rand, new BlockPos(k1, l1, i2)); } if (TerrainGen.populate(par1IChunkProvider, worldObj, rand, par2, par3, flag, LAVA) && !flag && this.rand.nextInt(8) == 0) { k1 = k + this.rand.nextInt(16) + 8; l1 = this.rand.nextInt(this.rand.nextInt(248) + 8); i2 = l + this.rand.nextInt(16) + 8; if (l1 < 63 || this.rand.nextInt(10) == 0) { (new WorldGenLakes(Blocks.glass)).generate(this.worldObj, this.rand, new BlockPos(k1, l1, i2)); } } biomegenbase.decorate(this.worldObj, this.rand, new BlockPos(k, 0, l)); SpawnerAnimals.performWorldGenSpawning(this.worldObj, biomegenbase, k + 8, l + 8, 16, 16, this.rand); k += 8; l += 8; MinecraftForge.EVENT_BUS .post(new PopulateChunkEvent.Post(par1IChunkProvider, worldObj, rand, par2, par3, flag)); BlockFalling.fallInstantly = false; }
/** * Populates chunk with ores etc etc */ public void populate(IChunkProvider par1IChunkProvider, int par2, int par3) { BlockFalling.fallInstantly = true; int k = par2 * 16; int l = par3 * 16; BiomeGenBase biomegenbase = this.worldObj.getBiomeGenForCoords(new BlockPos(k + 16, 0, l + 16));// warn this.rand.setSeed(this.worldObj.getSeed()); long i1 = this.rand.nextLong() / 2L * 2L + 1L; long j1 = this.rand.nextLong() / 2L * 2L + 1L; this.rand.setSeed((long) par2 * i1 + (long) par3 * j1 ^ this.worldObj.getSeed()); boolean flag = false; MinecraftForge.EVENT_BUS .post(new PopulateChunkEvent.Pre(par1IChunkProvider, worldObj, rand, par2, par3, flag)); int k1; int l1; int i2; if (biomegenbase != BiomeGenBase.desert && biomegenbase != BiomeGenBase.desertHills && !flag && this.rand.nextInt(4) == 0 && TerrainGen.populate(par1IChunkProvider, worldObj, rand, par2, par3, flag, LAKE)) { k1 = k + this.rand.nextInt(16) + 8; l1 = this.rand.nextInt(256); i2 = l + this.rand.nextInt(16) + 8; (new WorldGenLakes(Blocks.log)).generate(this.worldObj, this.rand, new BlockPos(k1, l1, i2)); } if (TerrainGen.populate(par1IChunkProvider, worldObj, rand, par2, par3, flag, LAVA) && !flag && this.rand.nextInt(8) == 0) { k1 = k + this.rand.nextInt(16) + 8; l1 = this.rand.nextInt(this.rand.nextInt(248) + 8); i2 = l + this.rand.nextInt(16) + 8; if (l1 < 63 || this.rand.nextInt(10) == 0) { (new WorldGenLakes(Blocks.log)).generate(this.worldObj, this.rand, new BlockPos(k1, l1, i2)); } } biomegenbase.decorate(this.worldObj, this.rand, new BlockPos(k, 0, l)); SpawnerAnimals.performWorldGenSpawning(this.worldObj, biomegenbase, k + 8, l + 8, 16, 16, this.rand); k += 8; l += 8; MinecraftForge.EVENT_BUS .post(new PopulateChunkEvent.Post(par1IChunkProvider, worldObj, rand, par2, par3, flag)); BlockFalling.fallInstantly = false; }
/** * Populates chunk with ores etc etc */ public void populate(IChunkProvider par1IChunkProvider, int par2, int par3) { BlockFalling.fallInstantly = true; int k = par2 * 16; int l = par3 * 16; BiomeGenBase biomegenbase = this.worldObj.getBiomeGenForCoords(new BlockPos(k + 16, 0, l + 16));// warn this.rand.setSeed(this.worldObj.getSeed()); long i1 = this.rand.nextLong() / 2L * 2L + 1L; long j1 = this.rand.nextLong() / 2L * 2L + 1L; this.rand.setSeed((long) par2 * i1 + (long) par3 * j1 ^ this.worldObj.getSeed()); boolean flag = false; MinecraftForge.EVENT_BUS .post(new PopulateChunkEvent.Pre(par1IChunkProvider, worldObj, rand, par2, par3, flag)); int k1; int l1; int i2; if (biomegenbase != BiomeGenBase.desert && biomegenbase != BiomeGenBase.desertHills && !flag && this.rand.nextInt(4) == 0 && TerrainGen.populate(par1IChunkProvider, worldObj, rand, par2, par3, flag, LAKE)) { k1 = k + this.rand.nextInt(16) + 8; l1 = this.rand.nextInt(256); i2 = l + this.rand.nextInt(16) + 8; (new WorldGenLakes(Blocks.diamond_block)).generate(this.worldObj, this.rand, new BlockPos(k1, l1, i2)); } if (TerrainGen.populate(par1IChunkProvider, worldObj, rand, par2, par3, flag, LAVA) && !flag && this.rand.nextInt(8) == 0) { k1 = k + this.rand.nextInt(16) + 8; l1 = this.rand.nextInt(this.rand.nextInt(248) + 8); i2 = l + this.rand.nextInt(16) + 8; if (l1 < 63 || this.rand.nextInt(10) == 0) { (new WorldGenLakes(Blocks.diamond_block)).generate(this.worldObj, this.rand, new BlockPos(k1, l1, i2)); } } biomegenbase.decorate(this.worldObj, this.rand, new BlockPos(k, 0, l)); SpawnerAnimals.performWorldGenSpawning(this.worldObj, biomegenbase, k + 8, l + 8, 16, 16, this.rand); k += 8; l += 8; MinecraftForge.EVENT_BUS .post(new PopulateChunkEvent.Post(par1IChunkProvider, worldObj, rand, par2, par3, flag)); BlockFalling.fallInstantly = false; }
/** * Populates chunk with ores etc etc */ public void populate(IChunkProvider par1IChunkProvider, int par2, int par3) { BlockFalling.field_149832_M = true; int var4 = par2 * 16; int var5 = par3 * 16; BiomeGenBase var6 = this.worldObj.getBiomeGenForCoords(var4 + 16, var5 + 16); this.rand.setSeed(this.worldObj.getSeed()); long var7 = this.rand.nextLong() / 2L * 2L + 1L; long var9 = this.rand.nextLong() / 2L * 2L + 1L; this.rand.setSeed((long)par2 * var7 + (long)par3 * var9 ^ this.worldObj.getSeed()); boolean var11 = false; if (this.mapFeaturesEnabled) { this.mineshaftGenerator.generateStructuresInChunk(this.worldObj, this.rand, par2, par3); var11 = this.villageGenerator.generateStructuresInChunk(this.worldObj, this.rand, par2, par3); this.strongholdGenerator.generateStructuresInChunk(this.worldObj, this.rand, par2, par3); this.scatteredFeatureGenerator.generateStructuresInChunk(this.worldObj, this.rand, par2, par3); } int var12; int var13; int var14; if (var6 != BiomeGenBase.desert && var6 != BiomeGenBase.desertHills && !var11 && this.rand.nextInt(4) == 0) { var12 = var4 + this.rand.nextInt(16) + 8; var13 = this.rand.nextInt(256); var14 = var5 + this.rand.nextInt(16) + 8; (new WorldGenLakes(Blocks.water)).generate(this.worldObj, this.rand, var12, var13, var14); } if (!var11 && this.rand.nextInt(8) == 0) { var12 = var4 + this.rand.nextInt(16) + 8; var13 = this.rand.nextInt(this.rand.nextInt(248) + 8); var14 = var5 + this.rand.nextInt(16) + 8; if (var13 < 63 || this.rand.nextInt(10) == 0) { (new WorldGenLakes(Blocks.lava)).generate(this.worldObj, this.rand, var12, var13, var14); } } for (var12 = 0; var12 < 8; ++var12) { var13 = var4 + this.rand.nextInt(16) + 8; var14 = this.rand.nextInt(256); int var15 = var5 + this.rand.nextInt(16) + 8; (new WorldGenDungeons()).generate(this.worldObj, this.rand, var13, var14, var15); } var6.decorate(this.worldObj, this.rand, var4, var5); SpawnerAnimals.performWorldGenSpawning(this.worldObj, var6, var4 + 8, var5 + 8, 16, 16, this.rand); var4 += 8; var5 += 8; for (var12 = 0; var12 < 16; ++var12) { for (var13 = 0; var13 < 16; ++var13) { var14 = this.worldObj.getPrecipitationHeight(var4 + var12, var5 + var13); if (this.worldObj.isBlockFreezable(var12 + var4, var14 - 1, var13 + var5)) { this.worldObj.setBlock(var12 + var4, var14 - 1, var13 + var5, Blocks.ice, 0, 2); } if (this.worldObj.func_147478_e(var12 + var4, var14, var13 + var5, true)) { this.worldObj.setBlock(var12 + var4, var14, var13 + var5, Blocks.snow_layer, 0, 2); } } } BlockFalling.field_149832_M = false; }
/** * Populates chunk with ores etc etc */ public void populate(IChunkProvider p_73153_1_, int p_73153_2_, int p_73153_3_) { BlockFalling.fallInstantly = true; int k = p_73153_2_ * 16; int l = p_73153_3_ * 16; BiomeGenBase biomegenbase = this.worldObj.getBiomeGenForCoords(k + 16, l + 16); this.rand.setSeed(this.worldObj.getSeed()); long i1 = this.rand.nextLong() / 2L * 2L + 1L; long j1 = this.rand.nextLong() / 2L * 2L + 1L; this.rand.setSeed((long)p_73153_2_ * i1 + (long)p_73153_3_ * j1 ^ this.worldObj.getSeed()); boolean flag = false; //TODO: add registry for planets boolean populationFlag = ((WorldProviderPlanet)worldObj.provider).getDimensionProperties(k, l).hasRivers(); if(populationFlag ) MinecraftForge.EVENT_BUS.post(new PopulateChunkEvent.Pre(p_73153_1_, worldObj, rand, p_73153_2_, p_73153_3_, flag)); if (this.mapFeaturesEnabled) { //TODO: maybe features } biomegenbase.decorate(this.worldObj, this.rand, k, l); if (TerrainGen.populate(p_73153_1_, worldObj, rand, p_73153_2_, p_73153_3_, flag, ANIMALS)) { SpawnerAnimals.performWorldGenSpawning(this.worldObj, biomegenbase, k + 8, l + 8, 16, 16, this.rand); } k += 8; l += 8; //If a planet is terraformed chenge upper blocks if(zmaster587.advancedRocketry.api.Configuration.allowTerraforming && worldObj.provider.getClass() == WorldProviderPlanet.class) { if(DimensionManager.getInstance().getDimensionProperties(worldObj.provider.dimensionId).isTerraformed()) { Chunk chunk = worldObj.getChunkFromChunkCoords(p_73153_2_, p_73153_3_); PlanetEventHandler.modifyChunk(worldObj, (WorldProviderPlanet)worldObj.provider, chunk); } } if (populationFlag) MinecraftForge.EVENT_BUS.post(new PopulateChunkEvent.Post(p_73153_1_, worldObj, rand, p_73153_2_, p_73153_3_, flag)); OreGenProperties oreGenProperties = DimensionManager.getInstance().getDimensionProperties(this.worldObj.provider.dimensionId).getOreGenProperties(this.worldObj); if(oreGenProperties != null) { for(OreEntry entry : oreGenProperties.getOreEntries()) { new CustomizableOreGen(entry).generate(rand, p_73153_2_, p_73153_3_, this.worldObj, this, this.worldObj.getChunkProvider()); } } BlockFalling.fallInstantly = false; }
/** * Populates chunk with ores etc etc */ public void populate(IChunkProvider par1IChunkProvider, int par2, int par3) { BlockFalling.fallInstantly = true; int k = par2 * 16; int l = par3 * 16; BiomeGenBase biomegenbase = this.worldObj.getBiomeGenForCoords(k + 16, l + 16); this.rand.setSeed(this.worldObj.getSeed()); long i1 = this.rand.nextLong() / 2L * 2L + 1L; long j1 = this.rand.nextLong() / 2L * 2L + 1L; this.rand.setSeed((long) par2 * i1 + (long) par3 * j1 ^ this.worldObj.getSeed()); boolean flag = false; MinecraftForge.EVENT_BUS.post(new PopulateChunkEvent.Pre(par1IChunkProvider, worldObj, rand, par2, par3, flag)); if (this.mapFeaturesEnabled) { this.mineshaftGenerator.generateStructuresInChunk(this.worldObj, this.rand, par2, par3); flag = this.villageGenerator.generateStructuresInChunk(this.worldObj, this.rand, par2, par3); this.strongholdGenerator.generateStructuresInChunk(this.worldObj, this.rand, par2, par3); this.scatteredFeatureGenerator.generateStructuresInChunk(this.worldObj, this.rand, par2, par3); } int k1; int l1; int i2; if (biomegenbase != BiomeGenBase.desert && biomegenbase != BiomeGenBase.desertHills && !flag && this.rand.nextInt(4) == 0 && TerrainGen.populate(par1IChunkProvider, worldObj, rand, par2, par3, flag, LAKE)) { k1 = k + this.rand.nextInt(16) + 8; l1 = this.rand.nextInt(256); i2 = l + this.rand.nextInt(16) + 8; (new WorldGenLakesTDE(Blocks.water)).generate(this.worldObj, this.rand, k1, l1, i2); } if (TerrainGen.populate(par1IChunkProvider, worldObj, rand, par2, par3, flag, LAVA) && !flag && this.rand.nextInt(8) == 0) { k1 = k + this.rand.nextInt(16) + 8; l1 = this.rand.nextInt(this.rand.nextInt(248) + 8); i2 = l + this.rand.nextInt(16) + 8; if (l1 < 63 || this.rand.nextInt(10) == 0) { (new WorldGenLakesTDE(Blocks.lava)).generate(this.worldObj, this.rand, k1, l1, i2); } } boolean doGen = TerrainGen.populate(par1IChunkProvider, worldObj, rand, par2, par3, flag, DUNGEON); for (k1 = 0; doGen && k1 < 8; ++k1) { l1 = k + this.rand.nextInt(16) + 8; i2 = this.rand.nextInt(256); int j2 = l + this.rand.nextInt(16) + 8; (new WorldGenDungeons()).generate(this.worldObj, this.rand, l1, i2, j2); } biomegenbase.decorate(this.worldObj, this.rand, k, l); if (TerrainGen.populate(par1IChunkProvider, worldObj, rand, par2, par3, flag, ANIMALS)) { SpawnerAnimals.performWorldGenSpawning(this.worldObj, biomegenbase, k + 8, l + 8, 16, 16, this.rand); } k += 8; l += 8; doGen = TerrainGen.populate(par1IChunkProvider, worldObj, rand, par2, par3, flag, ICE); for (k1 = 0; doGen && k1 < 16; ++k1) { for (l1 = 0; l1 < 16; ++l1) { i2 = this.worldObj.getPrecipitationHeight(k + k1, l + l1); if (this.worldObj.isBlockFreezable(k1 + k, i2 - 1, l1 + l)) { this.worldObj.setBlock(k1 + k, i2 - 1, l1 + l, Blocks.ice, 0, 2); } if (this.worldObj.func_147478_e(k1 + k, i2, l1 + l, true)) { this.worldObj.setBlock(k1 + k, i2, l1 + l, Blocks.snow_layer, 0, 2); } } } MinecraftForge.EVENT_BUS.post(new PopulateChunkEvent.Post(par1IChunkProvider, worldObj, rand, par2, par3, flag)); BlockFalling.fallInstantly = false; }
public void func_73153_a(IChunkProvider p_73153_1_, int p_73153_2_, int p_73153_3_) { BlockSand.field_72192_a = true; int var4 = p_73153_2_ * 16; int var5 = p_73153_3_ * 16; BiomeGenBase var6 = this.field_73230_p.func_72807_a(var4 + 16, var5 + 16); this.field_73220_k.setSeed(this.field_73230_p.func_72905_C()); long var7 = this.field_73220_k.nextLong() / 2L * 2L + 1L; long var9 = this.field_73220_k.nextLong() / 2L * 2L + 1L; this.field_73220_k.setSeed((long)p_73153_2_ * var7 + (long)p_73153_3_ * var9 ^ this.field_73230_p.func_72905_C()); boolean var11 = false; if(this.field_73229_q) { this.field_73223_w.func_75051_a(this.field_73230_p, this.field_73220_k, p_73153_2_, p_73153_3_); var11 = this.field_73224_v.func_75051_a(this.field_73230_p, this.field_73220_k, p_73153_2_, p_73153_3_); this.field_73225_u.func_75051_a(this.field_73230_p, this.field_73220_k, p_73153_2_, p_73153_3_); this.field_73233_x.func_75051_a(this.field_73230_p, this.field_73220_k, p_73153_2_, p_73153_3_); } int var12; int var13; int var14; if(var6 != BiomeGenBase.field_76769_d && var6 != BiomeGenBase.field_76786_s && !var11 && this.field_73220_k.nextInt(4) == 0) { var12 = var4 + this.field_73220_k.nextInt(16) + 8; var13 = this.field_73220_k.nextInt(128); var14 = var5 + this.field_73220_k.nextInt(16) + 8; (new WorldGenLakes(Block.field_71943_B.field_71990_ca)).func_76484_a(this.field_73230_p, this.field_73220_k, var12, var13, var14); } if(!var11 && this.field_73220_k.nextInt(8) == 0) { var12 = var4 + this.field_73220_k.nextInt(16) + 8; var13 = this.field_73220_k.nextInt(this.field_73220_k.nextInt(120) + 8); var14 = var5 + this.field_73220_k.nextInt(16) + 8; if(var13 < 63 || this.field_73220_k.nextInt(10) == 0) { (new WorldGenLakes(Block.field_71938_D.field_71990_ca)).func_76484_a(this.field_73230_p, this.field_73220_k, var12, var13, var14); } } for(var12 = 0; var12 < 8; ++var12) { var13 = var4 + this.field_73220_k.nextInt(16) + 8; var14 = this.field_73220_k.nextInt(128); int var15 = var5 + this.field_73220_k.nextInt(16) + 8; (new WorldGenDungeons()).func_76484_a(this.field_73230_p, this.field_73220_k, var13, var14, var15); } var6.func_76728_a(this.field_73230_p, this.field_73220_k, var4, var5); SpawnerAnimals.func_77191_a(this.field_73230_p, var6, var4 + 8, var5 + 8, 16, 16, this.field_73220_k); var4 += 8; var5 += 8; for(var12 = 0; var12 < 16; ++var12) { for(var13 = 0; var13 < 16; ++var13) { var14 = this.field_73230_p.func_72874_g(var4 + var12, var5 + var13); if(this.field_73230_p.func_72884_u(var12 + var4, var14 - 1, var13 + var5)) { this.field_73230_p.func_72832_d(var12 + var4, var14 - 1, var13 + var5, Block.field_72036_aT.field_71990_ca, 0, 2); } if(this.field_73230_p.func_72858_w(var12 + var4, var14, var13 + var5)) { this.field_73230_p.func_72832_d(var12 + var4, var14, var13 + var5, Block.field_72037_aS.field_71990_ca, 0, 2); } } } BlockSand.field_72192_a = false; }
@Override public void populate(IChunkProvider chunkProvider, int chunkX, int chunkZ) { BlockFalling.fallInstantly = true; int x = chunkX * 16; int z = chunkZ * 16; BiomeGenBase biome = world.getBiomeGenForCoords(x + 16, z + 16); random.setSeed(world.getSeed()); long randLong1 = random.nextLong() / 2L * 2L + 1L; long randLong2 = random.nextLong() / 2L * 2L + 1L; random.setSeed((long) chunkX * randLong1 + (long) chunkZ * randLong2 ^ world.getSeed()); boolean flag = false; MinecraftForge.EVENT_BUS.post(new PopulateChunkEvent.Pre(chunkProvider, world, random, chunkX, chunkZ, flag)); if(mapFeaturesEnabled) { populateMapGenerators(chunkProvider, chunkX, chunkX); } int xx; int yy; int zz; if(biome != BiomeGenBase.desert && biome != BiomeGenBase.desertHills && !flag && random.nextInt(4) == 0 && TerrainGen.populate(chunkProvider, world, random, chunkX, chunkZ, flag, LAKE)) { xx = x + random.nextInt(16) + 8; yy = random.nextInt(256); zz = z + random.nextInt(16) + 8; (new WorldGenLakes(Blocks.water)).generate(world, random, xx, yy, zz); } if(TerrainGen.populate(chunkProvider, world, random, chunkX, chunkZ, flag, LAVA) && !flag && this.random.nextInt(8) == 0) { xx = x + random.nextInt(16) + 8; yy = random.nextInt(random.nextInt(248) + 8); zz = z + random.nextInt(16) + 8; if(yy < 63 || random.nextInt(10) == 0) { (new WorldGenLakes(Blocks.lava)).generate(world, random, xx, yy, zz); } } boolean doGen = TerrainGen.populate(chunkProvider, world, random, chunkX, chunkZ, flag, DUNGEON); for(xx = 0; doGen && xx < 8; ++xx) { yy = x + random.nextInt(16) + 8; zz = random.nextInt(256); int j2 = z + random.nextInt(16) + 8; (new WorldGenDungeons()).generate(world, random, yy, zz, j2); } if(biome instanceof AgeBiome) { AgeBiome ageBiome = (AgeBiome) biome; ageBiome.chunkProvider = this; ageBiome.decorate(world, random, x, z); ageBiome.chunkProvider = null; } else { biome.decorate(world, random, x, z); } SpawnerAnimals.performWorldGenSpawning(world, biome, x + 8, z + 8, 16, 16, random); x += 8; z += 8; doGen = TerrainGen.populate(chunkProvider, world, random, chunkX, chunkZ, flag, ICE); for(xx = 0; doGen && xx < 16; ++xx) { for(yy = 0; yy < 16; ++yy) { zz = world.getPrecipitationHeight(x + xx, z + yy); if(world.isBlockFreezable(xx + x, zz - 1, yy + z)) { world.setBlock(xx + x, zz - 1, yy + z, Blocks.ice, 0, 2); } if(world.func_147478_e(xx + x, zz, yy + z, true)) { world.setBlock(xx + x, zz, yy + z, Blocks.snow_layer, 0, 2); } } } MinecraftForge.EVENT_BUS.post(new PopulateChunkEvent.Post(chunkProvider, world, random, chunkX, chunkZ, flag)); BlockFalling.fallInstantly = false; }
/** * Populates chunk with ores etc etc */ public void populate(IChunkProvider par1IChunkProvider, int par2, int par3) { BlockSand.fallInstantly = true; int k = par2 * 16; int l = par3 * 16; BiomeGenBase biomegenbase = this.worldObj.getBiomeGenForCoords(k + 16, l + 16); this.rand.setSeed(this.worldObj.getSeed()); long i1 = this.rand.nextLong() / 2L * 2L + 1L; long j1 = this.rand.nextLong() / 2L * 2L + 1L; this.rand.setSeed((long) par2 * i1 + (long) par3 * j1 ^ this.worldObj.getSeed()); boolean flag = false; MinecraftForge.EVENT_BUS.post(new PopulateChunkEvent.Pre(par1IChunkProvider, worldObj, rand, par2, par3, flag)); if (this.mapFeaturesEnabled) { this.mineshaftGenerator.generateStructuresInChunk(this.worldObj, this.rand, par2, par3); flag = this.villageGenerator.generateStructuresInChunk(this.worldObj, this.rand, par2, par3); this.strongholdGenerator.generateStructuresInChunk(this.worldObj, this.rand, par2, par3); this.scatteredFeatureGenerator.generateStructuresInChunk(this.worldObj, this.rand, par2, par3); } int k1; int l1; int i2; if (TerrainGen.populate(par1IChunkProvider, worldObj, rand, par2, par3, flag, LAKE) && !flag && this.rand.nextInt(4) == 0) { k1 = k + this.rand.nextInt(16) + 8; l1 = this.rand.nextInt(128); i2 = l + this.rand.nextInt(16) + 8; (new WorldGenLakes(Block.waterStill.blockID)).generate(this.worldObj, this.rand, k1, l1, i2); } if (TerrainGen.populate(par1IChunkProvider, worldObj, rand, par2, par3, flag, LAVA) && !flag && this.rand.nextInt(8) == 0) { k1 = k + this.rand.nextInt(16) + 8; l1 = this.rand.nextInt(this.rand.nextInt(120) + 8); i2 = l + this.rand.nextInt(16) + 8; if (l1 < 63 || this.rand.nextInt(10) == 0) { (new WorldGenLakes(Block.lavaStill.blockID)).generate(this.worldObj, this.rand, k1, l1, i2); } } boolean doGen = TerrainGen.populate(par1IChunkProvider, worldObj, rand, par2, par3, flag, DUNGEON); for (k1 = 0; doGen && k1 < 8; ++k1) { l1 = k + this.rand.nextInt(16) + 8; i2 = this.rand.nextInt(128); int j2 = l + this.rand.nextInt(16) + 8; if ((new WorldGenDungeons()).generate(this.worldObj, this.rand, l1, i2, j2)) { ; } } biomegenbase.decorate(this.worldObj, this.rand, k, l); SpawnerAnimals.performWorldGenSpawning(this.worldObj, biomegenbase, k + 8, l + 8, 16, 16, this.rand); k += 8; l += 8; doGen = TerrainGen.populate(par1IChunkProvider, worldObj, rand, par2, par3, flag, ICE); for (k1 = 0; doGen && k1 < 16; ++k1) { for (l1 = 0; l1 < 16; ++l1) { i2 = this.worldObj.getPrecipitationHeight(k + k1, l + l1); if (this.worldObj.isBlockFreezable(k1 + k, i2 - 1, l1 + l)) { this.worldObj.setBlock(k1 + k, i2 - 1, l1 + l, Block.ice.blockID, 0, 2); } if (this.worldObj.canSnowAt(k1 + k, i2, l1 + l)) { this.worldObj.setBlock(k1 + k, i2, l1 + l, Block.snow.blockID, 0, 2); } } } MinecraftForge.EVENT_BUS.post(new PopulateChunkEvent.Post(par1IChunkProvider, worldObj, rand, par2, par3, flag)); BlockSand.fallInstantly = false; }
/** * Populates chunk with ores etc etc */ public void populate(IChunkProvider par1IChunkProvider, int par2, int par3) { BlockSand.fallInstantly = true; int k = par2 * 16; int l = par3 * 16; BiomeGenBase biomegenbase = this.worldObj.getBiomeGenForCoords(k + 16, l + 16); this.rand.setSeed(this.worldObj.getSeed()); long i1 = this.rand.nextLong() / 2L * 2L + 1L; long j1 = this.rand.nextLong() / 2L * 2L + 1L; this.rand.setSeed((long) par2 * i1 + (long) par3 * j1 ^ this.worldObj.getSeed()); boolean flag = false; MinecraftForge.EVENT_BUS.post(new PopulateChunkEvent.Pre(par1IChunkProvider, worldObj, rand, par2, par3, flag)); if (this.mapFeaturesEnabled) { this.mineshaftGenerator.generateStructuresInChunk(this.worldObj, this.rand, par2, par3); flag = this.villageGenerator.generateStructuresInChunk(this.worldObj, this.rand, par2, par3); this.strongholdGenerator.generateStructuresInChunk(this.worldObj, this.rand, par2, par3); this.scatteredFeatureGenerator.generateStructuresInChunk(this.worldObj, this.rand, par2, par3); } int k1; int l1; int i2; if (TerrainGen.populate(par1IChunkProvider, worldObj, rand, par2, par3, flag, LAKE) && !flag && this.rand.nextInt(4) == 0) { k1 = k + this.rand.nextInt(16) + 8; l1 = this.rand.nextInt(128); i2 = l + this.rand.nextInt(16) + 8; (new WorldGenLakes(Blocks.water)).generate(this.worldObj, this.rand, k1, l1, i2); } if (TerrainGen.populate(par1IChunkProvider, worldObj, rand, par2, par3, flag, LAVA) && !flag && this.rand.nextInt(8) == 0) { k1 = k + this.rand.nextInt(16) + 8; l1 = this.rand.nextInt(this.rand.nextInt(120) + 8); i2 = l + this.rand.nextInt(16) + 8; if (l1 < 63 || this.rand.nextInt(10) == 0) { (new WorldGenLakes(Blocks.lava)).generate(this.worldObj, this.rand, k1, l1, i2); } } boolean doGen = TerrainGen.populate(par1IChunkProvider, worldObj, rand, par2, par3, flag, DUNGEON); for (k1 = 0; doGen && k1 < 8; ++k1) { l1 = k + this.rand.nextInt(16) + 8; i2 = this.rand.nextInt(128); int j2 = l + this.rand.nextInt(16) + 8; if ((new WorldGenDungeons()).generate(this.worldObj, this.rand, l1, i2, j2)) { ; } } biomegenbase.decorate(this.worldObj, this.rand, k, l); SpawnerAnimals.performWorldGenSpawning(this.worldObj, biomegenbase, k + 8, l + 8, 16, 16, this.rand); k += 8; l += 8; doGen = TerrainGen.populate(par1IChunkProvider, worldObj, rand, par2, par3, flag, ICE); for (k1 = 0; doGen && k1 < 16; ++k1) { for (l1 = 0; l1 < 16; ++l1) { i2 = this.worldObj.getPrecipitationHeight(k + k1, l + l1); if (this.worldObj.isBlockFreezable(k1 + k, i2 - 1, l1 + l)) { this.worldObj.setBlock(k1 + k, i2 - 1, l1 + l, Blocks.ice, 0, 2); } if (this.worldObj.canSnowAt(k1 + k, i2, l1 + l)) { this.worldObj.setBlock(k1 + k, i2, l1 + l, Blocks.snow, 0, 2); } } } MinecraftForge.EVENT_BUS.post(new PopulateChunkEvent.Post(par1IChunkProvider, worldObj, rand, par2, par3, flag)); BlockSand.fallInstantly = false; }
/** * Populates chunk with ores etc etc */ public void populate(IChunkProvider par1IChunkProvider, int par2, int par3) { BlockSand.fallInstantly = true; int k = par2 * 16; int l = par3 * 16; BiomeDreamLand biomedreamland = (BiomeDreamLand) this.worldObj.getBiomeGenForCoords(k + 16, l + 16); this.rand.setSeed(this.worldObj.getSeed()); long i1 = this.rand.nextLong() / 2L * 2L + 1L; long j1 = this.rand.nextLong() / 2L * 2L + 1L; this.rand.setSeed((long)par2 * i1 + (long)par3 * j1 ^ this.worldObj.getSeed()); boolean flag = false; MinecraftForge.EVENT_BUS.post(new PopulateChunkEvent.Pre(par1IChunkProvider, worldObj, rand, par2, par3, flag)); int k1; int l1; int i2; if (TerrainGen.populate(par1IChunkProvider, worldObj, rand, par2, par3, flag, LAKE) && !flag && this.rand.nextInt(4) == 0) { k1 = k + this.rand.nextInt(16) + 8; l1 = this.rand.nextInt(128); i2 = l + this.rand.nextInt(16) + 8; (new WorldGenLakes(Block.waterStill.blockID)).generate(this.worldObj, this.rand, k1, l1, i2);//water } if (TerrainGen.populate(par1IChunkProvider, worldObj, rand, par2, par3, flag, LAVA) && !flag && this.rand.nextInt(8) == 0) { k1 = k + this.rand.nextInt(16) + 8; l1 = this.rand.nextInt(this.rand.nextInt(120) + 8); i2 = l + this.rand.nextInt(16) + 8; if (l1 < 63 || this.rand.nextInt(10) == 0) { (new WorldGenLakes(Block.lavaStill.blockID)).generate(this.worldObj, this.rand, k1, l1, i2);//lava } } boolean doGen = TerrainGen.populate(par1IChunkProvider, worldObj, rand, par2, par3, flag, DUNGEON); for (k1 = 0; doGen && k1 < 8; ++k1) { l1 = k + this.rand.nextInt(16) + 8; i2 = this.rand.nextInt(128); int j2 = l + this.rand.nextInt(16) + 8; if ((new WorldGenDLDungeons()).generate(this.worldObj, this.rand, l1, i2, j2)) { ; } } biomedreamland.decorate(this.worldObj, this.rand, k, l); SpawnerAnimals.performWorldGenSpawning(this.worldObj, biomedreamland, k + 8, l + 8, 16, 16, this.rand); k += 8; l += 8; MinecraftForge.EVENT_BUS.post(new PopulateChunkEvent.Post(par1IChunkProvider, worldObj, rand, par2, par3, flag)); BlockSand.fallInstantly = false; }