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


Java Chunk.generateSkylightMap方法代码示例

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


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

示例1: generateChunk

import net.minecraft.world.chunk.Chunk; //导入方法依赖的package包/类
@Override
public Chunk generateChunk(int x, int z) {
    ChunkPrimer chunkprimer = new ChunkPrimer();

    this.fillChunk(x,z,chunkprimer);

    Biome[] biomes = this.world.getBiomeProvider().getBiomes((Biome[])null, x * 16, z * 16, 16, 16);
    this.replaceBiomeBlocks(x,z, chunkprimer, biomes);

    this.generateFeatures(x,z, chunkprimer);

    Chunk chunk = new Chunk(this.world, chunkprimer, x, z);

    byte[] abyte = chunk.getBiomeArray();

    for (int l = 0; l < abyte.length; ++l)
    {
        abyte[l] = (byte)Biome.getIdForBiome(biomes[l]);
    }

    chunk.generateSkylightMap();
    return chunk;
}
 
开发者ID:stuebz88,项目名称:modName,代码行数:24,代码来源:ChunkProviderBasic.java

示例2: provideChunk

import net.minecraft.world.chunk.Chunk; //导入方法依赖的package包/类
public Chunk provideChunk(int x, int z)
{
    this.chunkX = x; this.chunkZ = z;
    this.rand.setSeed((long)x * 341873128712L + (long)z * 132897987541L);
    ChunkPrimer chunkprimer = new ChunkPrimer();
    this.biomesForGeneration = this.worldObj.getBiomeProvider().getBiomes(this.biomesForGeneration, x * 16, z * 16, 16, 16);
    this.setBlocksInChunk(x, z, chunkprimer);
    this.buildSurfaces(chunkprimer);

    if (this.mapFeaturesEnabled)
    {
        this.endCityGen.generate(this.worldObj, x, z, chunkprimer);
    }

    Chunk chunk = new Chunk(this.worldObj, chunkprimer, x, z);
    byte[] abyte = chunk.getBiomeArray();

    for (int i = 0; i < abyte.length; ++i)
    {
        abyte[i] = (byte)Biome.getIdForBiome(this.biomesForGeneration[i]);
    }

    chunk.generateSkylightMap();
    return chunk;
}
 
开发者ID:F1r3w477,项目名称:CustomWorldGen,代码行数:26,代码来源:ChunkProviderEnd.java

示例3: provideChunk

import net.minecraft.world.chunk.Chunk; //导入方法依赖的package包/类
/**
 * Will return back a chunk, if it doesn't exist and its not a MP client it will generates all the blocks for the
 * specified chunk from the map seed and chunk seed
 */
public Chunk provideChunk(int x, int z)
{
    this.endRNG.setSeed((long)x * 341873128712L + (long)z * 132897987541L);
    ChunkPrimer chunkprimer = new ChunkPrimer();
    this.biomesForGeneration = this.endWorld.getWorldChunkManager().loadBlockGeneratorData(this.biomesForGeneration, x * 16, z * 16, 16, 16);
    this.func_180520_a(x, z, chunkprimer);
    this.func_180519_a(chunkprimer);
    Chunk chunk = new Chunk(this.endWorld, chunkprimer, x, z);
    byte[] abyte = chunk.getBiomeArray();

    for (int i = 0; i < abyte.length; ++i)
    {
        abyte[i] = (byte)this.biomesForGeneration[i].biomeID;
    }

    chunk.generateSkylightMap();
    return chunk;
}
 
开发者ID:SkidJava,项目名称:BaseClient,代码行数:23,代码来源:ChunkProviderEnd.java

示例4: provideChunk

