当前位置: 首页>>代码示例>>Java>>正文


Java ChunkGenerator.BiomeGrid方法代码示例

本文整理汇总了Java中org.bukkit.generator.ChunkGenerator.BiomeGrid方法的典型用法代码示例。如果您正苦于以下问题:Java ChunkGenerator.BiomeGrid方法的具体用法?Java ChunkGenerator.BiomeGrid怎么用?Java ChunkGenerator.BiomeGrid使用的例子?那么, 这里精选的方法代码示例或许可以为您提供帮助。您也可以进一步了解该方法所在org.bukkit.generator.ChunkGenerator的用法示例。


在下文中一共展示了ChunkGenerator.BiomeGrid方法的12个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于系统推荐出更棒的Java代码示例。

示例1: generateChunkData

import org.bukkit.generator.ChunkGenerator; //导入方法依赖的package包/类
@Override
public ChunkData generateChunkData(World world, Random random, int chunkX, int chunkZ, ChunkGenerator.BiomeGrid biomeGrid) {
    if (world.getEnvironment().equals(World.Environment.NETHER)) {
        return generateNetherChunks(world, random, chunkX, chunkZ, biomeGrid);
    }
    ChunkData result = createChunkData(world);
    if (Settings.seaHeight != 0) {
        for (int x = 0; x < 16; x++) {
            for (int z = 0; z < 16; z++) {
                for (int y = 0; y < Settings.seaHeight; y++) {
                    result.setBlock(x, y, z, Material.STATIONARY_WATER);
                }
            }
        }

    }
    return result;
}
 
开发者ID:tastybento,项目名称:bskyblock,代码行数:19,代码来源:ChunkGeneratorWorld.java

示例2: generate

import org.bukkit.generator.ChunkGenerator; //导入方法依赖的package包/类
public void generate(byte[][] chunk, World world, int chunkX, int chunkZ, ChunkGenerator.BiomeGrid grid) {
    for (int x = 0; x < 16; x++) {
        for (int z = 0; z < 16; z++) {
            int realX = x + chunkX * 16;
            int realZ = z + chunkZ * 16;
            grid.setBiome(x, z, null);
            // Generate basic terrain
            double height = baseHeight + generateSea(realX, realZ, grid) + generateHugeMountain(realX, realZ) + terrainAmplitude1 * terrainGenerator1.noise(realX * terrainFreq1, realZ * terrainFreq1) + terrainAmplitude2 * terrainGenerator2.noise(realX * terrainFreq2, realZ * terrainFreq2);
            double humidity = 50D + 50D * humidityGenerator.noise(realX * humidityFreq, realZ * humidityFreq);
            double temperature = 8D + 24D * temperatureGenerator.noise(realX * temperatureFreq, realZ * temperatureFreq);
            if (height > baseHeight)
                grid.setBiome(x, z, null);
            for (int y = 1; y < 256; y++) {
                if (grid.getBiome(x, z) != null) {
                    if (y < height) setBlock(x, y, z, chunk, Material.STONE);
                    else if (y < baseHeight) setBlock(x, y, z, chunk, Material.WATER);
                    else setBlock(x, y, z, chunk, Material.AIR);
                } else if (y <= height) setBlock(x, y, z, chunk, Material.STONE);
            }
        }
    }
}
 
开发者ID:IzzelAliz,项目名称:TalentZzzz,代码行数:23,代码来源:BasicTerrainGenerator.java

示例3: generateSea

import org.bukkit.generator.ChunkGenerator; //导入方法依赖的package包/类
private double generateSea(int x, int z, ChunkGenerator.BiomeGrid grid) {
    double height = seaAmplitude * seaGenerator.noise(x * seaFreq, z * seaFreq);
    if (height < -0.05) {
        grid.setBiome((x % 16 + 16) % 16, (z % 16 + 16) % 16, Biome.OCEAN);
        if (height < -0.2) grid.setBiome((x % 16 + 16) % 16, (z % 16 + 16) % 16, Biome.DEEP_OCEAN);
    }
    return height > 0 ? 0 : height;
}
 
开发者ID:IzzelAliz,项目名称:TalentZzzz,代码行数:9,代码来源:BasicTerrainGenerator.java

示例4: generateBlockSections

