本文整理汇总了Java中net.minecraft.world.gen.NoiseGenerator类的典型用法代码示例。如果您正苦于以下问题:Java NoiseGenerator类的具体用法?Java NoiseGenerator怎么用?Java NoiseGenerator使用的例子?那么, 这里精选的类代码示例或许可以为您提供帮助。
NoiseGenerator类属于net.minecraft.world.gen包,在下文中一共展示了NoiseGenerator类的15个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于系统推荐出更棒的Java代码示例。
示例1: injectNoiseSmoothers
import net.minecraft.world.gen.NoiseGenerator; //导入依赖的package包/类
@SubscribeEvent
public void injectNoiseSmoothers(InitNoiseGensEvent event) {
// Create a flat arena around colossi.
if (!genOnWorld(event.world)) return;
int[] target_noises = new int[] { 0, 1, 2, 5 };
int max = target_noises[0];
for (int i : target_noises) max = Math.max(max, i);
if (event.newNoiseGens == null || max >= event.newNoiseGens.length) {
Core.logWarning("Colossi will not generate in dimension: " + event.world.provider.getDimensionId());
dimensionBlacklist.put(event.world.provider.getDimensionId(), (byte) 1);
return;
}
for (int noise_index : target_noises) {
NoiseGenerator parentGenerator = event.newNoiseGens[noise_index];
event.newNoiseGens[noise_index] = new SmoothNoiseNearColossi(noise_index, (NoiseGeneratorOctaves) parentGenerator);
}
}
示例2: ChunkProviderCustomHell
import net.minecraft.world.gen.NoiseGenerator; //导入依赖的package包/类
public ChunkProviderCustomHell(World par1World, long par2)
{
this.worldObj = par1World;
this.hellRNG = new Random(par2);
this.netherNoiseGen1 = new NoiseGeneratorOctaves(this.hellRNG, 16);
this.netherNoiseGen2 = new NoiseGeneratorOctaves(this.hellRNG, 16);
this.netherNoiseGen3 = new NoiseGeneratorOctaves(this.hellRNG, 8);
this.slowsandGravelNoiseGen = new NoiseGeneratorOctaves(this.hellRNG, 4);
this.netherrackExculsivityNoiseGen = new NoiseGeneratorOctaves(this.hellRNG, 4);
this.netherNoiseGen6 = new NoiseGeneratorOctaves(this.hellRNG, 10);
this.netherNoiseGen7 = new NoiseGeneratorOctaves(this.hellRNG, 16);
NoiseGenerator[] noiseGens = {netherNoiseGen1, netherNoiseGen2, netherNoiseGen3, slowsandGravelNoiseGen, netherrackExculsivityNoiseGen, netherNoiseGen6, netherNoiseGen7};
noiseGens = TerrainGen.getModdedNoiseGenerators(par1World, this.hellRNG, noiseGens);
this.netherNoiseGen1 = (NoiseGeneratorOctaves)noiseGens[0];
this.netherNoiseGen2 = (NoiseGeneratorOctaves)noiseGens[1];
this.netherNoiseGen3 = (NoiseGeneratorOctaves)noiseGens[2];
this.slowsandGravelNoiseGen = (NoiseGeneratorOctaves)noiseGens[3];
this.netherrackExculsivityNoiseGen = (NoiseGeneratorOctaves)noiseGens[4];
this.netherNoiseGen6 = (NoiseGeneratorOctaves)noiseGens[5];
this.netherNoiseGen7 = (NoiseGeneratorOctaves)noiseGens[6];
}
示例3: IceSectorChunkProvider
import net.minecraft.world.gen.NoiseGenerator; //导入依赖的package包/类
public IceSectorChunkProvider(World world, long worldSeed)
{
this.world = world;
this.random = new Random(worldSeed);
this.noiseGen1 = new NoiseGeneratorOctaves(this.random, 16);
this.noiseGen2 = new NoiseGeneratorOctaves(this.random, 16);
this.noiseGen3 = new NoiseGeneratorOctaves(this.random, 8);
this.noiseGen4 = new NoiseGeneratorOctaves(this.random, 10);
this.noiseGen5 = new NoiseGeneratorOctaves(this.random, 16);
NoiseGenerator[] noiseGens = {noiseGen1, noiseGen2, noiseGen3, noiseGen4, noiseGen5};
noiseGens = TerrainGen.getModdedNoiseGenerators(world, this.random, noiseGens);
this.noiseGen1 = (NoiseGeneratorOctaves) noiseGens[0];
this.noiseGen2 = (NoiseGeneratorOctaves) noiseGens[1];
this.noiseGen3 = (NoiseGeneratorOctaves) noiseGens[2];
this.noiseGen4 = (NoiseGeneratorOctaves) noiseGens[3];
this.noiseGen5 = (NoiseGeneratorOctaves) noiseGens[4];
}
示例4: ChunkProviderXthuoth
import net.minecraft.world.gen.NoiseGenerator; //导入依赖的package包/类
public ChunkProviderXthuoth(World world, long seed) {
this.world = world;
xarRNG = new Random(seed);
this.netherNoiseGen1 = new NoiseGeneratorOctaves(this.xarRNG, 16);
this.netherNoiseGen2 = new NoiseGeneratorOctaves(this.xarRNG, 16);
this.netherNoiseGen3 = new NoiseGeneratorOctaves(this.xarRNG, 8);
this.netherNoiseGen6 = new NoiseGeneratorOctaves(this.xarRNG, 10);
this.netherNoiseGen7 = new NoiseGeneratorOctaves(this.xarRNG, 16);
NoiseGenerator[] noiseGens = {netherNoiseGen1, netherNoiseGen2, netherNoiseGen3, netherNoiseGen6, netherNoiseGen7};
noiseGens = TerrainGen.getModdedNoiseGenerators(world, this.xarRNG, noiseGens);
this.netherNoiseGen1 = noiseGens[0];
this.netherNoiseGen2 = noiseGens[1];
this.netherNoiseGen3 = noiseGens[2];
this.netherNoiseGen6 = noiseGens[3];
this.netherNoiseGen7 = noiseGens[4];
}
示例5: OldChunkProviderMarona
import net.minecraft.world.gen.NoiseGenerator; //导入依赖的package包/类
public OldChunkProviderMarona(World par1World, long par2, boolean b)
{
this.worldObj = par1World;
this.soulRNG = new Random(par2);
this.netherNoiseGen1 = new NoiseGeneratorOctaves(this.soulRNG, 16);
this.netherNoiseGen2 = new NoiseGeneratorOctaves(this.soulRNG, 16);
this.netherNoiseGen3 = new NoiseGeneratorOctaves(this.soulRNG, 8);
this.lateriteGrassPorphyryNoise = new NoiseGeneratorOctaves(this.soulRNG, 4);
this.porphyryExclusivityNoiseGen = new NoiseGeneratorOctaves(this.soulRNG, 4);
this.netherNoiseGen6 = new NoiseGeneratorOctaves(this.soulRNG, 10);
this.netherNoiseGen7 = new NoiseGeneratorOctaves(this.soulRNG, 16);
this.mobSpawnerNoise = new NoiseGeneratorOctaves(this.soulRNG, 8);
NoiseGenerator[] noiseGens = {netherNoiseGen1, netherNoiseGen2, netherNoiseGen3, lateriteGrassPorphyryNoise, porphyryExclusivityNoiseGen, netherNoiseGen6, netherNoiseGen7, mobSpawnerNoise};
noiseGens = TerrainGen.getModdedNoiseGenerators(par1World, this.soulRNG, noiseGens);
this.netherNoiseGen1 = (NoiseGeneratorOctaves) noiseGens[0];
this.netherNoiseGen2 = (NoiseGeneratorOctaves) noiseGens[1];
this.netherNoiseGen3 = (NoiseGeneratorOctaves) noiseGens[2];
this.lateriteGrassPorphyryNoise = (NoiseGeneratorOctaves) noiseGens[3];
this.porphyryExclusivityNoiseGen = (NoiseGeneratorOctaves) noiseGens[4];
this.netherNoiseGen6 = (NoiseGeneratorOctaves) noiseGens[5];
this.netherNoiseGen7 = (NoiseGeneratorOctaves) noiseGens[6];
this.mobSpawnerNoise = (NoiseGeneratorOctaves) noiseGens[7];
}
示例6: ChunkProviderFrozenHearth
import net.minecraft.world.gen.NoiseGenerator; //导入依赖的package包/类
public ChunkProviderFrozenHearth(World p_i2005_1_, long p_i2005_2_){
this.worldObj = p_i2005_1_;
this.frozenRNG = new Random(p_i2005_2_);
this.netherNoiseGen1 = new NoiseGeneratorOctaves(this.frozenRNG, 16);
this.netherNoiseGen2 = new NoiseGeneratorOctaves(this.frozenRNG, 16);
this.netherNoiseGen3 = new NoiseGeneratorOctaves(this.frozenRNG, 8);
this.lateriteGrassPorphyryNoise = new NoiseGeneratorOctaves(this.frozenRNG, 4);
this.porphyryExclusivityNoiseGen = new NoiseGeneratorOctaves(this.frozenRNG, 4);
this.netherNoiseGen6 = new NoiseGeneratorOctaves(this.frozenRNG, 10);
this.netherNoiseGen7 = new NoiseGeneratorOctaves(this.frozenRNG, 16);
NoiseGenerator[] noiseGens = {netherNoiseGen1, netherNoiseGen2, netherNoiseGen3, lateriteGrassPorphyryNoise, porphyryExclusivityNoiseGen, netherNoiseGen6, netherNoiseGen7};
noiseGens = TerrainGen.getModdedNoiseGenerators(p_i2005_1_, this.frozenRNG, noiseGens);
this.netherNoiseGen1 = (NoiseGeneratorOctaves)noiseGens[0];
this.netherNoiseGen2 = (NoiseGeneratorOctaves)noiseGens[1];
this.netherNoiseGen3 = (NoiseGeneratorOctaves)noiseGens[2];
this.lateriteGrassPorphyryNoise = (NoiseGeneratorOctaves)noiseGens[3];
this.porphyryExclusivityNoiseGen = (NoiseGeneratorOctaves)noiseGens[4];
this.netherNoiseGen6 = (NoiseGeneratorOctaves)noiseGens[5];
this.netherNoiseGen7 = (NoiseGeneratorOctaves)noiseGens[6];
}
示例7: ChunkProviderSoulForest
import net.minecraft.world.gen.NoiseGenerator; //导入依赖的package包/类
public ChunkProviderSoulForest(World p_i2005_1_, long p_i2005_2_){
this.worldObj = p_i2005_1_;
this.soulRNG = new Random(p_i2005_2_);
this.netherNoiseGen1 = new NoiseGeneratorOctaves(this.soulRNG, 16);
this.netherNoiseGen2 = new NoiseGeneratorOctaves(this.soulRNG, 16);
this.netherNoiseGen3 = new NoiseGeneratorOctaves(this.soulRNG, 8);
this.lateriteGrassPorphyryNoise = new NoiseGeneratorOctaves(this.soulRNG, 4);
this.porphyryExclusivityNoiseGen = new NoiseGeneratorOctaves(this.soulRNG, 4);
this.netherNoiseGen6 = new NoiseGeneratorOctaves(this.soulRNG, 10);
this.netherNoiseGen7 = new NoiseGeneratorOctaves(this.soulRNG, 16);
NoiseGenerator[] noiseGens = {netherNoiseGen1, netherNoiseGen2, netherNoiseGen3, lateriteGrassPorphyryNoise, porphyryExclusivityNoiseGen, netherNoiseGen6, netherNoiseGen7};
noiseGens = TerrainGen.getModdedNoiseGenerators(p_i2005_1_, this.soulRNG, noiseGens);
this.netherNoiseGen1 = (NoiseGeneratorOctaves)noiseGens[0];
this.netherNoiseGen2 = (NoiseGeneratorOctaves)noiseGens[1];
this.netherNoiseGen3 = (NoiseGeneratorOctaves)noiseGens[2];
this.lateriteGrassPorphyryNoise = (NoiseGeneratorOctaves)noiseGens[3];
this.porphyryExclusivityNoiseGen = (NoiseGeneratorOctaves)noiseGens[4];
this.netherNoiseGen6 = (NoiseGeneratorOctaves)noiseGens[5];
this.netherNoiseGen7 = (NoiseGeneratorOctaves)noiseGens[6];
}
示例8: InitNoiseGensEvent
import net.minecraft.world.gen.NoiseGenerator; //导入依赖的package包/类
public InitNoiseGensEvent(World world, Random rand, NoiseGenerator[] original)
{
super(world);
this.rand = rand;
originalNoiseGens = original;
newNoiseGens = original.clone();
}
示例9: ChunkProviderOcean
import net.minecraft.world.gen.NoiseGenerator; //导入依赖的package包/类
public ChunkProviderOcean(World par1World, long par2, boolean par4) {
this.worldObj = par1World;
this.mapFeaturesEnabled = par4;
this.field_147435_p = par1World.getWorldInfo().getTerrainType();
this.rand = new Random(par2);
this.field_147431_j = new NoiseGeneratorOctaves(this.rand, 16);
this.field_147432_k = new NoiseGeneratorOctaves(this.rand, 16);
this.field_147429_l = new NoiseGeneratorOctaves(this.rand, 8);
this.field_147430_m = new NoiseGeneratorPerlin(this.rand, 4);
this.noiseGen5 = new NoiseGeneratorOctaves(this.rand, 10);
this.noiseGen6 = new NoiseGeneratorOctaves(this.rand, 16);
this.mobSpawnerNoise = new NoiseGeneratorOctaves(this.rand, 8);
this.field_147434_q = new double[825];
this.parabolicField = new float[25];
for (int j = -2; j <= 2; ++j) {
for (int k = -2; k <= 2; ++k) {
float f = 10.0F / MathHelper.sqrt_float(j * j + k * k + 0.2F);
this.parabolicField[(j + 2 + (k + 2) * 5)] = f;
}
}
NoiseGenerator[] noiseGens = { this.field_147431_j, this.field_147432_k, this.field_147429_l, this.field_147430_m, this.noiseGen5, this.noiseGen6, this.mobSpawnerNoise };
noiseGens = TerrainGen.getModdedNoiseGenerators(par1World, this.rand, noiseGens);
this.field_147431_j = ((NoiseGeneratorOctaves) noiseGens[0]);
this.field_147432_k = ((NoiseGeneratorOctaves) noiseGens[1]);
this.field_147429_l = ((NoiseGeneratorOctaves) noiseGens[2]);
this.field_147430_m = ((NoiseGeneratorPerlin) noiseGens[3]);
this.noiseGen5 = ((NoiseGeneratorOctaves) noiseGens[4]);
this.noiseGen6 = ((NoiseGeneratorOctaves) noiseGens[5]);
this.mobSpawnerNoise = ((NoiseGeneratorOctaves) noiseGens[6]);
}
示例10: ChunkProviderEpic
import net.minecraft.world.gen.NoiseGenerator; //导入依赖的package包/类
public ChunkProviderEpic(World world, long seed, boolean mapFeaturesEnabled)
{
GameLogHelper.writeToLog(Level.INFO, "Loading Chunk Provider for dmension.");
this.worldObj = world;
this.mapFeaturesEnabled = mapFeaturesEnabled;
this.worldType = world.getWorldInfo().getTerrainType();
this.rand = new Random(seed);
this.noiseGen1 = new NoiseGeneratorOctaves(this.rand, 16);
this.noiseGen2 = new NoiseGeneratorOctaves(this.rand, 16);
this.noiseGen3 = new NoiseGeneratorOctaves(this.rand, 8);
this.noisePerl = new NoiseGeneratorPerlin(this.rand, 4);
this.noiseGen5 = new NoiseGeneratorOctaves(this.rand, 10);
this.noiseGen6 = new NoiseGeneratorOctaves(this.rand, 16);
this.mobSpawnerNoise = new NoiseGeneratorOctaves(this.rand, 8);
this.noiseArray = new double[825];
this.parabolicField = new float[25];
for (int j = -2; j <= 2; ++j) {
for (int k = -2; k <= 2; ++k) {
float f = 10.0F / MathHelper.sqrt_float((float)(j * j + k * k) + 0.2F);
this.parabolicField[j + 2 + (k + 2) * 5] = f;
}
}
NoiseGenerator[] noiseGens = {noiseGen1, noiseGen2, noiseGen3, noisePerl, noiseGen5, noiseGen6, mobSpawnerNoise};
noiseGens = TerrainGen.getModdedNoiseGenerators(world, this.rand, noiseGens);
this.noiseGen1 = (NoiseGeneratorOctaves)noiseGens[0];
this.noiseGen2 = (NoiseGeneratorOctaves)noiseGens[1];
this.noiseGen3 = (NoiseGeneratorOctaves)noiseGens[2];
this.noisePerl = (NoiseGeneratorPerlin)noiseGens[3];
this.noiseGen5 = (NoiseGeneratorOctaves)noiseGens[4];
this.noiseGen6 = (NoiseGeneratorOctaves)noiseGens[5];
this.mobSpawnerNoise = (NoiseGeneratorOctaves)noiseGens[6];
}
示例11: transformNoiseGenerators
import net.minecraft.world.gen.NoiseGenerator; //导入依赖的package包/类
public static void transformNoiseGenerators(NoiseGenerator[] oldGen, NoiseGenerator[] newGen, World world) {
int dimId = world.provider.getDimensionId();
logger.info("Replacing noise generator for world " + world.getWorldInfo().getWorldName() + ", dimensionID="
+ dimId);
System.out.println("WorldClass"+world.getClass().getName());
if (oldGen.length != newGen.length) {
throw new IllegalArgumentException("oldGen and newGen lengths are not equal!");
}
for (int i = 0; i < oldGen.length; i++) {
NoiseGenerator noiseGen = oldGen[i];
int loopBits = Config.loopBits(world.provider.getDimensionId());
if (noiseGen instanceof NoiseGeneratorOctaves) {
newGen[i] = new LoopedNoiseGenOctaves((NoiseGeneratorOctaves) noiseGen, world.getSeed() + i, loopBits);
continue;
}
if (noiseGen instanceof NoiseGeneratorPerlin) {
newGen[i] = new LoopedNoiseGenSimplex2d((NoiseGeneratorPerlin) noiseGen, world.getSeed() + i, loopBits);
continue;
}
// other mods?
logger.warn("Unknown noise generator class: "
+ noiseGen.getClass().getName()
+ ", if there are no other mods - it's bug in this mod, if there are other mods - weird things may happen...");
}
}
示例12: ChunkProviderNowhere
import net.minecraft.world.gen.NoiseGenerator; //导入依赖的package包/类
public ChunkProviderNowhere(World par1World, long par2, boolean par4)
{
this.worldObj = par1World;
this.mapFeaturesEnabled = par4;
this.field_147435_p = par1World.getWorldInfo().getTerrainType();
this.rand = new Random(par2);
this.field_147431_j = new NoiseGeneratorOctaves(this.rand, 16);
this.field_147432_k = new NoiseGeneratorOctaves(this.rand, 16);
this.field_147429_l = new NoiseGeneratorOctaves(this.rand, 8);
this.field_147430_m = new NoiseGeneratorPerlin(this.rand, 4);
this.noiseGen5 = new NoiseGeneratorOctaves(this.rand, 10);
this.noiseGen6 = new NoiseGeneratorOctaves(this.rand, 16);
this.mobSpawnerNoise = new NoiseGeneratorOctaves(this.rand, 8);
this.field_147434_q = new double[825];
this.parabolicField = new float[25];
for (int j = -2; j <= 2; ++j)
{
for (int k = -2; k <= 2; ++k)
{
float f = 10.0F / MathHelper.sqrt_float((float)(j * j + k * k) + 0.2F);
this.parabolicField[j + 2 + (k + 2) * 5] = f;
}
}
NoiseGenerator[] noiseGens = {field_147431_j, field_147432_k, field_147429_l, field_147430_m, noiseGen5, noiseGen6, mobSpawnerNoise};
noiseGens = TerrainGen.getModdedNoiseGenerators(par1World, this.rand, noiseGens);
this.field_147431_j = (NoiseGeneratorOctaves)noiseGens[0];
this.field_147432_k = (NoiseGeneratorOctaves)noiseGens[1];
this.field_147429_l = (NoiseGeneratorOctaves)noiseGens[2];
this.field_147430_m = (NoiseGeneratorPerlin)noiseGens[3];
this.noiseGen5 = (NoiseGeneratorOctaves)noiseGens[4];
this.noiseGen6 = (NoiseGeneratorOctaves)noiseGens[5];
this.mobSpawnerNoise = (NoiseGeneratorOctaves)noiseGens[6];
}
示例13: ChunkProviderCretaceous
import net.minecraft.world.gen.NoiseGenerator; //导入依赖的package包/类
public ChunkProviderCretaceous(World par1World, long par2, boolean par4)
{
this.worldObj = par1World;
this.mapFeaturesEnabled = par4;
this.field_147435_p = par1World.getWorldInfo().getTerrainType();
this.rand = new Random(par2);
this.field_147431_j = new NoiseGeneratorOctaves(this.rand, 16);
this.field_147432_k = new NoiseGeneratorOctaves(this.rand, 16);
this.field_147429_l = new NoiseGeneratorOctaves(this.rand, 8);
this.field_147430_m = new NoiseGeneratorPerlin(this.rand, 4);
this.noiseGen5 = new NoiseGeneratorOctaves(this.rand, 10);
this.noiseGen6 = new NoiseGeneratorOctaves(this.rand, 16);
this.mobSpawnerNoise = new NoiseGeneratorOctaves(this.rand, 8);
this.field_147434_q = new double[825];
this.parabolicField = new float[25];
for (int j = -2; j <= 2; ++j)
{
for (int k = -2; k <= 2; ++k)
{
float f = 10.0F / MathHelper.sqrt_float((float)(j * j + k * k) + 0.2F);
this.parabolicField[j + 2 + (k + 2) * 5] = f;
}
}
NoiseGenerator[] noiseGens = {field_147431_j, field_147432_k, field_147429_l, field_147430_m, noiseGen5, noiseGen6, mobSpawnerNoise};
noiseGens = TerrainGen.getModdedNoiseGenerators(par1World, this.rand, noiseGens);
this.field_147431_j = (NoiseGeneratorOctaves)noiseGens[0];
this.field_147432_k = (NoiseGeneratorOctaves)noiseGens[1];
this.field_147429_l = (NoiseGeneratorOctaves)noiseGens[2];
this.field_147430_m = (NoiseGeneratorPerlin)noiseGens[3];
this.noiseGen5 = (NoiseGeneratorOctaves)noiseGens[4];
this.noiseGen6 = (NoiseGeneratorOctaves)noiseGens[5];
this.mobSpawnerNoise = (NoiseGeneratorOctaves)noiseGens[6];
}
示例14: TDEChunkProvider
import net.minecraft.world.gen.NoiseGenerator; //导入依赖的package包/类
public TDEChunkProvider(World par1World, long par2, boolean par4) {
this.worldObj = par1World;
this.mapFeaturesEnabled = par4;
this.worldType = par1World.getWorldInfo().getTerrainType();
this.rand = new Random(par2);
this.noiseGen1 = new NoiseGeneratorOctaves(this.rand, 16);
this.noiseGen2 = new NoiseGeneratorOctaves(this.rand, 16);
this.noiseGen3 = new NoiseGeneratorOctaves(this.rand, 8);
this.noiseGen4 = new NoiseGeneratorPerlin(this.rand, 4);
this.noiseGen5 = new NoiseGeneratorOctaves(this.rand, 10);
this.noiseGen6 = new NoiseGeneratorOctaves(this.rand, 16);
this.mobSpawnerNoise = new NoiseGeneratorOctaves(this.rand, 8);
this.d0 = new double[825];
this.parabolicField = new float[25];
for (int j = -2; j <= 2; ++j) {
for (int k = -2; k <= 2; ++k) {
float f = 10.0F / MathHelper.sqrt_float((float) (j * j + k * k) + 0.2F);
this.parabolicField[j + 2 + (k + 2) * 5] = f;
}
}
NoiseGenerator[] noiseGens = { noiseGen1, noiseGen2, noiseGen3, noiseGen4, noiseGen5, noiseGen6, mobSpawnerNoise };
noiseGens = TerrainGen.getModdedNoiseGenerators(par1World, this.rand, noiseGens);
this.noiseGen1 = (NoiseGeneratorOctaves) noiseGens[0];
this.noiseGen2 = (NoiseGeneratorOctaves) noiseGens[1];
this.noiseGen3 = (NoiseGeneratorOctaves) noiseGens[2];
this.noiseGen4 = (NoiseGeneratorPerlin) noiseGens[3];
this.noiseGen5 = (NoiseGeneratorOctaves) noiseGens[4];
this.noiseGen6 = (NoiseGeneratorOctaves) noiseGens[5];
this.mobSpawnerNoise = (NoiseGeneratorOctaves) noiseGens[6];
}
示例15: ChunkProviderTheDeep
import net.minecraft.world.gen.NoiseGenerator; //导入依赖的package包/类
public ChunkProviderTheDeep(World par1World, long par2, boolean par4)
{
this.worldObj = par1World;
this.mapFeaturesEnabled = par4;
this.field_147435_p = par1World.getWorldInfo().getTerrainType();
this.rand = new Random(par2);
this.field_147431_j = new NoiseGeneratorOctaves(this.rand, 16);
this.field_147432_k = new NoiseGeneratorOctaves(this.rand, 16);
this.field_147429_l = new NoiseGeneratorOctaves(this.rand, 8);
this.field_147430_m = new NoiseGeneratorPerlin(this.rand, 4);
this.noiseGen5 = new NoiseGeneratorOctaves(this.rand, 10);
this.noiseGen6 = new NoiseGeneratorOctaves(this.rand, 16);
this.mobSpawnerNoise = new NoiseGeneratorOctaves(this.rand, 8);
this.field_147434_q = new double[825];
this.parabolicField = new float[25];
for (int j = -2; j <= 2; ++j)
{
for (int k = -2; k <= 2; ++k)
{
float f = 10.0F / MathHelper.sqrt_float((float)(j * j + k * k) + 0.2F);
this.parabolicField[j + 2 + (k + 2) * 5] = f;
}
}
NoiseGenerator[] noiseGens = {field_147431_j, field_147432_k, field_147429_l, field_147430_m, noiseGen5, noiseGen6, mobSpawnerNoise};
noiseGens = TerrainGen.getModdedNoiseGenerators(par1World, this.rand, noiseGens);
this.field_147431_j = (NoiseGeneratorOctaves)noiseGens[0];
this.field_147432_k = (NoiseGeneratorOctaves)noiseGens[1];
this.field_147429_l = (NoiseGeneratorOctaves)noiseGens[2];
this.field_147430_m = (NoiseGeneratorPerlin)noiseGens[3];
this.noiseGen5 = (NoiseGeneratorOctaves)noiseGens[4];
this.noiseGen6 = (NoiseGeneratorOctaves)noiseGens[5];
this.mobSpawnerNoise = (NoiseGeneratorOctaves)noiseGens[6];
}