Java 类net.minecraft.world.gen.feature.WorldGenSpikes 实例源码

项目:Backmemed    文件:BiomeEndDecorator.java   
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;
}
项目:CustomWorldGen    文件:BiomeEndDecorator.java   
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;
}
项目:Backmemed    文件:BiomeEndDecorator.java   
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()));
        }
    }
}
项目:Backmemed    文件:DragonFightManager.java   
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)});
}
项目:Backmemed    文件:DragonFightManager.java   
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);
        }
    }
}
项目:CustomWorldGen    文件:BiomeEndDecorator.java   
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()));
        }
    }
}
项目:CustomWorldGen    文件:DragonFightManager.java   
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)});
}
项目:CustomWorldGen    文件:DragonFightManager.java   
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);
        }
    }
}
项目:YUNoMakeGoodMap    文件:WorldProviderEndVoid.java   
@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());
    }
}
项目:Backmemed    文件:BiomeEndDecorator.java   
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));
}
项目:CustomWorldGen    文件:BiomeEndDecorator.java   
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));
}
项目:Resilience-Client-Source    文件:BiomeEndDecorator.java   
public BiomeEndDecorator()
{
    this.spikeGen = new WorldGenSpikes(Blocks.end_stone);
}
项目:Cauldron    文件:BiomeEndDecorator.java   
public BiomeEndDecorator()
{
    this.spikeGen = new WorldGenSpikes(Blocks.end_stone);
}
项目:Cauldron    文件:BiomeEndDecorator.java   
public BiomeEndDecorator()
{
    this.spikeGen = new WorldGenSpikes(Blocks.end_stone);
}
项目:RuneCraftery    文件:BiomeEndDecorator.java   
public BiomeEndDecorator(BiomeGenBase p_i1991_1_) {
   super(p_i1991_1_);
   this.field_76835_L = new WorldGenSpikes(Block.field_72082_bJ.field_71990_ca);
}
项目:RuneCraftery    文件:BiomeEndDecorator.java   
public BiomeEndDecorator(BiomeGenBase par1BiomeGenBase)
{
    super(par1BiomeGenBase);
    this.spikeGen = new WorldGenSpikes(Block.whiteStone.blockID);
}
项目:BetterNutritionMod    文件:BiomeEndDecorator.java   
public BiomeEndDecorator(BiomeGenBase par1BiomeGenBase)
{
    super(par1BiomeGenBase);
    this.spikeGen = new WorldGenSpikes(Block.whiteStone.blockID);
}