Java 类net.minecraft.world.gen.structure.MapGenStructure 实例源码

项目:CustomWorldGen    文件:ChunkProviderFlat.java   
@Nullable
public BlockPos getStrongholdGen(World worldIn, String structureName, BlockPos position)
{
    if ("Stronghold".equals(structureName))
    {
        for (MapGenStructure mapgenstructure : this.structureGenerators)
        {
            if (mapgenstructure instanceof MapGenStronghold)
            {
                return mapgenstructure.getClosestStrongholdPos(worldIn, position);
            }
        }
    }

    return null;
}
项目:Resilience-Client-Source    文件:ChunkProviderFlat.java   
public ChunkPosition func_147416_a(World p_147416_1_, String p_147416_2_, int p_147416_3_, int p_147416_4_, int p_147416_5_)
{
    if ("Stronghold".equals(p_147416_2_))
    {
        Iterator var6 = this.structureGenerators.iterator();

        while (var6.hasNext())
        {
            MapGenStructure var7 = (MapGenStructure)var6.next();

            if (var7 instanceof MapGenStronghold)
            {
                return var7.func_151545_a(p_147416_1_, p_147416_3_, p_147416_4_, p_147416_5_);
            }
        }
    }

    return null;
}
项目:Cauldron    文件:ChunkProviderFlat.java   
public ChunkPosition func_147416_a(World p_147416_1_, String p_147416_2_, int p_147416_3_, int p_147416_4_, int p_147416_5_)
{
    if ("Stronghold".equals(p_147416_2_))
    {
        Iterator iterator = this.structureGenerators.iterator();

        while (iterator.hasNext())
        {
            MapGenStructure mapgenstructure = (MapGenStructure)iterator.next();

            if (mapgenstructure instanceof MapGenStronghold)
            {
                return mapgenstructure.func_151545_a(p_147416_1_, p_147416_3_, p_147416_4_, p_147416_5_);
            }
        }
    }

    return null;
}
项目:Cauldron    文件:ChunkProviderFlat.java   
public ChunkPosition func_147416_a(World p_147416_1_, String p_147416_2_, int p_147416_3_, int p_147416_4_, int p_147416_5_)
{
    if ("Stronghold".equals(p_147416_2_))
    {
        Iterator iterator = this.structureGenerators.iterator();

        while (iterator.hasNext())
        {
            MapGenStructure mapgenstructure = (MapGenStructure)iterator.next();

            if (mapgenstructure instanceof MapGenStronghold)
            {
                return mapgenstructure.func_151545_a(p_147416_1_, p_147416_3_, p_147416_4_, p_147416_5_);
            }
        }
    }

    return null;
}
项目:RuneCraftery    文件:ChunkProviderFlat.java   
/**
 * Returns the location of the closest structure of the specified type. If not found returns null.
 */
public ChunkPosition findClosestStructure(World par1World, String par2Str, int par3, int par4, int par5)
{
    if ("Stronghold".equals(par2Str))
    {
        Iterator iterator = this.structureGenerators.iterator();

        while (iterator.hasNext())
        {
            MapGenStructure mapgenstructure = (MapGenStructure)iterator.next();

            if (mapgenstructure instanceof MapGenStronghold)
            {
                return mapgenstructure.getNearestInstance(par1World, par3, par4, par5);
            }
        }
    }

    return null;
}
项目:BetterNutritionMod    文件:ChunkProviderFlat.java   
/**
 * Returns the location of the closest structure of the specified type. If not found returns null.
 */
