本文整理匯總了Java中net.minecraft.world.gen.NoiseGeneratorOctaves類的典型用法代碼示例。如果您正苦於以下問題:Java NoiseGeneratorOctaves類的具體用法?Java NoiseGeneratorOctaves怎麽用?Java NoiseGeneratorOctaves使用的例子?那麽, 這裏精選的類代碼示例或許可以為您提供幫助。
NoiseGeneratorOctaves類屬於net.minecraft.world.gen包,在下文中一共展示了NoiseGeneratorOctaves類的15個代碼示例,這些例子默認根據受歡迎程度排序。您可以為喜歡或者感覺有用的代碼點讚,您的評價將有助於係統推薦出更棒的Java代碼示例。
示例1: Drawer
import net.minecraft.world.gen.NoiseGeneratorOctaves; //導入依賴的package包/類
Drawer() {
Coord.sort(blobStart, blobEnd);
size = blobEnd.difference(blobStart);
size.x++;
size.y++;
size.z++;
NoiseGeneratorOctaves noiseGen = new NoiseGeneratorOctaves(rand, 2);
noise = new double[size.x * size.y * size.z];
double s = 1.0 / 256; // 1.0/512.0;
noiseGen.generateNoiseOctaves(noise,
blobStart.x, blobStart.y, blobStart.z,
size.x, size.y, size.z,
blobEnd.x * s, blobEnd.y * s, blobEnd.z * s);
for (int i = 0; i < noise.length; i++) {
noise[i] = (noise[i] + 1) / 2;
}
this.len = size.magnitude();
}
示例2: injectNoiseSmoothers
import net.minecraft.world.gen.NoiseGeneratorOctaves; //導入依賴的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);
}
}
示例3: ChunkProviderGenerateVC
import net.minecraft.world.gen.NoiseGeneratorOctaves; //導入依賴的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);
}
示例4: ChunkProviderCustomDimension
import net.minecraft.world.gen.NoiseGeneratorOctaves; //導入依賴的package包/類
public ChunkProviderCustomDimension(World worldObj, long seed, boolean features){
this.worldObj = worldObj;
this.mapFeaturesEnabled = features;
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.noiseGen4 = new NoiseGeneratorOctaves(this.rand, 4);
this.noiseGen5 = new NoiseGeneratorOctaves(this.rand, 10);
this.noiseGen6 = new NoiseGeneratorOctaves(this.rand, 16);
this.mobSpawnerNoise = new NoiseGeneratorOctaves(this.rand, 8);
NoiseGeneratorOctaves[] noiseGens = {noiseGen1, noiseGen2, noiseGen3, noiseGen4, noiseGen5, noiseGen6, mobSpawnerNoise};
noiseGens = TerrainGen.getModdedNoiseGenerators(worldObj, rand, noiseGens);
this.noiseGen1 = noiseGens[0];
this.noiseGen2 = noiseGens[1];
this.noiseGen3 = noiseGens[2];
this.noiseGen4 = noiseGens[3];
this.noiseGen5 = noiseGens[4];
this.noiseGen6 = noiseGens[5];
this.mobSpawnerNoise = noiseGens[6];
}
示例5: ChunkProviderRune2
import net.minecraft.world.gen.NoiseGeneratorOctaves; //導入依賴的package包/類
public ChunkProviderRune2(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);
NoiseGeneratorOctaves[] noiseGens = {netherNoiseGen1, netherNoiseGen2, netherNoiseGen3, slowsandGravelNoiseGen, netherrackExculsivityNoiseGen, netherNoiseGen6, netherNoiseGen7};
noiseGens = TerrainGen.getModdedNoiseGenerators(par1World, this.hellRNG, noiseGens);
this.netherNoiseGen1 = noiseGens[0];
this.netherNoiseGen2 = noiseGens[1];
this.netherNoiseGen3 = noiseGens[2];
this.slowsandGravelNoiseGen = noiseGens[3];
this.netherrackExculsivityNoiseGen = noiseGens[4];
this.netherNoiseGen6 = noiseGens[5];
this.netherNoiseGen7 = noiseGens[6];
}
示例6: ChunkProviderGenerateVC
import net.minecraft.world.gen.NoiseGeneratorOctaves; //導入依賴的package包/類
public ChunkProviderGenerateVC(World worldIn, long seed, boolean mapfeaturesenabled, String customgenjson) {
super(worldIn, seed, mapfeaturesenabled, customgenjson);
ageLayer = GenLayerVC.genAgemap(seed);
caveGenerator = new MapGenCavesVC();
floragenerator = new MapGenFlora(seed, ageLayer);
lakegenerator = new MapGenLakes();
this.worldObj = worldIn;
this.rand = new Random(seed);
this.mobSpawnerNoise = new NoiseGeneratorOctaves(this.rand, 8);
this.seed = seed;
genrocklayers = new GenRockLayers(seed);
rockOffsetNoiseX = GenLayerVC.genHorizontalRockOffsetMap(seed);
rockOffsetNoiseZ = GenLayerVC.genHorizontalRockOffsetMap(seed+500);
//heightmapGen = GenLayerVC.genHeightmap(seed);
normalTerrainGen = new GenLayerTerrain(seed + 0);
}
示例7: ChunkProviderMultiBiome
import net.minecraft.world.gen.NoiseGeneratorOctaves; //導入依賴的package包/類
public ChunkProviderMultiBiome(World world, long seed, boolean mapFeaturesEnabled) {
this.worldObj = world;
this.mapFeaturesEnabled = mapFeaturesEnabled;
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.noiseGen4 = new NoiseGeneratorOctaves(this.rand, 4);
this.noiseGen5 = new NoiseGeneratorOctaves(this.rand, 10);
this.noiseGen6 = new NoiseGeneratorOctaves(this.rand, 16);
this.mobSpawnerNoise = new NoiseGeneratorOctaves(this.rand, 8);
NoiseGeneratorOctaves[] noiseGens = { noiseGen1, noiseGen2, noiseGen3, noiseGen4, noiseGen5, noiseGen6, mobSpawnerNoise };
noiseGens = TerrainGen.getModdedNoiseGenerators(world, this.rand, noiseGens);
this.noiseGen1 = noiseGens[0];
this.noiseGen2 = noiseGens[1];
this.noiseGen3 = noiseGens[2];
this.noiseGen4 = noiseGens[3];
this.noiseGen5 = noiseGens[4];
this.noiseGen6 = noiseGens[5];
this.mobSpawnerNoise = noiseGens[6];
}
示例8: ChunkProviderOmothol
import net.minecraft.world.gen.NoiseGeneratorOctaves; //導入依賴的package包/類
public ChunkProviderOmothol(World par1World, long par2)
{
worldObj = par1World;
rand = new Random(par2);
noiseGen1 = new NoiseGeneratorOctaves(rand, 16);
noiseGen2 = new NoiseGeneratorOctaves(rand, 16);
noiseGen3 = new NoiseGeneratorOctaves(rand, 8);
noiseGen4 = new NoiseGeneratorOctaves(rand, 10);
noiseGen5 = new NoiseGeneratorOctaves(rand, 16);
// NoiseGenerator[] noiseGens = {noiseGen1, noiseGen2, noiseGen3, noiseGen4, noiseGen5};
// noiseGens = TerrainGen.getModdedNoiseGenerators(par1World, rand, noiseGens);
// noiseGen1 = (NoiseGeneratorOctaves)noiseGens[0];
// noiseGen2 = (NoiseGeneratorOctaves)noiseGens[1];
// noiseGen3 = (NoiseGeneratorOctaves)noiseGens[2];
// noiseGen4 = (NoiseGeneratorOctaves)noiseGens[3];
// noiseGen5 = (NoiseGeneratorOctaves)noiseGens[4];
}
示例9: ChunkProviderHeaven
import net.minecraft.world.gen.NoiseGeneratorOctaves; //導入依賴的package包/類
public ChunkProviderHeaven(World world, long l)
{
super(world, l, true);
unusedSandNoise = new double[256];
unusedGravelNoise = new double[256];
stoneNoise = new double[256];
caveGen = new MapGenCaves();
field_28088_i = new int[32][32];
worldObj = world;
random = new Random(l);
field_28086_k = new NoiseGeneratorOctaves(random, 16);
field_28085_l = new NoiseGeneratorOctaves(random, 16);
field_28084_m = new NoiseGeneratorOctaves(random, 8);
field_28083_n = new NoiseGeneratorOctaves(random, 4);
field_28082_o = new NoiseGeneratorOctaves(random, 4);
field_28096_a = new NoiseGeneratorOctaves(random, 10);
field_28095_b = new NoiseGeneratorOctaves(random, 16);
field_28094_c = new NoiseGeneratorOctaves(random, 8);
}
示例10: NyxChunkProvider
import net.minecraft.world.gen.NoiseGeneratorOctaves; //導入依賴的package包/類
public NyxChunkProvider(World par1World, long seed, boolean par4) {
final Random rand = new Random(~seed);
ablock = new Block[1 << 16];
abyte = new byte[1 << 16];
worldObj = par1World;
noiseGen = new NoiseGeneratorOctaves[4];
noiseGen[0] = new NoiseGeneratorOctaves(rand, 16);
noiseGen[1] = new NoiseGeneratorOctaves(rand, 16);
noiseGen[2] = new NoiseGeneratorOctaves(rand, 8);
noiseGen[3] = new NoiseGeneratorOctaves(rand, 16);
// noiseGenStone = new NoiseGeneratorPerlin(rand, 4);
// this.noiseGenPublic = new NoiseGeneratorOctaves(this.rand, 10);
densitymap = new double[magic*magic*33];
parabolicField = new float[radius*radius*4];
for (int j = -radius; j <= radius; ++j) {
for (int k = -radius; k <= radius; ++k) {
final boolean corner = Math.abs(j) >= radius-1 && Math.abs(k) >= radius-1;
final float f = corner?0:1f / MathHelper.sqrt_float(j * j + k * k + 0.5f);
parabolicField[j + radius + (k + radius) * radius] = f;
}
}
}
示例11: ChunkProviderCustomHell
import net.minecraft.world.gen.NoiseGeneratorOctaves; //導入依賴的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];
}
示例12: ChunkProviderDesertSector
import net.minecraft.world.gen.NoiseGeneratorOctaves; //導入依賴的package包/類
public ChunkProviderDesertSector(World world, long seed, boolean mapFeaturesEnabled)
{
this.mapFeaturesEnabled = mapFeaturesEnabled;
this.world = world;
this.random = new Random(seed);
this.noiseGen1 = new NoiseGeneratorOctaves(this.random, 8);
// this.noiseGen2 = new NoiseGeneratorOctaves(this.random, 16);
// this.noiseGen3 = new NoiseGeneratorOctaves(this.random, 8);
this.noiseGen4 = new NoiseGeneratorOctaves(this.random, 4);
// this.noiseGen5 = new NoiseGeneratorOctaves(this.random, 10);
// this.noiseGen6 = new NoiseGeneratorOctaves(this.random, 16);
// this.mobSpawnerNoiseGen = new NoiseGeneratorOctaves(this.random, 8);
// 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;
// }
// }
}
示例13: IceSectorChunkProvider
import net.minecraft.world.gen.NoiseGeneratorOctaves; //導入依賴的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];
}
示例14: ChunkProviderEI
import net.minecraft.world.gen.NoiseGeneratorOctaves; //導入依賴的package包/類
public ChunkProviderEI(World world, long seed, boolean mapFeaturesEnabled) {
this.worldObj = world;
this.mapFeaturesEnabled = mapFeaturesEnabled;
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.noiseGen4 = new NoiseGeneratorOctaves(this.rand, 4);
this.noiseGen5 = new NoiseGeneratorOctaves(this.rand, 10);
this.noiseGen6 = new NoiseGeneratorOctaves(this.rand, 16);
this.mobSpawnerNoise = new NoiseGeneratorOctaves(this.rand, 8);
NoiseGeneratorOctaves[] noiseGens = { noiseGen1, noiseGen2, noiseGen3, noiseGen4, noiseGen5, noiseGen6, mobSpawnerNoise };
noiseGens = TerrainGen.getModdedNoiseGenerators(world, this.rand, noiseGens);
this.noiseGen1 = noiseGens[0];
this.noiseGen2 = noiseGens[1];
this.noiseGen3 = noiseGens[2];
this.noiseGen4 = noiseGens[3];
this.noiseGen5 = noiseGens[4];
this.noiseGen6 = noiseGens[5];
this.mobSpawnerNoise = noiseGens[6];
}
示例15: ChunkProviderEI
import net.minecraft.world.gen.NoiseGeneratorOctaves; //導入依賴的package包/類
public ChunkProviderEI(World world, long seed, boolean mapFeaturesEnabled) {
this.worldObj = world;
this.mapFeaturesEnabled = mapFeaturesEnabled;
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.noiseGen4 = new NoiseGeneratorOctaves(this.rand, 4);
this.noiseGen5 = new NoiseGeneratorOctaves(this.rand, 10);
this.noiseGen6 = new NoiseGeneratorOctaves(this.rand, 16);
this.mobSpawnerNoise = new NoiseGeneratorOctaves(this.rand, 8);
NoiseGeneratorOctaves[] noiseGens = { noiseGen1, noiseGen2, noiseGen3, noiseGen4, noiseGen5, noiseGen6, mobSpawnerNoise };
noiseGens = (NoiseGeneratorOctaves[]) TerrainGen.getModdedNoiseGenerators(world, this.rand, noiseGens);
this.noiseGen1 = noiseGens[0];
this.noiseGen2 = noiseGens[1];
this.noiseGen3 = noiseGens[2];
this.noiseGen4 = noiseGens[3];
this.noiseGen5 = noiseGens[4];
this.noiseGen6 = noiseGens[5];
this.mobSpawnerNoise = noiseGens[6];
}