net.minecraft.world.gen.NoiseGeneratorPerlin Java Examples

The following examples show how to use net.minecraft.world.gen.NoiseGeneratorPerlin. You can vote up the ones you like or vote down the ones you don't like, and go to the original project or source file by following the links above each example. You may check out the related API usage on the sidebar.
Example #1
Source File: ChunkProviderTofu.java    From TofuCraftReload with MIT License 5 votes vote down vote up
public ChunkProviderTofu(World worldIn, long seed) {
    {
    	if(net.minecraftforge.event.terraingen.TerrainGen.getModdedMapGen(villageGenerator, net.minecraftforge.event.terraingen.InitMapGenEvent.EventType.VILLAGE) instanceof MapGenTofuVillage)
        villageGenerator = (MapGenTofuVillage) net.minecraftforge.event.terraingen.TerrainGen.getModdedMapGen(villageGenerator, net.minecraftforge.event.terraingen.InitMapGenEvent.EventType.VILLAGE);
    	if(net.minecraftforge.event.terraingen.TerrainGen.getModdedMapGen(mineshaft, InitMapGenEvent.EventType.CUSTOM) instanceof MapGenTofuMineshaft)
    	mineshaft = (MapGenTofuMineshaft) net.minecraftforge.event.terraingen.TerrainGen.getModdedMapGen(mineshaft, InitMapGenEvent.EventType.CUSTOM);
        if (net.minecraftforge.event.terraingen.TerrainGen.getModdedMapGen(tofuCastle, InitMapGenEvent.EventType.CUSTOM) instanceof MapGenTofuCastle)
            tofuCastle = (MapGenTofuCastle) net.minecraftforge.event.terraingen.TerrainGen.getModdedMapGen(tofuCastle, InitMapGenEvent.EventType.CUSTOM);
        caveGenerator = net.minecraftforge.event.terraingen.TerrainGen.getModdedMapGen(caveGenerator, net.minecraftforge.event.terraingen.InitMapGenEvent.EventType.CAVE);
        this.mapFeaturesEnabled = worldIn.getWorldInfo().isMapFeaturesEnabled();
    }
    this.world = worldIn;
    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.noiseGen4 = new NoiseGeneratorOctaves(rand, 4);
    this.depthNoise = new NoiseGeneratorOctaves(rand, 16);
    this.heightMap = new double[825];
    this.biomeWeights = new float[25];
    this.surfaceNoise = new NoiseGeneratorPerlin(this.rand, 4);

    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.biomeWeights[j + 2 + (k + 2) * 5] = f;
        }
    }
}
 
Example #2
Source File: ChunkGeneratorUnderWorld.java    From Wizardry with GNU Lesser General Public License v3.0 5 votes vote down vote up
public ChunkGeneratorUnderWorld(World world, long seed)
{
	this.world = world;
	RandUtilSeed rand = new RandUtilSeed(seed);
	upper = new NoiseGeneratorPerlin(rand.random, 4);
	lower = new NoiseGeneratorPerlin(rand.random, 4);
}
 
Example #3
Source File: ChunkGeneratorTorikki.java    From Wizardry with GNU Lesser General Public License v3.0 5 votes vote down vote up
public ChunkGeneratorTorikki(World worldIn) {

		this.world = worldIn;
		this.rand= new Random(world.getSeed());
		this.noise = new NoiseGeneratorPerlin(RandUtil.random,4);
		this.lperlinNoise1 = new NoiseGeneratorOctaves(this.rand, 16);
		this.lperlinNoise2 = new NoiseGeneratorOctaves(this.rand, 16);

	}
 
Example #4
Source File: ChunkGeneratorUnderWorld.java    From Wizardry with GNU Lesser General Public License v3.0 4 votes vote down vote up
public ChunkGeneratorUnderWorld(World worldIn)
{
	this.world = worldIn;
	upper = new NoiseGeneratorPerlin(RandUtil.random, 4);
	lower = new NoiseGeneratorPerlin(RandUtil.random, 4);
}
 
Example #5
Source File: ChunkGeneratorTorikki.java    From Wizardry with GNU Lesser General Public License v3.0 4 votes vote down vote up
public ChunkGeneratorTorikki(World world, long seed) {
	this.world = world;
	rand = new Random(world.getSeed());
	noise = new NoiseGeneratorPerlin(rand, 4);

}