import net.minecraft.world.chunk.Chunk; //导入方法依赖的package包/类
public Chunk provideChunk(int x, int z)
{
    ChunkPrimer chunkprimer = new ChunkPrimer();

    for (int i = 0; i < 16; ++i)
    {
        for (int j = 0; j < 16; ++j)
        {
            int k = x * 16 + i;
            int l = z * 16 + j;
            chunkprimer.setBlockState(i, 60, j, BARRIER);
            IBlockState iblockstate = getBlockStateFor(k, l);

            if (iblockstate != null)
            {
                chunkprimer.setBlockState(i, 70, j, iblockstate);
            }
        }
    }

    Chunk chunk = new Chunk(this.world, chunkprimer, x, z);
    chunk.generateSkylightMap();
    Biome[] abiome = this.world.getBiomeProvider().getBiomes((Biome[])null, x * 16, z * 16, 16, 16);
    byte[] abyte = chunk.getBiomeArray();

    for (int i1 = 0; i1 < abyte.length; ++i1)
    {
        abyte[i1] = (byte)Biome.getIdForBiome(abiome[i1]);
    }

    chunk.generateSkylightMap();
    return chunk;
}
 
开发者ID:sudofox,项目名称:Backmemed,代码行数:34,代码来源:ChunkProviderDebug.java

示例5: getStorage

import net.minecraft.world.chunk.Chunk; //导入方法依赖的package包/类
/**
 * Get block storage array for y-coordinate
 * Returns null in case block is outside
 * @param chunk Target chunk
 * @param y Block height inside chunk
 * @return Block storage or null
 */
private static ExtendedBlockStorage getStorage(Chunk chunk, int y) {
    ExtendedBlockStorage[] storage = chunk.getBlockStorageArray();
    if (y < 0 || y >= 256) {
        return null;
    }
    int i = y >> 4;
    if (storage[i] == Chunk.NULL_BLOCK_STORAGE) {
        storage[i] = new ExtendedBlockStorage(i << 4, chunk.getWorld().provider.hasSkyLight());
        chunk.generateSkylightMap();
    }
    return storage[i];
}
 
开发者ID:ternsip,项目名称:StructPro,代码行数:20,代码来源:UWorld.java

示例6: provideChunk

import net.minecraft.world.chunk.Chunk; //导入方法依赖的package包/类
public Chunk provideChunk(int x, int z)
{
    ChunkPrimer chunkprimer = new ChunkPrimer();

    for (int i = 0; i < this.cachedBlockIDs.length; ++i)
    {
        IBlockState iblockstate = this.cachedBlockIDs[i];

        if (iblockstate != null)
        {
            for (int j = 0; j < 16; ++j)
            {
                for (int k = 0; k < 16; ++k)
                {
                    chunkprimer.setBlockState(j, i, k, iblockstate);
                }
            }
        }
    }

    for (MapGenBase mapgenbase : this.structureGenerators)
    {
        mapgenbase.generate(this.worldObj, x, z, chunkprimer);
    }

    Chunk chunk = new Chunk(this.worldObj, chunkprimer, x, z);
    Biome[] abiome = this.worldObj.getBiomeProvider().getBiomes((Biome[])null, x * 16, z * 16, 16, 16);
    byte[] abyte = chunk.getBiomeArray();

    for (int l = 0; l < abyte.length; ++l)
    {
        abyte[l] = (byte)Biome.getIdForBiome(abiome[l]);
    }

    chunk.generateSkylightMap();
    return chunk;
}
 
开发者ID:F1r3w477,项目名称:CustomWorldGen,代码行数:38,代码来源:ChunkProviderFlat.java

示例7: generateChunk

import net.minecraft.world.chunk.Chunk; //导入方法依赖的package包/类
@Override
public Chunk generateChunk(int chunkX, int chunkZ) {
    ChunkPrimer primer = new ChunkPrimer();
    generateBlocks(primer, chunkX, chunkZ);
    Chunk chunk = new Chunk(world, primer, chunkX, chunkZ);
    chunk.generateSkylightMap();
    return chunk;
}
 
开发者ID:Boethie,项目名称:Genesis,代码行数:9,代码来源:GenesisChunkGenerator.java

示例8: getStorage

import net.minecraft.world.chunk.Chunk; //导入方法依赖的package包/类
/**
 * Get block storage array for y-coordinate
 * Returns null in case block is outside
 * @param chunk Target chunk
 * @param y Block height inside chunk
 * @return Block storage or null
 */
