• 设为首页
  • 点击收藏
  • 手机版
    手机扫一扫访问
    迪恩网络手机版
  • 关注官方公众号
    微信扫一扫关注
    迪恩网络公众号

Java ChunkProviderDebug类代码示例

原作者: [db:作者] 来自: [db:来源] 收藏 邀请

本文整理汇总了Java中net.minecraft.world.gen.ChunkProviderDebug的典型用法代码示例。如果您正苦于以下问题:Java ChunkProviderDebug类的具体用法?Java ChunkProviderDebug怎么用?Java ChunkProviderDebug使用的例子?那么恭喜您, 这里精选的类代码示例或许可以为您提供帮助。



ChunkProviderDebug类属于net.minecraft.world.gen包,在下文中一共展示了ChunkProviderDebug类的5个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于我们的系统推荐出更棒的Java代码示例。

示例1: createChunkGenerator

import net.minecraft.world.gen.ChunkProviderDebug; //导入依赖的package包/类
/**
 * @author jamierocks - 24th October 2016
 * @reason To use custom ChunkProviders where necessary
 */
@Overwrite
public IChunkProvider createChunkGenerator() {
    final IChunkProvider chunkProvider = this.terrainType == WorldType.FLAT ?
            new ChunkProviderFlat(this.worldObj, this.worldObj.getSeed(), this.worldObj.getWorldInfo().isMapFeaturesEnabled(),
                    this.generatorSettings) :
            (this.terrainType == WorldType.DEBUG_WORLD ?
                    new ChunkProviderDebug(this.worldObj) :
                    (this.terrainType == WorldType.CUSTOMIZED ?
                            new ChunkProviderGenerate(this.worldObj, this.worldObj.getSeed(), this.worldObj.getWorldInfo().isMapFeaturesEnabled(),
                                    this.generatorSettings) :
                            new ChunkProviderGenerate(this.worldObj, this.worldObj.getSeed(), this.worldObj.getWorldInfo().isMapFeaturesEnabled(),
                                    this.generatorSettings)));

    if (this.dimensionType.hasChunkProvider()) {
        final ChunkProviderCustom chunkProviderCustom = this.dimensionType.getChunkProvider();
        chunkProviderCustom.setWorld((net.canarymod.api.world.World) this.worldObj);
        return new NeptuneChunkProviderCustom(chunkProviderCustom, chunkProvider);
    } else {
        return chunkProvider;
    }
}
 
开发者ID:NeptunePowered,项目名称:NeptuneMod,代码行数:26,代码来源:MixinWorldProvider.java


示例2: createChunkGenerator

import net.minecraft.world.gen.ChunkProviderDebug; //导入依赖的package包/类
/**
 * Returns a new chunk provider which generates chunks for this world
 */
public IChunkProvider createChunkGenerator()
{
    return (IChunkProvider)(this.terrainType == WorldType.FLAT ? new ChunkProviderFlat(this.worldObj, this.worldObj.getSeed(), this.worldObj.getWorldInfo().isMapFeaturesEnabled(), this.generatorSettings) : (this.terrainType == WorldType.DEBUG_WORLD ? new ChunkProviderDebug(this.worldObj) : (this.terrainType == WorldType.CUSTOMIZED ? new ChunkProviderGenerate(this.worldObj, this.worldObj.getSeed(), this.worldObj.getWorldInfo().isMapFeaturesEnabled(), this.generatorSettings) : new ChunkProviderGenerate(this.worldObj, this.worldObj.getSeed(), this.worldObj.getWorldInfo().isMapFeaturesEnabled(), this.generatorSettings))));
}
 
开发者ID:Notoh,项目名称:DecompiledMinecraft,代码行数:8,代码来源:WorldProvider.java


示例3: getBlockState