public ChunkPosition findClosestStructure(World par1World, String par2Str, int par3, int par4, int par5)
{
    if ("Stronghold".equals(par2Str))
    {
        Iterator iterator = this.structureGenerators.iterator();

        while (iterator.hasNext())
        {
            MapGenStructure mapgenstructure = (MapGenStructure)iterator.next();

            if (mapgenstructure instanceof MapGenStronghold)
            {
                return mapgenstructure.getNearestInstance(par1World, par3, par4, par5);
            }
        }
    }

    return null;
}
项目:DecompiledMinecraft    文件:ChunkProviderFlat.java   
public BlockPos getStrongholdGen(World worldIn, String structureName, BlockPos position)
{
    if ("Stronghold".equals(structureName))
    {
        for (MapGenStructure mapgenstructure : this.structureGenerators)
        {
            if (mapgenstructure instanceof MapGenStronghold)
            {
                return mapgenstructure.getClosestStrongholdPos(worldIn, position);
            }
        }
    }

    return null;
}
项目:DecompiledMinecraft    文件:ChunkProviderFlat.java   
public void recreateStructures(Chunk p_180514_1_, int p_180514_2_, int p_180514_3_)
{
    for (MapGenStructure mapgenstructure : this.structureGenerators)
    {
        mapgenstructure.generate(this, this.worldObj, p_180514_2_, p_180514_3_, (ChunkPrimer)null);
    }
}
项目:DecompiledMinecraft    文件:ChunkProviderFlat.java   
public BlockPos getStrongholdGen(World worldIn, String structureName, BlockPos position)
{
    if ("Stronghold".equals(structureName))
    {
        for (MapGenStructure mapgenstructure : this.structureGenerators)
        {
            if (mapgenstructure instanceof MapGenStronghold)
            {
                return mapgenstructure.getClosestStrongholdPos(worldIn, position);
            }
        }
    }

    return null;
}
项目:DecompiledMinecraft    文件:ChunkProviderFlat.java   
public void recreateStructures(Chunk p_180514_1_, int p_180514_2_, int p_180514_3_)
{
    for (MapGenStructure mapgenstructure : this.structureGenerators)
    {
        mapgenstructure.generate(this, this.worldObj, p_180514_2_, p_180514_3_, (ChunkPrimer)null);
    }
}
项目:BaseClient    文件:ChunkProviderFlat.java   
public BlockPos getStrongholdGen(World worldIn, String structureName, BlockPos position)
{
    if ("Stronghold".equals(structureName))
    {
        for (MapGenStructure mapgenstructure : this.structureGenerators)
        {
            if (mapgenstructure instanceof MapGenStronghold)
            {
                return mapgenstructure.getClosestStrongholdPos(worldIn, position);
            }
        }
    }

    return null;
}
项目:BaseClient    文件:ChunkProviderFlat.java   
public void recreateStructures(Chunk p_180514_1_, int p_180514_2_, int p_180514_3_)
{
    for (MapGenStructure mapgenstructure : this.structureGenerators)
    {
        mapgenstructure.generate(this, this.worldObj, p_180514_2_, p_180514_3_, (ChunkPrimer)null);
    }
}
项目:BaseClient    文件:ChunkProviderFlat.java   
public BlockPos getStrongholdGen(World worldIn, String structureName, BlockPos position)
{
    if ("Stronghold".equals(structureName))
    {
        for (MapGenStructure mapgenstructure : this.structureGenerators)
        {
            if (mapgenstructure instanceof MapGenStronghold)
            {
                return mapgenstructure.getClosestStrongholdPos(worldIn, position);
            }
        }
    }

    return null;
}
项目:BaseClient    文件:ChunkProviderFlat.java   
public void recreateStructures(Chunk p_180514_1_, int p_180514_2_, int p_180514_3_)
{
    for (MapGenStructure mapgenstructure : this.structureGenerators)
    {
        mapgenstructure.generate(this, this.worldObj, p_180514_2_, p_180514_3_, (ChunkPrimer)null);
    }
}
项目:Backmemed    文件:ChunkProviderFlat.java   
public void recreateStructures(Chunk chunkIn, int x, int z)
{
    for (MapGenStructure mapgenstructure : this.structureGenerators.values())
    {
        mapgenstructure.generate(this.worldObj, x, z, (ChunkPrimer)null);
    }
}
项目:CustomWorldGen    文件:ChunkProviderFlat.java   
public void recreateStructures(Chunk chunkIn, int x, int z)
{
    for (MapGenStructure mapgenstructure : this.structureGenerators)
    {
        mapgenstructure.generate(this.worldObj, x, z, (ChunkPrimer)null);
    }
}
项目:witchery    文件:EntitySpirit.java   
private boolean setWaypointTo(Object objStructure, Class clazz) {
   if(objStructure != null && clazz.isAssignableFrom(objStructure.getClass())) {
      this.setWaypointTo((MapGenStructure)objStructure);
      return true;
   } else {
      return false;
   }
}
项目:witchery    文件:EntitySpirit.java   
private void setWaypointTo(MapGenStructure mapStructure) {
   if(mapStructure != null) {
      ChunkPosition pos = mapStructure.func_151545_a(super.worldObj, (int)super.posX, (int)super.posY, (int)super.posZ);
      if(pos != null) {
         super.homeX = (double)pos.chunkPosX;
         super.homeY = (double)pos.chunkPosY;
         super.homeZ = (double)pos.chunkPosZ;
         super.waypoint = Witchery.Items.GENERIC.itemWaystone.createStack();
      }
   }

}
项目:Resilience-Client-Source    文件:ChunkProviderFlat.java   
public void recreateStructures(int par1, int par2)
{
    Iterator var3 = this.structureGenerators.iterator();

    while (var3.hasNext())
    {
        MapGenStructure var4 = (MapGenStructure)var3.next();
        var4.func_151539_a(this, this.worldObj, par1, par2, (Block[])null);
    }
}
项目:Cauldron    文件:ChunkProviderFlat.java   
public void recreateStructures(int p_82695_1_, int p_82695_2_)
{
    Iterator iterator = this.structureGenerators.iterator();

    while (iterator.hasNext())
    {
        MapGenStructure mapgenstructure = (MapGenStructure)iterator.next();
        mapgenstructure.func_151539_a(this, this.worldObj, p_82695_1_, p_82695_2_, (Block[])null);
    }
}
项目:Cauldron    文件:ChunkProviderFlat.java   
public void recreateStructures(int p_82695_1_, int p_82695_2_)
{
    Iterator iterator = this.structureGenerators.iterator();

    while (iterator.hasNext())
    {
        MapGenStructure mapgenstructure = (MapGenStructure)iterator.next();
        mapgenstructure.func_151539_a(this, this.worldObj, p_82695_1_, p_82695_2_, (Block[])null);
    }
}
项目:N-API    文件:StructureRegistry.java   
/**
 * Generates all Map Feature dependant structures.
 * @param provider The provider to generate the structures in.
 * @param worldObj The world object for provider.
 * @param chunkCoordX Likely the chunk coord x.
 * @param chunkCoordY Likely the chunk coord y.
 * @param blocks An array of blocks to generate in.
 */
