本文整理汇总了Java中net.minecraft.world.gen.structure.MapGenStronghold类的典型用法代码示例。如果您正苦于以下问题:Java MapGenStronghold类的具体用法?Java MapGenStronghold怎么用?Java MapGenStronghold使用的例子?那么, 这里精选的类代码示例或许可以为您提供帮助。
MapGenStronghold类属于net.minecraft.world.gen.structure包,在下文中一共展示了MapGenStronghold类的15个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于系统推荐出更棒的Java代码示例。
示例1: getStrongholdGen
import net.minecraft.world.gen.structure.MapGenStronghold; //导入依赖的package包/类
@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;
}
示例2: ChunkProviderGenerateVC
import net.minecraft.world.gen.structure.MapGenStronghold; //导入依赖的package包/类
public ChunkProviderGenerateVC(World worldIn, long seed, boolean mapfeaturesenabled, String customgenjson) {
super(worldIn, seed, mapfeaturesenabled, customgenjson);
strongholdGenerator = new MapGenStronghold(); // (MapGenStronghold) TerrainGen.getModdedMapGen(strongholdGenerator, STRONGHOLD);
caveGenerator = new MapGenCavesVC();
floragenerator = new MapGenFlora(seed);
this.worldObj = worldIn;
this.rand = new Random(seed);
this.noiseGen1 = new NoiseGeneratorOctaves(this.rand, 4);
this.noiseGen2 = new NoiseGeneratorOctaves(this.rand, 16);
this.noiseGen3 = new NoiseGeneratorOctaves(this.rand, 8);
this.noiseGen4 = new NoiseGeneratorOctaves(this.rand, 4);
this.noiseGen5 = new NoiseGeneratorOctaves(this.rand, 2);
this.noiseGen6 = new NoiseGeneratorOctaves(this.rand, 1);
this.mobSpawnerNoise = new NoiseGeneratorOctaves(this.rand, 8);
this.seed = seed;
this.noiseFieldModifier = GenLayerVC.genNoiseFieldModifier(seed);
genrocklayers = new GenRockLayers(seed);
ageLayer = GenLayerVC.genAgemap(seed);
//heightmapGen = GenLayerVC.genHeightmap(seed);
}
示例3: func_147416_a
import net.minecraft.world.gen.structure.MapGenStronghold; //导入依赖的package包/类
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;
}
示例4: func_147416_a
import net.minecraft.world.gen.structure.MapGenStronghold; //导入依赖的package包/类
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;
}
示例5: findClosestStructure
import net.minecraft.world.gen.structure.MapGenStronghold; //导入依赖的package包/类
/**
* 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;
}
示例6: getStrongholdGen
import net.minecraft.world.gen.structure.MapGenStronghold; //导入依赖的package包/类
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;
}
示例7: func_73150_a
import net.minecraft.world.gen.structure.MapGenStronghold; //导入依赖的package包/类
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;
}
示例8: addStrongholdBiome
import net.minecraft.world.gen.structure.MapGenStronghold; //导入依赖的package包/类
public static void addStrongholdBiome(BiomeGenBase biome)
{
if (!MapGenStronghold.allowedBiomes.contains(biome))
{
MapGenStronghold.allowedBiomes.add(biome);
}
}
示例9: removeStrongholdBiome
import net.minecraft.world.gen.structure.MapGenStronghold; //导入依赖的package包/类
public static void removeStrongholdBiome(BiomeGenBase biome)
{
if (MapGenStronghold.allowedBiomes.contains(biome))
{
MapGenStronghold.allowedBiomes.remove(biome);
}
}
示例10: ChunkProviderOverworld
import net.minecraft.world.gen.structure.MapGenStronghold; //导入依赖的package包/类
public ChunkProviderOverworld(World worldIn, long seed, boolean mapFeaturesEnabledIn, String p_i46668_5_)
{
{
caveGenerator = net.minecraftforge.event.terraingen.TerrainGen.getModdedMapGen(caveGenerator, net.minecraftforge.event.terraingen.InitMapGenEvent.EventType.CAVE);
strongholdGenerator = (MapGenStronghold)net.minecraftforge.event.terraingen.TerrainGen.getModdedMapGen(strongholdGenerator, net.minecraftforge.event.terraingen.InitMapGenEvent.EventType.STRONGHOLD);
villageGenerator = (MapGenVillage)net.minecraftforge.event.terraingen.TerrainGen.getModdedMapGen(villageGenerator, net.minecraftforge.event.terraingen.InitMapGenEvent.EventType.VILLAGE);
mineshaftGenerator = (MapGenMineshaft)net.minecraftforge.event.terraingen.TerrainGen.getModdedMapGen(mineshaftGenerator, net.minecraftforge.event.terraingen.InitMapGenEvent.EventType.MINESHAFT);
scatteredFeatureGenerator = (MapGenScatteredFeature)net.minecraftforge.event.terraingen.TerrainGen.getModdedMapGen(scatteredFeatureGenerator, net.minecraftforge.event.terraingen.InitMapGenEvent.EventType.SCATTERED_FEATURE);
ravineGenerator = net.minecraftforge.event.terraingen.TerrainGen.getModdedMapGen(ravineGenerator, net.minecraftforge.event.terraingen.InitMapGenEvent.EventType.RAVINE);
oceanMonumentGenerator = (StructureOceanMonument)net.minecraftforge.event.terraingen.TerrainGen.getModdedMapGen(oceanMonumentGenerator, net.minecraftforge.event.terraingen.InitMapGenEvent.EventType.OCEAN_MONUMENT);
}
this.worldObj = worldIn;
this.mapFeaturesEnabled = mapFeaturesEnabledIn;
this.terrainType = worldIn.getWorldInfo().getTerrainType();
this.rand = new Random(seed);
this.minLimitPerlinNoise = new NoiseGeneratorOctaves(this.rand, 16);
this.maxLimitPerlinNoise = new NoiseGeneratorOctaves(this.rand, 16);
this.mainPerlinNoise = new NoiseGeneratorOctaves(this.rand, 8);
this.surfaceNoise = new NoiseGeneratorPerlin(this.rand, 4);
this.scaleNoise = new NoiseGeneratorOctaves(this.rand, 10);
this.depthNoise = new NoiseGeneratorOctaves(this.rand, 16);
this.forestNoise = new NoiseGeneratorOctaves(this.rand, 8);
this.heightMap = new double[825];
this.biomeWeights = new float[25];
for (int i = -2; i <= 2; ++i)
{
for (int j = -2; j <= 2; ++j)
{
float f = 10.0F / MathHelper.sqrt_float((float)(i * i + j * j) + 0.2F);
this.biomeWeights[i + 2 + (j + 2) * 5] = f;
}
}
if (p_i46668_5_ != null)
{
this.settings = ChunkProviderSettings.Factory.jsonToFactory(p_i46668_5_).build();
this.oceanBlock = this.settings.useLavaOceans ? Blocks.LAVA.getDefaultState() : Blocks.WATER.getDefaultState();
worldIn.setSeaLevel(this.settings.seaLevel);
}
net.minecraftforge.event.terraingen.InitNoiseGensEvent.ContextOverworld ctx =
new net.minecraftforge.event.terraingen.InitNoiseGensEvent.ContextOverworld(minLimitPerlinNoise, maxLimitPerlinNoise, mainPerlinNoise, surfaceNoise, scaleNoise, depthNoise, forestNoise);
ctx = net.minecraftforge.event.terraingen.TerrainGen.getModdedNoiseGenerators(worldIn, this.rand, ctx);
this.minLimitPerlinNoise = ctx.getLPerlin1();
this.maxLimitPerlinNoise = ctx.getLPerlin2();
this.mainPerlinNoise = ctx.getPerlin();
this.surfaceNoise = ctx.getHeight();
this.scaleNoise = ctx.getScale();
this.depthNoise = ctx.getDepth();
this.forestNoise = ctx.getForest();
}
示例11: MapGenStrongholdDeadzone
import net.minecraft.world.gen.structure.MapGenStronghold; //导入依赖的package包/类
public MapGenStrongholdDeadzone(MapGenStronghold base) {
this.childGen = base;
}
示例12: ChunkProviderFlat
import net.minecraft.world.gen.structure.MapGenStronghold; //导入依赖的package包/类
public ChunkProviderFlat(World par1World, long par2, boolean par4, String par5Str)
{
this.worldObj = par1World;
this.random = new Random(par2);
this.flatWorldGenInfo = FlatGeneratorInfo.createFlatGeneratorFromString(par5Str);
if (par4)
{
Map var6 = this.flatWorldGenInfo.getWorldFeatures();
if (var6.containsKey("village"))
{
Map var7 = (Map)var6.get("village");
if (!var7.containsKey("size"))
{
var7.put("size", "1");
}
this.structureGenerators.add(new MapGenVillage(var7));
}
if (var6.containsKey("biome_1"))
{
this.structureGenerators.add(new MapGenScatteredFeature((Map)var6.get("biome_1")));
}
if (var6.containsKey("mineshaft"))
{
this.structureGenerators.add(new MapGenMineshaft((Map)var6.get("mineshaft")));
}
if (var6.containsKey("stronghold"))
{
this.structureGenerators.add(new MapGenStronghold((Map)var6.get("stronghold")));
}
}
this.hasDecoration = this.flatWorldGenInfo.getWorldFeatures().containsKey("decoration");
if (this.flatWorldGenInfo.getWorldFeatures().containsKey("lake"))
{
this.waterLakeGenerator = new WorldGenLakes(Blocks.water);
}
if (this.flatWorldGenInfo.getWorldFeatures().containsKey("lava_lake"))
{
this.lavaLakeGenerator = new WorldGenLakes(Blocks.lava);
}
this.hasDungeons = this.flatWorldGenInfo.getWorldFeatures().containsKey("dungeon");
Iterator var9 = this.flatWorldGenInfo.getFlatLayers().iterator();
while (var9.hasNext())
{
FlatLayerInfo var10 = (FlatLayerInfo)var9.next();
for (int var8 = var10.getMinY(); var8 < var10.getMinY() + var10.getLayerCount(); ++var8)
{
this.cachedBlockIDs[var8] = var10.func_151536_b();
this.cachedBlockMetadata[var8] = (byte)var10.getFillBlockMeta();
}
}
}
示例13: ChunkProviderFlat
import net.minecraft.world.gen.structure.MapGenStronghold; //导入依赖的package包/类
public ChunkProviderFlat(World p_i2004_1_, long p_i2004_2_, boolean p_i2004_4_, String p_i2004_5_)
{
this.worldObj = p_i2004_1_;
this.random = new Random(p_i2004_2_);
this.flatWorldGenInfo = FlatGeneratorInfo.createFlatGeneratorFromString(p_i2004_5_);
if (p_i2004_4_)
{
Map map = this.flatWorldGenInfo.getWorldFeatures();
if (map.containsKey("village"))
{
Map map1 = (Map)map.get("village");
if (!map1.containsKey("size"))
{
map1.put("size", "1");
}
this.structureGenerators.add(new MapGenVillage(map1));
}
if (map.containsKey("biome_1"))
{
this.structureGenerators.add(new MapGenScatteredFeature((Map)map.get("biome_1")));
}
if (map.containsKey("mineshaft"))
{
this.structureGenerators.add(new MapGenMineshaft((Map)map.get("mineshaft")));
}
if (map.containsKey("stronghold"))
{
this.structureGenerators.add(new MapGenStronghold((Map)map.get("stronghold")));
}
}
this.hasDecoration = this.flatWorldGenInfo.getWorldFeatures().containsKey("decoration");
if (this.flatWorldGenInfo.getWorldFeatures().containsKey("lake"))
{
this.waterLakeGenerator = new WorldGenLakes(Blocks.water);
}
if (this.flatWorldGenInfo.getWorldFeatures().containsKey("lava_lake"))
{
this.lavaLakeGenerator = new WorldGenLakes(Blocks.lava);
}
this.hasDungeons = this.flatWorldGenInfo.getWorldFeatures().containsKey("dungeon");
Iterator iterator = this.flatWorldGenInfo.getFlatLayers().iterator();
while (iterator.hasNext())
{
FlatLayerInfo flatlayerinfo = (FlatLayerInfo)iterator.next();
for (int j = flatlayerinfo.getMinY(); j < flatlayerinfo.getMinY() + flatlayerinfo.getLayerCount(); ++j)
{
this.cachedBlockIDs[j] = flatlayerinfo.func_151536_b();
this.cachedBlockMetadata[j] = (byte)flatlayerinfo.getFillBlockMeta();
}
}
}
示例14: ChunkProviderFlat
import net.minecraft.world.gen.structure.MapGenStronghold; //导入依赖的package包/类
public ChunkProviderFlat(World p_i2004_1_, long p_i2004_2_, boolean p_i2004_4_, String p_i2004_5_) {
this.field_73163_a = p_i2004_1_;
this.field_73161_b = new Random(p_i2004_2_);
this.field_82699_e = FlatGeneratorInfo.func_82651_a(p_i2004_5_);
if(p_i2004_4_) {
Map var6 = this.field_82699_e.func_82644_b();
if(var6.containsKey("village")) {
Map var7 = (Map)var6.get("village");
if(!var7.containsKey("size")) {
var7.put("size", "1");
}
this.field_82696_f.add(new MapGenVillage(var7));
}
if(var6.containsKey("biome_1")) {
this.field_82696_f.add(new MapGenScatteredFeature((Map)var6.get("biome_1")));
}
if(var6.containsKey("mineshaft")) {
this.field_82696_f.add(new MapGenMineshaft((Map)var6.get("mineshaft")));
}
if(var6.containsKey("stronghold")) {
this.field_82696_f.add(new MapGenStronghold((Map)var6.get("stronghold")));
}
}
this.field_82697_g = this.field_82699_e.func_82644_b().containsKey("decoration");
if(this.field_82699_e.func_82644_b().containsKey("lake")) {
this.field_82703_i = new WorldGenLakes(Block.field_71943_B.field_71990_ca);
}
if(this.field_82699_e.func_82644_b().containsKey("lava_lake")) {
this.field_82701_j = new WorldGenLakes(Block.field_71938_D.field_71990_ca);
}
this.field_82702_h = this.field_82699_e.func_82644_b().containsKey("dungeon");
Iterator var9 = this.field_82699_e.func_82650_c().iterator();
while(var9.hasNext()) {
FlatLayerInfo var10 = (FlatLayerInfo)var9.next();
for(int var8 = var10.func_82656_d(); var8 < var10.func_82656_d() + var10.func_82657_a(); ++var8) {
this.field_82700_c[var8] = (byte)(var10.func_82659_b() & 255);
this.field_82698_d[var8] = (byte)var10.func_82658_c();
}
}
}
示例15: ChunkProviderFlat
import net.minecraft.world.gen.structure.MapGenStronghold; //导入依赖的package包/类
public ChunkProviderFlat(World par1World, long par2, boolean par4, String par5Str)
{
this.worldObj = par1World;
this.random = new Random(par2);
this.flatWorldGenInfo = FlatGeneratorInfo.createFlatGeneratorFromString(par5Str);
if (par4)
{
Map map = this.flatWorldGenInfo.getWorldFeatures();
if (map.containsKey("village"))
{
Map map1 = (Map)map.get("village");
if (!map1.containsKey("size"))
{
map1.put("size", "1");
}
this.structureGenerators.add(new MapGenVillage(map1));
}
if (map.containsKey("biome_1"))
{
this.structureGenerators.add(new MapGenScatteredFeature((Map)map.get("biome_1")));
}
if (map.containsKey("mineshaft"))
{
this.structureGenerators.add(new MapGenMineshaft((Map)map.get("mineshaft")));
}
if (map.containsKey("stronghold"))
{
this.structureGenerators.add(new MapGenStronghold((Map)map.get("stronghold")));
}
}
this.hasDecoration = this.flatWorldGenInfo.getWorldFeatures().containsKey("decoration");
if (this.flatWorldGenInfo.getWorldFeatures().containsKey("lake"))
{
this.waterLakeGenerator = new WorldGenLakes(Block.waterStill.blockID);
}
if (this.flatWorldGenInfo.getWorldFeatures().containsKey("lava_lake"))
{
this.lavaLakeGenerator = new WorldGenLakes(Block.lavaStill.blockID);
}
this.hasDungeons = this.flatWorldGenInfo.getWorldFeatures().containsKey("dungeon");
Iterator iterator = this.flatWorldGenInfo.getFlatLayers().iterator();
while (iterator.hasNext())
{
FlatLayerInfo flatlayerinfo = (FlatLayerInfo)iterator.next();
for (int j = flatlayerinfo.getMinY(); j < flatlayerinfo.getMinY() + flatlayerinfo.getLayerCount(); ++j)
{
this.cachedBlockIDs[j] = (byte)(flatlayerinfo.getFillBlock() & 255);
this.cachedBlockMetadata[j] = (byte)flatlayerinfo.getFillBlockMeta();
}
}
}