initial commit
This commit is contained in:
parent
3c9ee26b06
commit
22186c33b9
1458 changed files with 282792 additions and 0 deletions
31
java/src/game/worldgen/layer/GenLayerRiverInit.java
Executable file
31
java/src/game/worldgen/layer/GenLayerRiverInit.java
Executable file
|
@ -0,0 +1,31 @@
|
|||
package game.worldgen.layer;
|
||||
|
||||
public class GenLayerRiverInit extends GenLayer
|
||||
{
|
||||
public GenLayerRiverInit(long p_i2127_1_, GenLayer p_i2127_3_)
|
||||
{
|
||||
super(p_i2127_1_);
|
||||
this.parent = p_i2127_3_;
|
||||
}
|
||||
|
||||
/**
|
||||
* Returns a list of integer values generated by this layer. These may be interpreted as temperatures, rainfall
|
||||
* amounts, or biomeList[] indices based on the particular GenLayer subclass.
|
||||
*/
|
||||
public int[] getInts(int areaX, int areaY, int areaWidth, int areaHeight)
|
||||
{
|
||||
int[] aint = this.parent.getInts(areaX, areaY, areaWidth, areaHeight);
|
||||
int[] aint1 = IntCache.getIntCache(areaWidth * areaHeight);
|
||||
|
||||
for (int i = 0; i < areaHeight; ++i)
|
||||
{
|
||||
for (int j = 0; j < areaWidth; ++j)
|
||||
{
|
||||
this.initChunkSeed((long)(j + areaX), (long)(i + areaY));
|
||||
aint1[j + i * areaWidth] = aint[j + i * areaWidth] > 0 ? this.nextInt(299999) + 2 : 0;
|
||||
}
|
||||
}
|
||||
|
||||
return aint1;
|
||||
}
|
||||
}
|
Loading…
Add table
Add a link
Reference in a new issue