@Internal
public static void generateAllMapFDependantStructures(IChunkProvider provider, World worldObj, int chunkCoordX, int chunkCoordY, Block[] blocks)
{
    for (MapGenStructure mapGenStructure : mapFDependantStructures)
    {
        mapGenStructure.func_151539_a(provider, worldObj, chunkCoordX, chunkCoordY, blocks);
    }
}
项目:N-API    文件:StructureRegistry.java   
/**
 * Generates all non-Map Feature dependant structures. Params are the same as
 * @see StructureRegistry#generateAllMapFDependantStructures
 */
@Internal
public static void generateAllNonMapFDependantStructures(IChunkProvider provider, World worldObj, int par1, int par2, Block[] blocks)
{
    for (MapGenStructure structure : nonMapFDependantStructures)
    {
        structure.func_151539_a(provider, worldObj, par1, par2, blocks);
    }
}
项目:RuneCraftery    文件:ChunkProviderFlat.java   
public Chunk func_73154_d(int p_73154_1_, int p_73154_2_) {
   Chunk var3 = new Chunk(this.field_73163_a, p_73154_1_, p_73154_2_);

   for(int var4 = 0; var4 < this.field_82700_c.length; ++var4) {
      int var5 = var4 >> 4;
      ExtendedBlockStorage var6 = var3.func_76587_i()[var5];
      if(var6 == null) {
         var6 = new ExtendedBlockStorage(var4, !this.field_73163_a.field_73011_w.field_76576_e);
         var3.func_76587_i()[var5] = var6;
      }

      for(int var7 = 0; var7 < 16; ++var7) {
         for(int var8 = 0; var8 < 16; ++var8) {
            var6.func_76655_a(var7, var4 & 15, var8, this.field_82700_c[var4] & 255);
            var6.func_76654_b(var7, var4 & 15, var8, this.field_82698_d[var4]);
         }
      }
   }

   var3.func_76603_b();
   BiomeGenBase[] var9 = this.field_73163_a.func_72959_q().func_76933_b((BiomeGenBase[])null, p_73154_1_ * 16, p_73154_2_ * 16, 16, 16);
   byte[] var10 = var3.func_76605_m();

   for(int var11 = 0; var11 < var10.length; ++var11) {
      var10[var11] = (byte)var9[var11].field_76756_M;
   }

   Iterator var12 = this.field_82696_f.iterator();

   while(var12.hasNext()) {
      MapGenStructure var13 = (MapGenStructure)var12.next();
      var13.func_75036_a(this, this.field_73163_a, p_73154_1_, p_73154_2_, (byte[])null);
   }

   var3.func_76603_b();
   return var3;
}
项目:RuneCraftery    文件:ChunkProviderFlat.java   
public ChunkPosition func_73150_a(World p_73150_1_, String p_73150_2_, int p_73150_3_, int p_73150_4_, int p_73150_5_) {
   if("Stronghold".equals(p_73150_2_)) {
      Iterator var6 = this.field_82696_f.iterator();

      while(var6.hasNext()) {
         MapGenStructure var7 = (MapGenStructure)var6.next();
         if(var7 instanceof MapGenStronghold) {
            return var7.func_75050_a(p_73150_1_, p_73150_3_, p_73150_4_, p_73150_5_);
         }
      }
   }

   return null;
}
项目:RuneCraftery    文件:ChunkProviderFlat.java   
public void func_82695_e(int p_82695_1_, int p_82695_2_) {
   Iterator var3 = this.field_82696_f.iterator();

   while(var3.hasNext()) {
      MapGenStructure var4 = (MapGenStructure)var3.next();
      var4.func_75036_a(this, this.field_73163_a, p_82695_1_, p_82695_2_, (byte[])null);
   }

}
项目:RuneCraftery    文件:ChunkProviderFlat.java   
public void recreateStructures(int par1, int par2)
{
    Iterator iterator = this.structureGenerators.iterator();

    while (iterator.hasNext())
    {
        MapGenStructure mapgenstructure = (MapGenStructure)iterator.next();
        mapgenstructure.generate(this, this.worldObj, par1, par2, (byte[])null);
    }
}
项目:BetterNutritionMod    文件:ChunkProviderFlat.java   
public void recreateStructures(int par1, int par2)
{
    Iterator iterator = this.structureGenerators.iterator();

    while (iterator.hasNext())
    {
        MapGenStructure mapgenstructure = (MapGenStructure)iterator.next();
        mapgenstructure.generate(this, this.worldObj, par1, par2, (byte[])null);
    }
}
项目:DecompiledMinecraft    文件:ChunkProviderFlat.java   
/**
 * Populates chunk with ores etc etc
 */