import net.minecraft.world.gen.ChunkProviderDebug; //导入依赖的package包/类
public IBlockState getBlockState(final BlockPos pos)
{
    if (this.worldObj.getWorldType() == WorldType.DEBUG_WORLD)
    {
        IBlockState iblockstate = null;

        if (pos.getY() == 60)
        {
            iblockstate = Blocks.barrier.getDefaultState();
        }

        if (pos.getY() == 70)
        {
            iblockstate = ChunkProviderDebug.func_177461_b(pos.getX(), pos.getZ());
        }

        return iblockstate == null ? Blocks.air.getDefaultState() : iblockstate;
    }
    else
    {
        try
        {
            if (pos.getY() >= 0 && pos.getY() >> 4 < this.storageArrays.length)
            {
                ExtendedBlockStorage extendedblockstorage = this.storageArrays[pos.getY() >> 4];

                if (extendedblockstorage != null)
                {
                    int j = pos.getX() & 15;
                    int k = pos.getY() & 15;
                    int i = pos.getZ() & 15;
                    return extendedblockstorage.get(j, k, i);
                }
            }

            return Blocks.air.getDefaultState();
        }
        catch (Throwable throwable)
        {
            CrashReport crashreport = CrashReport.makeCrashReport(throwable, "Getting block state");
            CrashReportCategory crashreportcategory = crashreport.makeCategory("Block being got");
            crashreportcategory.addCrashSectionCallable("Location", new Callable<String>()
            {
                public String call() throws Exception
                {
                    return CrashReportCategory.getCoordinateInfo(pos);
                }
            });
            throw new ReportedException(crashreport);
        }
    }
}
 
开发者ID:Notoh,项目名称:DecompiledMinecraft,代码行数:53,代码来源:Chunk.java


示例4: createChunkGenerator

import net.minecraft.world.gen.ChunkProviderDebug; //导入依赖的package包/类
public IChunkGenerator createChunkGenerator()
{
    return (IChunkGenerator)(this.terrainType == WorldType.FLAT ? new ChunkProviderFlat(this.worldObj, this.worldObj.getSeed(), this.worldObj.getWorldInfo().isMapFeaturesEnabled(), this.generatorSettings) : (this.terrainType == WorldType.DEBUG_WORLD ? new ChunkProviderDebug(this.worldObj) : (this.terrainType == WorldType.CUSTOMIZED ? new ChunkProviderOverworld(this.worldObj, this.worldObj.getSeed(), this.worldObj.getWorldInfo().isMapFeaturesEnabled(), this.generatorSettings) : new ChunkProviderOverworld(this.worldObj, this.worldObj.getSeed(), this.worldObj.getWorldInfo().isMapFeaturesEnabled(), this.generatorSettings))));
}
 
开发者ID:NSExceptional,项目名称:Zombe-Modpack,代码行数:5,代码来源:WorldProvider.java


示例5: getBlockState

import net.minecraft.world.gen.ChunkProviderDebug; //导入依赖的package包/类
public IBlockState getBlockState(final int x, final int y, final int z)
{
    if (this.worldObj.getWorldType() == WorldType.DEBUG_WORLD)
    {
        IBlockState iblockstate = null;

        if (y == 60)
        {
            iblockstate = Blocks.BARRIER.getDefaultState();
        }

        if (y == 70)
        {
            iblockstate = ChunkProviderDebug.getBlockStateFor(x, z);
        }

        return iblockstate == null ? Blocks.AIR.getDefaultState() : iblockstate;
    }
    else
    {
        try
        {
            if (y >= 0 && y >> 4 < this.storageArrays.length)
            {
                ExtendedBlockStorage extendedblockstorage = this.storageArrays[y >> 4];

                if (extendedblockstorage != NULL_BLOCK_STORAGE)
                {
                    return extendedblockstorage.get(x & 15, y & 15, z & 15);
                }
            }

            return Blocks.AIR.getDefaultState();
        }
        catch (Throwable throwable)
        {
            CrashReport crashreport = CrashReport.makeCrashReport(throwable, "Getting block state");
            CrashReportCategory crashreportcategory = crashreport.makeCategory("Block being got");
            crashreportcategory.setDetail("Location", new ICrashReportDetail<String>()
            {
                public String call() throws Exception
                {
                    return CrashReportCategory.getCoordinateInfo(x, y, z);
                }
            });
            throw new ReportedException(crashreport);
        }
    }
}
 
开发者ID:sudofox,项目名称:Backmemed,代码行数:50,代码来源:Chunk.java



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


鲜花

握手

雷人

路过

鸡蛋
该文章已有0人参与评论

请发表评论

全部评论

专题导读
上一篇:
Java Resourceble类代码示例发布时间:2022-05-22
下一篇:
Java PipelineAck类代码示例发布时间:2022-05-22
热门推荐
阅读排行榜

扫描微信二维码

查看手机版网站

随时了解更新最新资讯

139-2527-9053

在线客服(服务时间 9:00~18:00)

在线QQ客服
地址:深圳市南山区西丽大学城创智工业园
电邮:jeky_zhao#qq.com
移动电话:139-2527-9053

Powered by 互联科技 X3.4© 2001-2213 极客世界.|Sitemap