private static ExtendedBlockStorage getStorage(Chunk chunk, int y) {
    ExtendedBlockStorage[] storage = chunk.getBlockStorageArray();
    if (y < 0 || y >= 256) {
        return null;
    }
    int i = y >> 4;
    if (storage[i] == null) {
        storage[i] = new ExtendedBlockStorage(i << 4, !chunk.worldObj.provider.hasNoSky);
        chunk.generateSkylightMap();
    }
    return storage[i];
}
 
开发者ID:ternsip,项目名称:StructPro,代码行数:20,代码来源:UWorld.java

示例9: getStorage

import net.minecraft.world.chunk.Chunk; //导入方法依赖的package包/类
/**
 * Get block storage array for y-coordinate
 * Returns null in case block is outside
 * @param chunk Target chunk
 * @param y Block height inside chunk
 * @return Block storage or null
 */
private static ExtendedBlockStorage getStorage(Chunk chunk, int y) {
    ExtendedBlockStorage[] storage = chunk.getBlockStorageArray();
    if (y < 0 || y >= 256) {
        return null;
    }
    int i = y >> 4;
    if (storage[i] == Chunk.NULL_BLOCK_STORAGE) {
        storage[i] = new ExtendedBlockStorage(i << 4, !chunk.getWorld().provider.getHasNoSky());
        chunk.generateSkylightMap();
    }
    return storage[i];
}
 
开发者ID:ternsip,项目名称:StructPro,代码行数:20,代码来源:UWorld.java

示例10: provideChunk

import net.minecraft.world.chunk.Chunk; //导入方法依赖的package包/类
@Override
public Chunk provideChunk(int par1, int par2)
{
    this.rand.setSeed(par1 * 341873128712L + par2 * 132897987541L);
    final Block[] ids = new Block[32768 * 2];
    final byte[] meta = new byte[32768 * 2];
    this.generateTerrain(par1, par2, ids, meta);
    this.createCraters(par1, par2, ids, meta);
    this.biomesForGeneration = this.worldObj.getWorldChunkManager().loadBlockGeneratorData(this.biomesForGeneration, par1 * 16, par2 * 16, 16, 16);
    this.replaceBlocksForBiome(par1, par2, ids, meta, this.biomesForGeneration);
    final Chunk var4 = new Chunk(this.worldObj, ids, meta, par1, par2);
    final byte[] var5 = var4.getBiomeArray();
    
    if (this.worldGenerators == null)
    {
        this.worldGenerators = this.getWorldGenerators();
    }

    for (MapGenBaseMeta generator : this.worldGenerators)
    {
        generator.generate(this, this.worldObj, par1, par2, ids, meta);
    }
    
    this.onChunkProvide(par1, par2, ids, meta);
    
    
    for (int var6 = 0; var6 < var5.length; ++var6)
    {
        var5[var6] = (byte) this.biomesForGeneration[var6].biomeID;
    }

    var4.generateSkylightMap();
    return var4;
}
 
开发者ID:BlesseNtumble,项目名称:TRAPPIST-1,代码行数:35,代码来源:ChunkProviderSpaceCraters.java

示例11: provideChunk

import net.minecraft.world.chunk.Chunk; //导入方法依赖的package包/类
public Chunk provideChunk(int x, int z)
{
    ChunkPrimer chunkprimer = new ChunkPrimer();

    for (int i = 0; i < this.cachedBlockIDs.length; ++i)
    {
        IBlockState iblockstate = this.cachedBlockIDs[i];

        if (iblockstate != null)
        {
            for (int j = 0; j < 16; ++j)
            {
                for (int k = 0; k < 16; ++k)
                {
                    chunkprimer.setBlockState(j, i, k, iblockstate);
                }
            }
        }
    }

    for (MapGenBase mapgenbase : this.structureGenerators.values())
    {
        mapgenbase.generate(this.worldObj, x, z, chunkprimer);
    }

    Chunk chunk = new Chunk(this.worldObj, chunkprimer, x, z);
    Biome[] abiome = this.worldObj.getBiomeProvider().getBiomes((Biome[])null, x * 16, z * 16, 16, 16);
    byte[] abyte = chunk.getBiomeArray();

    for (int l = 0; l < abyte.length; ++l)
    {
        abyte[l] = (byte)Biome.getIdForBiome(abiome[l]);
    }

    chunk.generateSkylightMap();
    return chunk;
}
 