public void populate(IChunkProvider p_73153_1_, int p_73153_2_, int p_73153_3_)
{
    int i = p_73153_2_ * 16;
    int j = p_73153_3_ * 16;
    BlockPos blockpos = new BlockPos(i, 0, j);
    BiomeGenBase biomegenbase = this.worldObj.getBiomeGenForCoords(new BlockPos(i + 16, 0, j + 16));
    boolean flag = false;
    this.random.setSeed(this.worldObj.getSeed());
    long k = this.random.nextLong() / 2L * 2L + 1L;
    long l = this.random.nextLong() / 2L * 2L + 1L;
    this.random.setSeed((long)p_73153_2_ * k + (long)p_73153_3_ * l ^ this.worldObj.getSeed());
    ChunkCoordIntPair chunkcoordintpair = new ChunkCoordIntPair(p_73153_2_, p_73153_3_);

    for (MapGenStructure mapgenstructure : this.structureGenerators)
    {
        boolean flag1 = mapgenstructure.generateStructure(this.worldObj, this.random, chunkcoordintpair);

        if (mapgenstructure instanceof MapGenVillage)
        {
            flag |= flag1;
        }
    }

    if (this.waterLakeGenerator != null && !flag && this.random.nextInt(4) == 0)
    {
        this.waterLakeGenerator.generate(this.worldObj, this.random, blockpos.add(this.random.nextInt(16) + 8, this.random.nextInt(256), this.random.nextInt(16) + 8));
    }

    if (this.lavaLakeGenerator != null && !flag && this.random.nextInt(8) == 0)
    {
        BlockPos blockpos1 = blockpos.add(this.random.nextInt(16) + 8, this.random.nextInt(this.random.nextInt(248) + 8), this.random.nextInt(16) + 8);

        if (blockpos1.getY() < this.worldObj.func_181545_F() || this.random.nextInt(10) == 0)
        {
            this.lavaLakeGenerator.generate(this.worldObj, this.random, blockpos1);
        }
    }

    if (this.hasDungeons)
    {
        for (int i1 = 0; i1 < 8; ++i1)
        {
            (new WorldGenDungeons()).generate(this.worldObj, this.random, blockpos.add(this.random.nextInt(16) + 8, this.random.nextInt(256), this.random.nextInt(16) + 8));
        }
    }

    if (this.hasDecoration)
    {
        biomegenbase.decorate(this.worldObj, this.random, blockpos);
    }
}
项目:DecompiledMinecraft    文件:ChunkProviderFlat.java   
/**
 * Populates chunk with ores etc etc
 */
public void populate(IChunkProvider p_73153_1_, int p_73153_2_, int p_73153_3_)
{
    int i = p_73153_2_ * 16;
    int j = p_73153_3_ * 16;
    BlockPos blockpos = new BlockPos(i, 0, j);
    BiomeGenBase biomegenbase = this.worldObj.getBiomeGenForCoords(new BlockPos(i + 16, 0, j + 16));
    boolean flag = false;
    this.random.setSeed(this.worldObj.getSeed());
    long k = this.random.nextLong() / 2L * 2L + 1L;
    long l = this.random.nextLong() / 2L * 2L + 1L;
    this.random.setSeed((long)p_73153_2_ * k + (long)p_73153_3_ * l ^ this.worldObj.getSeed());
    ChunkCoordIntPair chunkcoordintpair = new ChunkCoordIntPair(p_73153_2_, p_73153_3_);

    for (MapGenStructure mapgenstructure : this.structureGenerators)
    {
        boolean flag1 = mapgenstructure.generateStructure(this.worldObj, this.random, chunkcoordintpair);

        if (mapgenstructure instanceof MapGenVillage)
        {
            flag |= flag1;
        }
    }

    if (this.waterLakeGenerator != null && !flag && this.random.nextInt(4) == 0)
    {
        this.waterLakeGenerator.generate(this.worldObj, this.random, blockpos.add(this.random.nextInt(16) + 8, this.random.nextInt(256), this.random.nextInt(16) + 8));
    }

    if (this.lavaLakeGenerator != null && !flag && this.random.nextInt(8) == 0)
    {
        BlockPos blockpos1 = blockpos.add(this.random.nextInt(16) + 8, this.random.nextInt(this.random.nextInt(248) + 8), this.random.nextInt(16) + 8);

        if (blockpos1.getY() < this.worldObj.func_181545_F() || this.random.nextInt(10) == 0)
        {
            this.lavaLakeGenerator.generate(this.worldObj, this.random, blockpos1);
        }
    }

    if (this.hasDungeons)
    {
        for (int i1 = 0; i1 < 8; ++i1)
        {
            (new WorldGenDungeons()).generate(this.worldObj, this.random, blockpos.add(this.random.nextInt(16) + 8, this.random.nextInt(256), this.random.nextInt(16) + 8));
        }
    }

    if (this.hasDecoration)
    {
        biomegenbase.decorate(this.worldObj, this.random, blockpos);
    }
}
项目:BaseClient    文件:ChunkProviderFlat.java   
/**
 * Populates chunk with ores etc etc
 */
