    001package net.minecraft.world.biome;
    002
    003import net.minecraft.block.Block;
    004import net.minecraft.entity.boss.EntityDragon;
    005import net.minecraft.world.gen.feature.WorldGenSpikes;
    006import net.minecraft.world.gen.feature.WorldGenerator;
    007
    008public class BiomeEndDecorator extends BiomeDecorator
    009{
    010    protected WorldGenerator spikeGen;
    011
    012    public BiomeEndDecorator(BiomeGenBase par1BiomeGenBase)
    013    {
    014        super(par1BiomeGenBase);
    015        this.spikeGen = new WorldGenSpikes(Block.whiteStone.blockID);
    016    }
    017
    018    /**
    019     * The method that does the work of actually decorating chunks
    020     */
    021    protected void decorate()
    022    {
    023        this.generateOres();
    024
    025        if (this.randomGenerator.nextInt(5) == 0)
    026        {
    027            int i = this.chunk_X + this.randomGenerator.nextInt(16) + 8;
    028            int j = this.chunk_Z + this.randomGenerator.nextInt(16) + 8;
    029            int k = this.currentWorld.getTopSolidOrLiquidBlock(i, j);
    030
    031            if (k > 0)
    032            {
    033                ;
    034            }
    035
    036            this.spikeGen.generate(this.currentWorld, this.randomGenerator, i, k, j);
    037        }
    038
    039        if (this.chunk_X == 0 && this.chunk_Z == 0)
    040        {
    041            EntityDragon entitydragon = new EntityDragon(this.currentWorld);
    042            entitydragon.setLocationAndAngles(0.0D, 128.0D, 0.0D, this.randomGenerator.nextFloat() * 360.0F, 0.0F);
    043            this.currentWorld.spawnEntityInWorld(entitydragon);
    044        }
    045    }
    046}