BiomeGenDesert .java

net.minecraft.world.biome.BiomeGenDesert (class, 37 lines): extends BiomeGenBase. members: decorate. imports: WorldGenDesertWells, Blocks, World.

net.minecraft.world.biomeclass37 linescommonextends BiomeGenBase1.1 KB

API Surface (1)

void decorate(World worldIn, Random rand, BlockPos pos)

Code Graph: Dependencies (5)

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

Full Source

BiomeGenDesert.java37 lines · MCP 1.8.9 · verbatimOriginal ↗
1
package net.minecraft.world.biome;
2
3
import java.util.Random;
4
import net.minecraft.init.Blocks;
5
import net.minecraft.util.BlockPos;
6
import net.minecraft.world.World;
7
import net.minecraft.world.gen.feature.WorldGenDesertWells;
8
9
public class BiomeGenDesert extends BiomeGenBase
10
{
11
    public BiomeGenDesert(int id)
12
    {
13
        super(id);
14
        this.spawnableCreatureList.clear();
15
        this.topBlock = Blocks.sand.getDefaultState();
16
        this.fillerBlock = Blocks.sand.getDefaultState();
17
        this.theBiomeDecorator.treesPerChunk = -999;
18
        this.theBiomeDecorator.deadBushPerChunk = 2;
19
        this.theBiomeDecorator.reedsPerChunk = 50;
20
        this.theBiomeDecorator.cactiPerChunk = 10;
21
        this.spawnableCreatureList.clear();
22
    }
23
24
    public void decorate(World worldIn, Random rand, BlockPos pos)
25
    {
26
        super.decorate(worldIn, rand, pos);
27
28
        if (rand.nextInt(1000) == 0)
29
        {
30
            int i = rand.nextInt(16) + 8;
31
            int j = rand.nextInt(16) + 8;
32
            BlockPos blockpos = worldIn.getHeight(pos.add(i, 0, j)).up();
33
            (new WorldGenDesertWells()).generate(worldIn, rand, blockpos);
34
        }
35
    }
36
}
37

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