public void populate(IChunkProvider p_73153_1_, int p_73153_2_, int p_73153_3_)
{
    int i = p_73153_2_ * 16;
    int j = p_73153_3_ * 16;
    BlockPos blockpos = new BlockPos(i, 0, j);
    BiomeGenBase biomegenbase = this.worldObj.getBiomeGenForCoords(new BlockPos(i + 16, 0, j + 16));
    boolean flag = false;
    this.random.setSeed(this.worldObj.getSeed());
    long k = this.random.nextLong() / 2L * 2L + 1L;
    long l = this.random.nextLong() / 2L * 2L + 1L;
    this.random.setSeed((long)p_73153_2_ * k + (long)p_73153_3_ * l ^ this.worldObj.getSeed());
    ChunkCoordIntPair chunkcoordintpair = new ChunkCoordIntPair(p_73153_2_, p_73153_3_);

    for (MapGenStructure mapgenstructure : this.structureGenerators)
    {
        boolean flag1 = mapgenstructure.generateStructure(this.worldObj, this.random, chunkcoordintpair);

        if (mapgenstructure instanceof MapGenVillage)
        {
            flag |= flag1;
        }
    }

    if (this.waterLakeGenerator != null && !flag && this.random.nextInt(4) == 0)
    {
        this.waterLakeGenerator.generate(this.worldObj, this.random, blockpos.add(this.random.nextInt(16) + 8, this.random.nextInt(256), this.random.nextInt(16) + 8));
    }

    if (this.lavaLakeGenerator != null && !flag && this.random.nextInt(8) == 0)
    {
        BlockPos blockpos1 = blockpos.add(this.random.nextInt(16) + 8, this.random.nextInt(this.random.nextInt(248) + 8), this.random.nextInt(16) + 8);

        if (blockpos1.getY() < this.worldObj.func_181545_F() || this.random.nextInt(10) == 0)
        {
            this.lavaLakeGenerator.generate(this.worldObj, this.random, blockpos1);
        }
    }

    if (this.hasDungeons)
    {
        for (int i1 = 0; i1 < 8; ++i1)
        {
            (new WorldGenDungeons()).generate(this.worldObj, this.random, blockpos.add(this.random.nextInt(16) + 8, this.random.nextInt(256), this.random.nextInt(16) + 8));
        }
    }

    if (this.hasDecoration)
    {
        biomegenbase.decorate(this.worldObj, this.random, blockpos);
    }
}
项目:BaseClient    文件:ChunkProviderFlat.java   
/**
 * Populates chunk with ores etc etc
 */
