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
| 1 | package net.minecraft.world.gen.layer;
|
| 2 |
|
| 3 | public class GenLayerAddSnow extends GenLayer
|
| 4 | {
|
| 5 | public GenLayerAddSnow(long p_i2121_1_, GenLayer p_i2121_3_)
|
| 6 | {
|
| 7 | super(p_i2121_1_);
|
| 8 | this.parent = p_i2121_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 i = areaX - 1;
|
| 18 | int j = areaY - 1;
|
| 19 | int k = areaWidth + 2;
|
| 20 | int l = areaHeight + 2;
|
| 21 | int[] aint = this.parent.getInts(i, j, k, l);
|
| 22 | int[] aint1 = IntCache.getIntCache(areaWidth * areaHeight);
|
| 23 |
|
| 24 | for (int i1 = 0; i1 < areaHeight; ++i1)
|
| 25 | {
|
| 26 | for (int j1 = 0; j1 < areaWidth; ++j1)
|
| 27 | {
|
| 28 | int k1 = aint[j1 + 1 + (i1 + 1) * k];
|
| 29 | this.initChunkSeed((long)(j1 + areaX), (long)(i1 + areaY));
|
| 30 |
|
| 31 | if (k1 == 0)
|
| 32 | {
|
| 33 | aint1[j1 + i1 * areaWidth] = 0;
|
| 34 | }
|
| 35 | else
|
| 36 | {
|
| 37 | int l1 = this.nextInt(6);
|
| 38 |
|
| 39 | if (l1 == 0)
|
| 40 | {
|
| 41 | l1 = 4;
|
| 42 | }
|
| 43 | else if (l1 <= 1)
|
| 44 | {
|
| 45 | l1 = 3;
|
| 46 | }
|
| 47 | else
|
| 48 | {
|
| 49 | l1 = 1;
|
| 50 | }
|
| 51 |
|
| 52 | aint1[j1 + i1 * areaWidth] = l1;
|
| 53 | }
|
| 54 | }
|
| 55 | }
|
| 56 |
|
| 57 | return aint1;
|
| 58 | }
|
| 59 | }
|
| 60 |
|
Deobfuscated MCP 1.8.9 source of GenLayerAddSnow from Marcelektro/MavenMCP-1.8.9 (net/minecraft/world/gen/layer/GenLayerAddSnow.java), stored verbatim.