GenLayerRiverInit .java

net.minecraft.world.gen.layer.GenLayerRiverInit (class, 32 lines): extends GenLayer. members: getInts.

net.minecraft.world.gen.layerclass32 linescommonextends GenLayer1.0 KB

API Surface (1)

int[] getInts(int areaX, int areaY, int areaWidth, int areaHeight)

Code Graph: Dependencies (2)

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

Full Source

GenLayerRiverInit.java32 lines · MCP 1.8.9 · verbatimOriginal ↗
1
package net.minecraft.world.gen.layer;
2
3
public class GenLayerRiverInit extends GenLayer
4
{
5
    public GenLayerRiverInit(long p_i2127_1_, GenLayer p_i2127_3_)
6
    {
7
        super(p_i2127_1_);
8
        this.parent = p_i2127_3_;
9
    }
10
11
    /**
12
     * Returns a list of integer values generated by this layer. These may be interpreted as temperatures, rainfall
13
     * amounts, or biomeList[] indices based on the particular GenLayer subclass.
14
     */
15
    public int[] getInts(int areaX, int areaY, int areaWidth, int areaHeight)
16
    {
17
        int[] aint = this.parent.getInts(areaX, areaY, areaWidth, areaHeight);
18
        int[] aint1 = IntCache.getIntCache(areaWidth * areaHeight);
19
20
        for (int i = 0; i < areaHeight; ++i)
21
        {
22
            for (int j = 0; j < areaWidth; ++j)
23
            {
24
                this.initChunkSeed((long)(j + areaX), (long)(i + areaY));
25
                aint1[j + i * areaWidth] = aint[j + i * areaWidth] > 0 ? this.nextInt(299999) + 2 : 0;
26
            }
27
        }
28
29
        return aint1;
30
    }
31
}
32

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