public void populate(IChunkProvider p_73153_1_, int p_73153_2_, int p_73153_3_)
{
    int i = p_73153_2_ * 16;
    int j = p_73153_3_ * 16;
    BlockPos blockpos = new BlockPos(i, 0, j);
    BiomeGenBase biomegenbase = this.worldObj.getBiomeGenForCoords(new BlockPos(i + 16, 0, j + 16));
    boolean flag = false;
    this.random.setSeed(this.worldObj.getSeed());
    long k = this.random.nextLong() / 2L * 2L + 1L;
    long l = this.random.nextLong() / 2L * 2L + 1L;
    this.random.setSeed((long)p_73153_2_ * k + (long)p_73153_3_ * l ^ this.worldObj.getSeed());
    ChunkCoordIntPair chunkcoordintpair = new ChunkCoordIntPair(p_73153_2_, p_73153_3_);

    for (MapGenStructure mapgenstructure : this.structureGenerators)
    {
        boolean flag1 = mapgenstructure.generateStructure(this.worldObj, this.random, chunkcoordintpair);

        if (mapgenstructure instanceof MapGenVillage)
        {
            flag |= flag1;
        }
    }

    if (this.waterLakeGenerator != null && !flag && this.random.nextInt(4) == 0)
    {
        this.waterLakeGenerator.generate(this.worldObj, this.random, blockpos.add(this.random.nextInt(16) + 8, this.random.nextInt(256), this.random.nextInt(16) + 8));
    }

    if (this.lavaLakeGenerator != null && !flag && this.random.nextInt(8) == 0)
    {
        BlockPos blockpos1 = blockpos.add(this.random.nextInt(16) + 8, this.random.nextInt(this.random.nextInt(248) + 8), this.random.nextInt(16) + 8);

        if (blockpos1.getY() < this.worldObj.func_181545_F() || this.random.nextInt(10) == 0)
        {
            this.lavaLakeGenerator.generate(this.worldObj, this.random, blockpos1);
        }
    }

    if (this.hasDungeons)
    {
        for (int i1 = 0; i1 < 8; ++i1)
        {
            (new WorldGenDungeons()).generate(this.worldObj, this.random, blockpos.add(this.random.nextInt(16) + 8, this.random.nextInt(256), this.random.nextInt(16) + 8));
        }
    }

    if (this.hasDecoration)
    {
        biomegenbase.decorate(this.worldObj, this.random, blockpos);
    }
}
项目:Backmemed    文件:ChunkProviderFlat.java   
public void populate(int x, int z)
{
    int i = x * 16;
    int j = z * 16;
    BlockPos blockpos = new BlockPos(i, 0, j);
    Biome biome = this.worldObj.getBiome(new BlockPos(i + 16, 0, j + 16));
    boolean flag = false;
    this.random.setSeed(this.worldObj.getSeed());
    long k = this.random.nextLong() / 2L * 2L + 1L;
    long l = this.random.nextLong() / 2L * 2L + 1L;
    this.random.setSeed((long)x * k + (long)z * l ^ this.worldObj.getSeed());
    ChunkPos chunkpos = new ChunkPos(x, z);

    for (MapGenStructure mapgenstructure : this.structureGenerators.values())
    {
        boolean flag1 = mapgenstructure.generateStructure(this.worldObj, this.random, chunkpos);

        if (mapgenstructure instanceof MapGenVillage)
        {
            flag |= flag1;
        }
    }

    if (this.waterLakeGenerator != null && !flag && this.random.nextInt(4) == 0)
    {
        this.waterLakeGenerator.generate(this.worldObj, this.random, blockpos.add(this.random.nextInt(16) + 8, this.random.nextInt(256), this.random.nextInt(16) + 8));
    }

    if (this.lavaLakeGenerator != null && !flag && this.random.nextInt(8) == 0)
    {
        BlockPos blockpos1 = blockpos.add(this.random.nextInt(16) + 8, this.random.nextInt(this.random.nextInt(248) + 8), this.random.nextInt(16) + 8);

        if (blockpos1.getY() < this.worldObj.getSeaLevel() || this.random.nextInt(10) == 0)
        {
            this.lavaLakeGenerator.generate(this.worldObj, this.random, blockpos1);
        }
    }

    if (this.hasDungeons)
    {
        for (int i1 = 0; i1 < 8; ++i1)
        {
            (new WorldGenDungeons()).generate(this.worldObj, this.random, blockpos.add(this.random.nextInt(16) + 8, this.random.nextInt(256), this.random.nextInt(16) + 8));
        }
    }

    if (this.hasDecoration)
    {
        biome.decorate(this.worldObj, this.random, blockpos);
    }
}
项目:Backmemed    文件:ChunkProviderFlat.java   
@Nullable
public BlockPos getStrongholdGen(World worldIn, String structureName, BlockPos position, boolean p_180513_4_)
{
    MapGenStructure mapgenstructure = (MapGenStructure)this.structureGenerators.get(structureName);
    return mapgenstructure != null ? mapgenstructure.getClosestStrongholdPos(worldIn, position, p_180513_4_) : null;
}
项目:CustomWorldGen    文件:ChunkProviderFlat.java   
public void populate(int x, int z)
{
    net.minecraft.block.BlockFalling.fallInstantly = true;
    int i = x * 16;
    int j = z * 16;
    BlockPos blockpos = new BlockPos(i, 0, j);
    Biome biome = this.worldObj.getBiome(new BlockPos(i + 16, 0, j + 16));
    boolean flag = false;
    this.random.setSeed(this.worldObj.getSeed());
    long k = this.random.nextLong() / 2L * 2L + 1L;
    long l = this.random.nextLong() / 2L * 2L + 1L;
    this.random.setSeed((long)x * k + (long)z * l ^ this.worldObj.getSeed());
    ChunkPos chunkpos = new ChunkPos(x, z);

    net.minecraftforge.event.ForgeEventFactory.onChunkPopulate(true, this, this.worldObj, this.random, x, z, flag);

    for (MapGenStructure mapgenstructure : this.structureGenerators)
    {
        boolean flag1 = mapgenstructure.generateStructure(this.worldObj, this.random, chunkpos);

        if (mapgenstructure instanceof MapGenVillage)
        {
            flag |= flag1;
        }
    }

    if (this.waterLakeGenerator != null && !flag && this.random.nextInt(4) == 0)
    {
        this.waterLakeGenerator.generate(this.worldObj, this.random, blockpos.add(this.random.nextInt(16) + 8, this.random.nextInt(256), this.random.nextInt(16) + 8));
    }

    if (this.lavaLakeGenerator != null && !flag && this.random.nextInt(8) == 0)
    {
        BlockPos blockpos1 = blockpos.add(this.random.nextInt(16) + 8, this.random.nextInt(this.random.nextInt(248) + 8), this.random.nextInt(16) + 8);

        if (blockpos1.getY() < this.worldObj.getSeaLevel() || this.random.nextInt(10) == 0)
        {
            this.lavaLakeGenerator.generate(this.worldObj, this.random, blockpos1);
        }
    }

    if (this.hasDungeons)
    {
        for (int i1 = 0; i1 < 8; ++i1)
        {
            (new WorldGenDungeons()).generate(this.worldObj, this.random, blockpos.add(this.random.nextInt(16) + 8, this.random.nextInt(256), this.random.nextInt(16) + 8));
        }
    }

    if (this.hasDecoration)
    {
        biome.decorate(this.worldObj, this.random, blockpos);
    }

    net.minecraftforge.event.ForgeEventFactory.onChunkPopulate(false, this, this.worldObj, this.random, x, z, flag);
    net.minecraft.block.BlockFalling.fallInstantly = false;
}
项目:Resilience-Client-Source    文件:ChunkProviderFlat.java   
/**
 * Will return back a chunk, if it doesn't exist and its not a MP client it will generates all the blocks for the
 * specified chunk from the map seed and chunk seed
 */
