本文整理汇总了Java中net.minecraft.world.gen.FlatGeneratorInfo类的典型用法代码示例。如果您正苦于以下问题:Java FlatGeneratorInfo类的具体用法?Java FlatGeneratorInfo怎么用?Java FlatGeneratorInfo使用的例子?那么, 这里精选的类代码示例或许可以为您提供帮助。
FlatGeneratorInfo类属于net.minecraft.world.gen包,在下文中一共展示了FlatGeneratorInfo类的15个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于系统推荐出更棒的Java代码示例。
示例1: registerWorldChunkManager
import net.minecraft.world.gen.FlatGeneratorInfo; //导入依赖的package包/类
/**
* creates a new world chunk manager for WorldProvider
*/
protected void registerWorldChunkManager()
{
WorldType worldtype = this.worldObj.getWorldInfo().getTerrainType();
if (worldtype == WorldType.FLAT)
{
FlatGeneratorInfo flatgeneratorinfo = FlatGeneratorInfo.createFlatGeneratorFromString(this.worldObj.getWorldInfo().getGeneratorOptions());
this.worldChunkMgr = new WorldChunkManagerHell(BiomeGenBase.getBiomeFromBiomeList(flatgeneratorinfo.getBiome(), BiomeGenBase.field_180279_ad), 0.5F);
}
else if (worldtype == WorldType.DEBUG_WORLD)
{
this.worldChunkMgr = new WorldChunkManagerHell(BiomeGenBase.plains, 0.0F);
}
else
{
this.worldChunkMgr = new WorldChunkManager(this.worldObj);
}
}
示例2: func_175354_a
import net.minecraft.world.gen.FlatGeneratorInfo; //导入依赖的package包/类
private static void func_175354_a(String p_175354_0_, Item p_175354_1_, int p_175354_2_, BiomeGenBase p_175354_3_, List<String> p_175354_4_, FlatLayerInfo... p_175354_5_)
{
FlatGeneratorInfo flatgeneratorinfo = new FlatGeneratorInfo();
for (int i = p_175354_5_.length - 1; i >= 0; --i)
{
flatgeneratorinfo.getFlatLayers().add(p_175354_5_[i]);
}
flatgeneratorinfo.setBiome(p_175354_3_.biomeID);
flatgeneratorinfo.func_82645_d();
if (p_175354_4_ != null)
{
for (String s : p_175354_4_)
{
flatgeneratorinfo.getWorldFeatures().put(s, Maps.<String, String>newHashMap());
}
}
FLAT_WORLD_PRESETS.add(new GuiFlatPresets.LayerItem(p_175354_1_, p_175354_2_, p_175354_0_, flatgeneratorinfo.toString()));
}
示例3: createBiomeProvider
import net.minecraft.world.gen.FlatGeneratorInfo; //导入依赖的package包/类
/**
* creates a new world chunk manager for WorldProvider
*/
protected void createBiomeProvider()
{
this.field_191067_f = true;
WorldType worldtype = this.worldObj.getWorldInfo().getTerrainType();
if (worldtype == WorldType.FLAT)
{
FlatGeneratorInfo flatgeneratorinfo = FlatGeneratorInfo.createFlatGeneratorFromString(this.worldObj.getWorldInfo().getGeneratorOptions());
this.biomeProvider = new BiomeProviderSingle(Biome.getBiome(flatgeneratorinfo.getBiome(), Biomes.DEFAULT));
}
else if (worldtype == WorldType.DEBUG_WORLD)
{
this.biomeProvider = new BiomeProviderSingle(Biomes.PLAINS);
}
else
{
this.biomeProvider = new BiomeProvider(this.worldObj.getWorldInfo());
}
}
示例4: registerPreset
import net.minecraft.world.gen.FlatGeneratorInfo; //导入依赖的package包/类
private static void registerPreset(String name, Item icon, int iconMetadata, Biome biome, List<String> features, FlatLayerInfo... layers)
{
FlatGeneratorInfo flatgeneratorinfo = new FlatGeneratorInfo();
for (int i = layers.length - 1; i >= 0; --i)
{
flatgeneratorinfo.getFlatLayers().add(layers[i]);
}
flatgeneratorinfo.setBiome(Biome.getIdForBiome(biome));
flatgeneratorinfo.updateLayers();
for (String s : features)
{
flatgeneratorinfo.getWorldFeatures().put(s, Maps.<String, String>newHashMap());
}
FLAT_WORLD_PRESETS.add(new GuiFlatPresets.LayerItem(icon, iconMetadata, name, flatgeneratorinfo.toString()));
}
示例5: registerPreset
import net.minecraft.world.gen.FlatGeneratorInfo; //导入依赖的package包/类
private static void registerPreset(String name, Item icon, int iconMetadata, Biome biome, @Nullable List<String> features, FlatLayerInfo... layers)
{
FlatGeneratorInfo flatgeneratorinfo = new FlatGeneratorInfo();
for (int i = layers.length - 1; i >= 0; --i)
{
flatgeneratorinfo.getFlatLayers().add(layers[i]);
}
flatgeneratorinfo.setBiome(Biome.getIdForBiome(biome));
flatgeneratorinfo.updateLayers();
if (features != null)
{
for (String s : features)
{
flatgeneratorinfo.getWorldFeatures().put(s, Maps.<String, String>newHashMap());
}
}
FLAT_WORLD_PRESETS.add(new GuiFlatPresets.LayerItem(icon, iconMetadata, name, flatgeneratorinfo.toString()));
}
示例6: registerPreset
import net.minecraft.world.gen.FlatGeneratorInfo; //导入依赖的package包/类
private static void registerPreset(String name, Item icon, int iconMetadata, Biome biome, List<String> features, FlatLayerInfo... layers)
{
FlatGeneratorInfo flatgeneratorinfo = new FlatGeneratorInfo();
for (int i = layers.length - 1; i >= 0; --i)
{
flatgeneratorinfo.getFlatLayers().add(layers[i]);
}
flatgeneratorinfo.setBiome(Biome.getIdForBiome(biome));
flatgeneratorinfo.updateLayers();
if (features != null)
{
for (String s : features)
{
flatgeneratorinfo.getWorldFeatures().put(s, Maps.<String, String>newHashMap());
}
}
FLAT_WORLD_PRESETS.add(new GuiFlatDimensionPresets.LayerItem(icon, iconMetadata, name, flatgeneratorinfo.toString()));
}
示例7: func_146421_a
import net.minecraft.world.gen.FlatGeneratorInfo; //导入依赖的package包/类
private static void func_146421_a(String p_146421_0_, Item p_146421_1_, BiomeGenBase p_146421_2_, List p_146421_3_, FlatLayerInfo ... p_146421_4_)
{
FlatGeneratorInfo var5 = new FlatGeneratorInfo();
for (int var6 = p_146421_4_.length - 1; var6 >= 0; --var6)
{
var5.getFlatLayers().add(p_146421_4_[var6]);
}
var5.setBiome(p_146421_2_.biomeID);
var5.func_82645_d();
if (p_146421_3_ != null)
{
Iterator var8 = p_146421_3_.iterator();
while (var8.hasNext())
{
String var7 = (String)var8.next();
var5.getWorldFeatures().put(var7, new HashMap());
}
}
field_146431_f.add(new GuiFlatPresets.LayerItem(p_146421_1_, p_146421_0_, var5.toString()));
}
示例8: func_146421_a
import net.minecraft.world.gen.FlatGeneratorInfo; //导入依赖的package包/类
private static void func_146421_a(String p_146421_0_, Item p_146421_1_, BiomeGenBase p_146421_2_, List p_146421_3_, FlatLayerInfo ... p_146421_4_)
{
FlatGeneratorInfo flatgeneratorinfo = new FlatGeneratorInfo();
for (int i = p_146421_4_.length - 1; i >= 0; --i)
{
flatgeneratorinfo.getFlatLayers().add(p_146421_4_[i]);
}
flatgeneratorinfo.setBiome(p_146421_2_.biomeID);
flatgeneratorinfo.func_82645_d();
if (p_146421_3_ != null)
{
Iterator iterator = p_146421_3_.iterator();
while (iterator.hasNext())
{
String s1 = (String)iterator.next();
flatgeneratorinfo.getWorldFeatures().put(s1, new HashMap());
}
}
field_146431_f.add(new GuiFlatPresets.LayerItem(p_146421_1_, p_146421_0_, flatgeneratorinfo.toString()));
}
示例9: func_82294_a
import net.minecraft.world.gen.FlatGeneratorInfo; //导入依赖的package包/类
public static void func_82294_a(String p_82294_0_, int p_82294_1_, BiomeGenBase p_82294_2_, List p_82294_3_, FlatLayerInfo ... p_82294_4_) {
FlatGeneratorInfo var5 = new FlatGeneratorInfo();
for(int var6 = p_82294_4_.length - 1; var6 >= 0; --var6) {
var5.func_82650_c().add(p_82294_4_[var6]);
}
var5.func_82647_a(p_82294_2_.field_76756_M);
var5.func_82645_d();
if(p_82294_3_ != null) {
Iterator var8 = p_82294_3_.iterator();
while(var8.hasNext()) {
String var7 = (String)var8.next();
var5.func_82644_b().put(var7, new HashMap());
}
}
field_82301_b.add(new GuiFlatPresetsItem(p_82294_1_, p_82294_0_, var5.toString()));
}
示例10: addPreset
import net.minecraft.world.gen.FlatGeneratorInfo; //导入依赖的package包/类
/**
* Add a flat world preset.
*/
public static void addPreset(String par0Str, int par1, BiomeGenBase par2BiomeGenBase, List par3List, FlatLayerInfo ... par4ArrayOfFlatLayerInfo)
{
FlatGeneratorInfo flatgeneratorinfo = new FlatGeneratorInfo();
for (int j = par4ArrayOfFlatLayerInfo.length - 1; j >= 0; --j)
{
flatgeneratorinfo.getFlatLayers().add(par4ArrayOfFlatLayerInfo[j]);
}
flatgeneratorinfo.setBiome(par2BiomeGenBase.biomeID);
flatgeneratorinfo.func_82645_d();
if (par3List != null)
{
Iterator iterator = par3List.iterator();
while (iterator.hasNext())
{
String s1 = (String)iterator.next();
flatgeneratorinfo.getWorldFeatures().put(s1, new HashMap());
}
}
presets.add(new GuiFlatPresetsItem(par1, par0Str, flatgeneratorinfo.toString()));
}
示例11: registerWorldChunkManager
import net.minecraft.world.gen.FlatGeneratorInfo; //导入依赖的package包/类
/**
* creates a new world chunk manager for WorldProvider
*/
protected void registerWorldChunkManager()
{
if (this.worldObj.getWorldInfo().getTerrainType() == WorldType.FLAT)
{
FlatGeneratorInfo var1 = FlatGeneratorInfo.createFlatGeneratorFromString(this.worldObj.getWorldInfo().getGeneratorOptions());
this.worldChunkMgr = new WorldChunkManagerHell(BiomeGenBase.func_150568_d(var1.getBiome()), 0.5F);
}
else
{
this.worldChunkMgr = new WorldChunkManager(this.worldObj);
}
}
示例12: getChunkManager
import net.minecraft.world.gen.FlatGeneratorInfo; //导入依赖的package包/类
public WorldChunkManager getChunkManager(World world)
{
if (this == FLAT)
{
FlatGeneratorInfo flatgeneratorinfo = FlatGeneratorInfo.createFlatGeneratorFromString(world.getWorldInfo().getGeneratorOptions());
return new WorldChunkManagerHell(BiomeGenBase.getBiome(flatgeneratorinfo.getBiome()), 0.5F);
}
else
{
return new WorldChunkManager(world);
}
}
示例13: func_76572_b
import net.minecraft.world.gen.FlatGeneratorInfo; //导入依赖的package包/类
protected void func_76572_b() {
if(this.field_76579_a.func_72912_H().func_76067_t() == WorldType.field_77138_c) {
FlatGeneratorInfo var1 = FlatGeneratorInfo.func_82651_a(this.field_76579_a.func_72912_H().func_82571_y());
this.field_76578_c = new WorldChunkManagerHell(BiomeGenBase.field_76773_a[var1.func_82648_a()], 0.5F, 0.5F);
} else {
this.field_76578_c = new WorldChunkManager(this.field_76579_a);
}
}
示例14: func_146383_a
import net.minecraft.world.gen.FlatGeneratorInfo; //导入依赖的package包/类
public void func_146383_a(String p_146383_1_)
{
this.theFlatGeneratorInfo = FlatGeneratorInfo.createFlatGeneratorFromString(p_146383_1_);
}
示例15: setPreset
import net.minecraft.world.gen.FlatGeneratorInfo; //导入依赖的package包/类
/**
* Sets the superflat preset. Invalid or null values will result in the default superflat preset being used.
*/
public void setPreset(String preset)
{
this.theFlatGeneratorInfo = FlatGeneratorInfo.createFlatGeneratorFromString(preset);
}