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

Java WorldGenSpikes类代码示例

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

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



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

示例1: load

import net.minecraft.world.gen.feature.WorldGenSpikes; //导入依赖的package包/类
public WorldGenSpikes.EndSpike[] load(Long p_load_1_) throws Exception
{
    List<Integer> list = Lists.newArrayList(ContiguousSet.create(Range.closedOpen(Integer.valueOf(0), Integer.valueOf(10)), DiscreteDomain.integers()));
    Collections.shuffle(list, new Random(p_load_1_.longValue()));
    WorldGenSpikes.EndSpike[] aworldgenspikes$endspike = new WorldGenSpikes.EndSpike[10];

    for (int i = 0; i < 10; ++i)
    {
        int j = (int)(42.0D * Math.cos(2.0D * (-Math.PI + (Math.PI / 10D) * (double)i)));
        int k = (int)(42.0D * Math.sin(2.0D * (-Math.PI + (Math.PI / 10D) * (double)i)));
        int l = ((Integer)list.get(i)).intValue();
        int i1 = 2 + l / 3;
        int j1 = 76 + l * 3;
        boolean flag = l == 1 || l == 2;
        aworldgenspikes$endspike[i] = new WorldGenSpikes.EndSpike(j, k, i1, j1, flag);
    }

    return aworldgenspikes$endspike;
}
 
开发者ID:sudofox,项目名称:Backmemed,代码行数:20,代码来源:BiomeEndDecorator.java


示例2: genDecorations

import net.minecraft.world.gen.feature.WorldGenSpikes; //导入依赖的package包/类
protected void genDecorations(Biome biomeIn, World worldIn, Random random)
{
    this.generateOres(worldIn, random);
    WorldGenSpikes.EndSpike[] aworldgenspikes$endspike = getSpikesForWorld(worldIn);

    for (WorldGenSpikes.EndSpike worldgenspikes$endspike : aworldgenspikes$endspike)
    {
        if (worldgenspikes$endspike.doesStartInChunk(this.chunkPos))
        {
            this.spikeGen.setSpike(worldgenspikes$endspike);
            this.spikeGen.generate(worldIn, random, new BlockPos(worldgenspikes$endspike.getCenterX(), 45, worldgenspikes$endspike.getCenterZ()));
        }
    }
}
 
开发者ID:sudofox,项目名称:Backmemed,代码行数:15,代码来源:BiomeEndDecorator.java


示例3: findAliveCrystals

import net.minecraft.world.gen.feature.WorldGenSpikes; //导入依赖的package包/类
private void findAliveCrystals()
{
    this.ticksSinceCrystalsScanned = 0;
    this.aliveCrystals = 0;

    for (WorldGenSpikes.EndSpike worldgenspikes$endspike : BiomeEndDecorator.getSpikesForWorld(this.world))
    {
        this.aliveCrystals += this.world.getEntitiesWithinAABB(EntityEnderCrystal.class, worldgenspikes$endspike.getTopBoundingBox()).size();
    }

    LOGGER.debug("Found {} end crystals still alive", new Object[] {Integer.valueOf(this.aliveCrystals)});
}
 
开发者ID:sudofox,项目名称:Backmemed,代码行数:13,代码来源:DragonFightManager.java


示例4: resetSpikeCrystals

import net.minecraft.world.gen.feature.WorldGenSpikes; //导入依赖的package包/类
public void resetSpikeCrystals()
{
    for (WorldGenSpikes.EndSpike worldgenspikes$endspike : BiomeEndDecorator.getSpikesForWorld(this.world))
    {
        for (EntityEnderCrystal entityendercrystal : this.world.getEntitiesWithinAABB(EntityEnderCrystal.class, worldgenspikes$endspike.getTopBoundingBox()))
        {
            entityendercrystal.setEntityInvulnerable(false);
            entityendercrystal.setBeamTarget((BlockPos)null);
        }
    }
}
 
开发者ID:sudofox,项目名称:Backmemed,代码行数:12,代码来源:DragonFightManager.java


示例5: populate

import net.minecraft.world.gen.feature.WorldGenSpikes; //导入依赖的package包/类
@Override public void populate(int x, int z)
{
    if (YUNoMakeGoodMap.instance.shouldBeVoid(world))
    {
        WorldGenSpikes.EndSpike[] aworldgenspikes$endspike = BiomeEndDecorator.getSpikesForWorld(world);

        for (WorldGenSpikes.EndSpike worldgenspikes$endspike : aworldgenspikes$endspike)
        {
            if (worldgenspikes$endspike.doesStartInChunk(new BlockPos(x*16, 0, z*16)))
            {
                this.spikes.setSpike(worldgenspikes$endspike);
                this.spikes.generate(world, endRNG, new BlockPos(worldgenspikes$endspike.getCenterX(), 45, worldgenspikes$endspike.getCenterZ()));
            }
        }
    }

    if (YUNoMakeGoodMap.instance.shouldGenerateEndCities(this.world))
    {
        this.endCityGen.generateStructure(world, endRNG, new ChunkPos(x, z));
    }

    if (x == 0 && z == 0)
    {
        // Allows exit portal to be placed correctly. DragonFightManager will take over from here...
        world.setBlockState(new BlockPos(0, 45, 0), Blocks.END_STONE.getDefaultState());
    }
}
 
开发者ID:LexManos,项目名称:YUNoMakeGoodMap,代码行数:28,代码来源:WorldProviderEndVoid.java


示例6: getSpikesForWorld

import net.minecraft.world.gen.feature.WorldGenSpikes; //导入依赖的package包/类
public static WorldGenSpikes.EndSpike[] getSpikesForWorld(World p_185426_0_)
{
    Random random = new Random(p_185426_0_.getSeed());
    long i = random.nextLong() & 65535L;
    return (WorldGenSpikes.EndSpike[])SPIKE_CACHE.getUnchecked(Long.valueOf(i));
}
 
开发者ID:sudofox,项目名称:Backmemed,代码行数:7,代码来源:BiomeEndDecorator.java


示例7: BiomeEndDecorator

import net.minecraft.world.gen.feature.WorldGenSpikes; //导入依赖的package包/类
public BiomeEndDecorator()
{
    this.spikeGen = new WorldGenSpikes(Blocks.end_stone);
}
 
开发者ID:MinecraftModdedClients,项目名称:Resilience-Client-Source,代码行数:5,代码来源:BiomeEndDecorator.java


示例8: BiomeEndDecorator

import net.minecraft.world.gen.feature.WorldGenSpikes; //导入依赖的package包/类
public BiomeEndDecorator(BiomeGenBase p_i1991_1_) {
   super(p_i1991_1_);
   this.field_76835_L = new WorldGenSpikes(Block.field_72082_bJ.field_71990_ca);
}
 
开发者ID:HATB0T,项目名称:RuneCraftery,代码行数:5,代码来源:BiomeEndDecorator.java


示例9: BiomeEndDecorator

import net.minecraft.world.gen.feature.WorldGenSpikes; //导入依赖的package包/类
public BiomeEndDecorator(BiomeGenBase par1BiomeGenBase)
{
    super(par1BiomeGenBase);
    this.spikeGen = new WorldGenSpikes(Block.whiteStone.blockID);
}
 
开发者ID:HATB0T,项目名称:RuneCraftery,代码行数:6,代码来源:BiomeEndDecorator.java



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


鲜花

握手

雷人

路过

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

请发表评论

全部评论

专题导读
上一篇:
Java SeekableStreamFactory类代码示例发布时间:2022-05-22
下一篇:
Java XMLSchemaLoader类代码示例发布时间: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