public Chunk provideChunk(int par1, int par2)
{
    Chunk var3 = new Chunk(this.worldObj, par1, par2);
    int var6;

    for (int var4 = 0; var4 < this.cachedBlockIDs.length; ++var4)
    {
        Block var5 = this.cachedBlockIDs[var4];

        if (var5 != null)
        {
            var6 = var4 >> 4;
            ExtendedBlockStorage var7 = var3.getBlockStorageArray()[var6];

            if (var7 == null)
            {
                var7 = new ExtendedBlockStorage(var4, !this.worldObj.provider.hasNoSky);
                var3.getBlockStorageArray()[var6] = var7;
            }

            for (int var8 = 0; var8 < 16; ++var8)
            {
                for (int var9 = 0; var9 < 16; ++var9)
                {
                    var7.func_150818_a(var8, var4 & 15, var9, var5);
                    var7.setExtBlockMetadata(var8, var4 & 15, var9, this.cachedBlockMetadata[var4]);
                }
            }
        }
    }

    var3.generateSkylightMap();
    BiomeGenBase[] var10 = this.worldObj.getWorldChunkManager().loadBlockGeneratorData((BiomeGenBase[])null, par1 * 16, par2 * 16, 16, 16);
    byte[] var11 = var3.getBiomeArray();

    for (var6 = 0; var6 < var11.length; ++var6)
    {
        var11[var6] = (byte)var10[var6].biomeID;
    }

    Iterator var12 = this.structureGenerators.iterator();

    while (var12.hasNext())
    {
        MapGenStructure var13 = (MapGenStructure)var12.next();
        var13.func_151539_a(this, this.worldObj, par1, par2, (Block[])null);
    }

    var3.generateSkylightMap();
    return var3;
}
项目:Resilience-Client-Source    文件:ChunkProviderFlat.java   
/**
 * Populates chunk with ores etc etc
 */
