BiomeEndDecorator .java

net.minecraft.world.biome.BiomeEndDecorator (class): members: spikeGen, genDecorations. imports: WorldGenSpikes, EntityDragon, WorldGenerator, Blocks.

net.minecraft.world.biomeclass31 linescommonextends BiomeDecorator1.1 KB

API Surface (1)

void genDecorations(BiomeGenBase biomeGenBaseIn)

Fields & Constants (1)

spikeGen

Code Graph: Dependencies (8)

Edges (calls / imports / inherits / references) resolved by graphify from the AST. Every chip opens the class source.

Full Source

BiomeEndDecorator.java31 lines · MCP 1.8.9 · verbatimOriginal ↗
1
package net.minecraft.world.biome;
2
3
import net.minecraft.entity.boss.EntityDragon;
4
import net.minecraft.init.Blocks;
5
import net.minecraft.world.gen.feature.WorldGenSpikes;
6
import net.minecraft.world.gen.feature.WorldGenerator;
7
8
public class BiomeEndDecorator extends BiomeDecorator
9
{
10
    protected WorldGenerator spikeGen = new WorldGenSpikes(Blocks.end_stone);
11
12
    protected void genDecorations(BiomeGenBase biomeGenBaseIn)
13
    {
14
        this.generateOres();
15
16
        if (this.randomGenerator.nextInt(5) == 0)
17
        {
18
            int i = this.randomGenerator.nextInt(16) + 8;
19
            int j = this.randomGenerator.nextInt(16) + 8;
20
            this.spikeGen.generate(this.currentWorld, this.randomGenerator, this.currentWorld.getTopSolidOrLiquidBlock(this.field_180294_c.add(i, 0, j)));
21
        }
22
23
        if (this.field_180294_c.getX() == 0 && this.field_180294_c.getZ() == 0)
24
        {
25
            EntityDragon entitydragon = new EntityDragon(this.currentWorld);
26
            entitydragon.setLocationAndAngles(0.0D, 128.0D, 0.0D, this.randomGenerator.nextFloat() * 360.0F, 0.0F);
27
            this.currentWorld.spawnEntityInWorld(entitydragon);
28
        }
29
    }
30
}
31

Deobfuscated MCP 1.8.9 source of BiomeEndDecorator from Marcelektro/MavenMCP-1.8.9 (net/minecraft/world/biome/BiomeEndDecorator.java), stored verbatim.