當前位置: 首頁>>代碼示例>>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;未經允許,請勿轉載。