开发者ID:sudofox,项目名称:Backmemed,代码行数:38,代码来源:ChunkProviderFlat.java

示例12: provideChunk

import net.minecraft.world.chunk.Chunk; //导入方法依赖的package包/类
/**
 * Will return back a chunk, if it doesn't exist and its not a MP client it will generates all the blocks for the
 * specified chunk from the map seed and chunk seed
 */
public Chunk provideChunk(int x, int z)
{
    ChunkPrimer chunkprimer = new ChunkPrimer();

    for (int i = 0; i < this.cachedBlockIDs.length; ++i)
    {
        IBlockState iblockstate = this.cachedBlockIDs[i];

        if (iblockstate != null)
        {
            for (int j = 0; j < 16; ++j)
            {
                for (int k = 0; k < 16; ++k)
                {
                    chunkprimer.setBlockState(j, i, k, iblockstate);
                }
            }
        }
    }

    for (MapGenBase mapgenbase : this.structureGenerators)
    {
        mapgenbase.generate(this, this.worldObj, x, z, chunkprimer);
    }

    Chunk chunk = new Chunk(this.worldObj, chunkprimer, x, z);
    BiomeGenBase[] abiomegenbase = this.worldObj.getWorldChunkManager().loadBlockGeneratorData((BiomeGenBase[])null, x * 16, z * 16, 16, 16);
    byte[] abyte = chunk.getBiomeArray();

    for (int l = 0; l < abyte.length; ++l)
    {
        abyte[l] = (byte)abiomegenbase[l].biomeID;
    }

    chunk.generateSkylightMap();
    return chunk;
}
 
开发者ID:SkidJava,项目名称:BaseClient,代码行数:42,代码来源:ChunkProviderFlat.java

示例13: provideChunk

import net.minecraft.world.chunk.Chunk; //导入方法依赖的package包/类
/**
 * Will return back a chunk, if it doesn't exist and its not a MP client it will generates all the blocks for the
 * specified chunk from the map seed and chunk seed
 */
public Chunk provideChunk(int x, int z)
{
    ChunkPrimer chunkprimer = new ChunkPrimer();

    for (int i = 0; i < 16; ++i)
    {
        for (int j = 0; j < 16; ++j)
        {
            int k = x * 16 + i;
            int l = z * 16 + j;
            chunkprimer.setBlockState(i, 60, j, Blocks.barrier.getDefaultState());
            IBlockState iblockstate = func_177461_b(k, l);

            if (iblockstate != null)
            {
                chunkprimer.setBlockState(i, 70, j, iblockstate);
            }
        }
    }

    Chunk chunk = new Chunk(this.world, chunkprimer, x, z);
    chunk.generateSkylightMap();
    BiomeGenBase[] abiomegenbase = this.world.getWorldChunkManager().loadBlockGeneratorData((BiomeGenBase[])null, x * 16, z * 16, 16, 16);
    byte[] abyte = chunk.getBiomeArray();

    for (int i1 = 0; i1 < abyte.length; ++i1)
    {
        abyte[i1] = (byte)abiomegenbase[i1].biomeID;
    }

    chunk.generateSkylightMap();
    return chunk;
}
 
开发者ID:SkidJava,项目名称:BaseClient,代码行数:38,代码来源:ChunkProviderDebug.java

示例14: provideChunk

import net.minecraft.world.chunk.Chunk; //导入方法依赖的package包/类
/**
 * Will return back a chunk, if it doesn't exist and its not a MP client it will generates all the blocks for the
 * specified chunk from the map seed and chunk seed
 */