import org.bukkit.generator.ChunkGenerator; //导入方法依赖的package包/类
@Override
@Deprecated
public byte[][] generateBlockSections(World world, Random random, int chunkX, int chunkZ, ChunkGenerator.BiomeGrid biomeGrid) {
    byte[][] result = new byte[world.getMaxHeight() / 16][];
    if ((chunkX == 0) && (chunkZ == 0)) {
        setBlock(result, 0, 64, 0, (byte) 7);
    }
    return result;
}
 
开发者ID:Relicum,项目名称:SuperSkyBros,代码行数:10,代码来源:Generator.java

示例5: generateChunkData

import org.bukkit.generator.ChunkGenerator; //导入方法依赖的package包/类
@Override
public ChunkGenerator.ChunkData generateChunkData(World world, Random random, int x, int z, ChunkGenerator.BiomeGrid biome) {
    return wrappedGenerator.generateChunkData(world, random, x, z, biome);
}
 
开发者ID:MundoSK,项目名称:MundoSK,代码行数:5,代码来源:ChunkGeneratorWithID.java

示例6: generateExtBlockSections

import org.bukkit.generator.ChunkGenerator; //导入方法依赖的package包/类
@Deprecated
public short[][] generateExtBlockSections(World world, Random random, int x, int z, ChunkGenerator.BiomeGrid biomes) {
    return wrappedGenerator.generateExtBlockSections(world, random, x, z, biomes);
}
 
开发者ID:MundoSK,项目名称:MundoSK,代码行数:5,代码来源:ChunkGeneratorWithID.java

示例7: generateBlockSections

import org.bukkit.generator.ChunkGenerator; //导入方法依赖的package包/类
@Deprecated
public byte[][] generateBlockSections(World world, Random random, int x, int z, ChunkGenerator.BiomeGrid biomes) {
    return wrappedGenerator.generateBlockSections(world, random, x, z, biomes);
}
 
开发者ID:MundoSK,项目名称:MundoSK,代码行数:5,代码来源:ChunkGeneratorWithID.java

示例8: generateChunkData

import org.bukkit.generator.ChunkGenerator; //导入方法依赖的package包/类
@Override
public ChunkData generateChunkData(World world, Random random, int x, int z, ChunkGenerator.BiomeGrid biome) {
    ChunkData chunkData = createChunkData(world);
    GeneratorEvent.Generation event = new GeneratorEvent.Generation(world, random, x, z, chunkData, biome);
    functionality.generation.ifPresent(triggerItem -> TriggerItem.walk(triggerItem, event));
    return chunkData;
}
 
开发者ID:MundoSK,项目名称:MundoSK,代码行数:8,代码来源:SkriptGenerator.java

示例9: Generation

import org.bukkit.generator.ChunkGenerator; //导入方法依赖的package包/类
public Generation(World world, Random random, Integer x, Integer z, ChunkGenerator.ChunkData chunkData, ChunkGenerator.BiomeGrid biomeGrid) {
    super(world, random);
    this.x = x;
    this.z = z;
    this.chunkData = chunkData;
    this.biomeGrid = biomeGrid;
}
 
开发者ID:MundoSK,项目名称:MundoSK,代码行数:8,代码来源:GeneratorEvent.java

示例10: generateExtBlockSections

import org.bukkit.generator.ChunkGenerator; //导入方法依赖的package包/类
@Deprecated public short[][] generateExtBlockSections(World world, Random random, int x, int z, ChunkGenerator.BiomeGrid biomes) {
	return null;
}
 
开发者ID:deathcap,项目名称:BedrockAPI,代码行数:4,代码来源:ChunkGenerator.java

示例11: generateBlockSections

import org.bukkit.generator.ChunkGenerator; //导入方法依赖的package包/类
@Deprecated public byte[][] generateBlockSections(World world, Random random, int x, int z, ChunkGenerator.BiomeGrid biomes) {
	return null;
}
 
开发者ID:deathcap,项目名称:BedrockAPI,代码行数:4,代码来源:ChunkGenerator.java

示例12: generate

import org.bukkit.generator.ChunkGenerator; //导入方法依赖的package包/类
abstract void generate(byte[][] chunk, World world, int chunkX, int chunkZ, ChunkGenerator.BiomeGrid grid); 
开发者ID:IzzelAliz,项目名称:TalentZzzz,代码行数:2,代码来源:Generator.java


注:本文中的org.bukkit.generator.ChunkGenerator.BiomeGrid方法示例由纯净天空整理自Github/MSDocs等开源代码及文档管理平台,相关代码片段筛选自各路编程大神贡献的开源项目,源码版权归原作者所有,传播和使用请参考对应项目的License;未经允许,请勿转载。