public void populate(IChunkProvider par1IChunkProvider, int par2, int par3)
{
    int var4 = par2 * 16;
    int var5 = par3 * 16;
    BiomeGenBase var6 = this.worldObj.getBiomeGenForCoords(var4 + 16, var5 + 16);
    boolean var7 = false;
    this.random.setSeed(this.worldObj.getSeed());
    long var8 = this.random.nextLong() / 2L * 2L + 1L;
    long var10 = this.random.nextLong() / 2L * 2L + 1L;
    this.random.setSeed((long)par2 * var8 + (long)par3 * var10 ^ this.worldObj.getSeed());
    Iterator var12 = this.structureGenerators.iterator();

    while (var12.hasNext())
    {
        MapGenStructure var13 = (MapGenStructure)var12.next();
        boolean var14 = var13.generateStructuresInChunk(this.worldObj, this.random, par2, par3);

        if (var13 instanceof MapGenVillage)
        {
            var7 |= var14;
        }
    }

    int var17;
    int var16;
    int var18;

    if (this.waterLakeGenerator != null && !var7 && this.random.nextInt(4) == 0)
    {
        var16 = var4 + this.random.nextInt(16) + 8;
        var17 = this.random.nextInt(256);
        var18 = var5 + this.random.nextInt(16) + 8;
        this.waterLakeGenerator.generate(this.worldObj, this.random, var16, var17, var18);
    }

    if (this.lavaLakeGenerator != null && !var7 && this.random.nextInt(8) == 0)
    {
        var16 = var4 + this.random.nextInt(16) + 8;
        var17 = this.random.nextInt(this.random.nextInt(248) + 8);
        var18 = var5 + this.random.nextInt(16) + 8;

        if (var17 < 63 || this.random.nextInt(10) == 0)
        {
            this.lavaLakeGenerator.generate(this.worldObj, this.random, var16, var17, var18);
        }
    }

    if (this.hasDungeons)
    {
        for (var16 = 0; var16 < 8; ++var16)
        {
            var17 = var4 + this.random.nextInt(16) + 8;
            var18 = this.random.nextInt(256);
            int var15 = var5 + this.random.nextInt(16) + 8;
            (new WorldGenDungeons()).generate(this.worldObj, this.random, var17, var18, var15);
        }
    }

    if (this.hasDecoration)
    {
        var6.decorate(this.worldObj, this.random, var4, var5);
    }
}
项目:Cauldron    文件:ChunkProviderFlat.java   
public void populate(IChunkProvider p_73153_1_, int p_73153_2_, int p_73153_3_)
{
    int k = p_73153_2_ * 16;
    int l = p_73153_3_ * 16;
    BiomeGenBase biomegenbase = this.worldObj.getBiomeGenForCoords(k + 16, l + 16);
    boolean flag = false;
    this.random.setSeed(this.worldObj.getSeed());
    long i1 = this.random.nextLong() / 2L * 2L + 1L;
    long j1 = this.random.nextLong() / 2L * 2L + 1L;
    this.random.setSeed((long)p_73153_2_ * i1 + (long)p_73153_3_ * j1 ^ this.worldObj.getSeed());
    Iterator iterator = this.structureGenerators.iterator();

    while (iterator.hasNext())
    {
        MapGenStructure mapgenstructure = (MapGenStructure)iterator.next();
        boolean flag1 = mapgenstructure.generateStructuresInChunk(this.worldObj, this.random, p_73153_2_, p_73153_3_);

        if (mapgenstructure instanceof MapGenVillage)
        {
            flag |= flag1;
        }
    }

    int l1;
    int i2;
    int j2;

    if (this.waterLakeGenerator != null && !flag && this.random.nextInt(4) == 0)
    {
        l1 = k + this.random.nextInt(16) + 8;
        i2 = this.random.nextInt(256);
        j2 = l + this.random.nextInt(16) + 8;
        this.waterLakeGenerator.generate(this.worldObj, this.random, l1, i2, j2);
    }

    if (this.lavaLakeGenerator != null && !flag && this.random.nextInt(8) == 0)
    {
        l1 = k + this.random.nextInt(16) + 8;
        i2 = this.random.nextInt(this.random.nextInt(248) + 8);
        j2 = l + this.random.nextInt(16) + 8;

        if (i2 < 63 || this.random.nextInt(10) == 0)
        {
            this.lavaLakeGenerator.generate(this.worldObj, this.random, l1, i2, j2);
        }
    }

    if (this.hasDungeons)
    {
        for (l1 = 0; l1 < 8; ++l1)
        {
            i2 = k + this.random.nextInt(16) + 8;
            j2 = this.random.nextInt(256);
            int k1 = l + this.random.nextInt(16) + 8;
            (new WorldGenDungeons()).generate(this.worldObj, this.random, i2, j2, k1);
        }
    }

    if (this.hasDecoration)
    {
        biomegenbase.decorate(this.worldObj, this.random, k, l);
    }
}
项目:Cauldron    文件:ChunkProviderFlat.java   
public void populate(IChunkProvider p_73153_1_, int p_73153_2_, int p_73153_3_)
{
    int k = p_73153_2_ * 16;
    int l = p_73153_3_ * 16;
    BiomeGenBase biomegenbase = this.worldObj.getBiomeGenForCoords(k + 16, l + 16);
    boolean flag = false;
    this.random.setSeed(this.worldObj.getSeed());
    long i1 = this.random.nextLong() / 2L * 2L + 1L;
    long j1 = this.random.nextLong() / 2L * 2L + 1L;
    this.random.setSeed((long)p_73153_2_ * i1 + (long)p_73153_3_ * j1 ^ this.worldObj.getSeed());
    Iterator iterator = this.structureGenerators.iterator();

    while (iterator.hasNext())
    {
        MapGenStructure mapgenstructure = (MapGenStructure)iterator.next();
        boolean flag1 = mapgenstructure.generateStructuresInChunk(this.worldObj, this.random, p_73153_2_, p_73153_3_);

        if (mapgenstructure instanceof MapGenVillage)
        {
            flag |= flag1;
        }
    }

    int l1;
    int i2;
    int j2;

    if (this.waterLakeGenerator != null && !flag && this.random.nextInt(4) == 0)
    {
        l1 = k + this.random.nextInt(16) + 8;
        i2 = this.random.nextInt(256);
        j2 = l + this.random.nextInt(16) + 8;
        this.waterLakeGenerator.generate(this.worldObj, this.random, l1, i2, j2);
    }

    if (this.lavaLakeGenerator != null && !flag && this.random.nextInt(8) == 0)
    {
        l1 = k + this.random.nextInt(16) + 8;
        i2 = this.random.nextInt(this.random.nextInt(248) + 8);
        j2 = l + this.random.nextInt(16) + 8;

        if (i2 < 63 || this.random.nextInt(10) == 0)
        {
            this.lavaLakeGenerator.generate(this.worldObj, this.random, l1, i2, j2);
        }
    }

    if (this.hasDungeons)
    {
        for (l1 = 0; l1 < 8; ++l1)
        {
            i2 = k + this.random.nextInt(16) + 8;
            j2 = this.random.nextInt(256);
            int k1 = l + this.random.nextInt(16) + 8;
            (new WorldGenDungeons()).generate(this.worldObj, this.random, i2, j2, k1);
        }
    }

    if (this.hasDecoration)
    {
        biomegenbase.decorate(this.worldObj, this.random, k, l);
    }
}
项目:N-API    文件:StructureRegistry.java   
/**
 * Adds a structure that will only generate if Map Features is enabled. Same params as
 * @see StructureRegistry#addNonMapFDependantStructure(net.minecraft.world.gen.structure.MapGenStructure, Class, String)
 */
public static void addMapFDependantStructure(MapGenStructure structure, Class structureClass, String shortStructId)
{
    mapFDependantStructures.add(structure);
    ioStructureInformation.put(structureClass, shortStructId);
}