public Chunk provideChunk(int x, int z)
{
    this.rand.setSeed((long)x * 341873128712L + (long)z * 132897987541L);
    ChunkPrimer chunkprimer = new ChunkPrimer();
    this.setBlocksInChunk(x, z, chunkprimer);
    this.biomesForGeneration = this.worldObj.getWorldChunkManager().loadBlockGeneratorData(this.biomesForGeneration, x * 16, z * 16, 16, 16);
    this.replaceBlocksForBiome(x, z, chunkprimer, this.biomesForGeneration);

    if (this.settings.useCaves)
    {
        this.caveGenerator.generate(this, this.worldObj, x, z, chunkprimer);
    }

    if (this.settings.useRavines)
    {
        this.ravineGenerator.generate(this, this.worldObj, x, z, chunkprimer);
    }

    if (this.settings.useMineShafts && this.mapFeaturesEnabled)
    {
        this.mineshaftGenerator.generate(this, this.worldObj, x, z, chunkprimer);
    }

    if (this.settings.useVillages && this.mapFeaturesEnabled)
    {
        this.villageGenerator.generate(this, this.worldObj, x, z, chunkprimer);
    }

    if (this.settings.useStrongholds && this.mapFeaturesEnabled)
    {
        this.strongholdGenerator.generate(this, this.worldObj, x, z, chunkprimer);
    }

    if (this.settings.useTemples && this.mapFeaturesEnabled)
    {
        this.scatteredFeatureGenerator.generate(this, this.worldObj, x, z, chunkprimer);
    }

    if (this.settings.useMonuments && this.mapFeaturesEnabled)
    {
        this.oceanMonumentGenerator.generate(this, this.worldObj, x, z, chunkprimer);
    }

    Chunk chunk = new Chunk(this.worldObj, chunkprimer, x, z);
    byte[] abyte = chunk.getBiomeArray();

    for (int i = 0; i < abyte.length; ++i)
    {
        abyte[i] = (byte)this.biomesForGeneration[i].biomeID;
    }

    chunk.generateSkylightMap();
    return chunk;
}
 
开发者ID:Notoh,项目名称:DecompiledMinecraft,代码行数:59,代码来源:ChunkProviderGenerate.java

示例15: provideChunk

import net.minecraft.world.chunk.Chunk; //导入方法依赖的package包/类
public Chunk provideChunk(int x, int z)
{
    this.rand.setSeed((long)x * 341873128712L + (long)z * 132897987541L);
    ChunkPrimer chunkprimer = new ChunkPrimer();
    this.setBlocksInChunk(x, z, chunkprimer);
    this.biomesForGeneration = this.worldObj.getBiomeProvider().getBiomes(this.biomesForGeneration, x * 16, z * 16, 16, 16);
    this.replaceBiomeBlocks(x, z, chunkprimer, this.biomesForGeneration);

    if (this.settings.useCaves)
    {
        this.caveGenerator.generate(this.worldObj, x, z, chunkprimer);
    }

    if (this.settings.useRavines)
    {
        this.ravineGenerator.generate(this.worldObj, x, z, chunkprimer);
    }

    if (this.mapFeaturesEnabled)
    {
        if (this.settings.useMineShafts)
        {
            this.mineshaftGenerator.generate(this.worldObj, x, z, chunkprimer);
        }

        if (this.settings.useVillages)
        {
            this.villageGenerator.generate(this.worldObj, x, z, chunkprimer);
        }

        if (this.settings.useStrongholds)
        {
            this.strongholdGenerator.generate(this.worldObj, x, z, chunkprimer);
        }

        if (this.settings.useTemples)
        {
            this.scatteredFeatureGenerator.generate(this.worldObj, x, z, chunkprimer);
        }

        if (this.settings.useMonuments)
        {
            this.oceanMonumentGenerator.generate(this.worldObj, x, z, chunkprimer);
        }
    }

    Chunk chunk = new Chunk(this.worldObj, chunkprimer, x, z);
    byte[] abyte = chunk.getBiomeArray();

    for (int i = 0; i < abyte.length; ++i)
    {
        abyte[i] = (byte)Biome.getIdForBiome(this.biomesForGeneration[i]);
    }

    chunk.generateSkylightMap();
    return chunk;
}
 
开发者ID:F1r3w477,项目名称:CustomWorldGen,代码行数:58,代码来源:ChunkProviderOverworld.java


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