public class DistributionHelpers
extends java.lang.Object
| Modifier and Type | Class and Description |
|---|---|
static class |
DistributionHelpers.OrePoint |
| Modifier and Type | Field and Description |
|---|---|
static float |
PI |
| Constructor and Description |
|---|
DistributionHelpers() |
| Modifier and Type | Method and Description |
|---|---|
static DistributionBase |
addDistribution(DistributionBase base,
DistributionBase add) |
static float[] |
addDistribution(float[] base,
float[] add) |
static float[] |
addDistribution(float[] base,
float[] add,
int offset) |
static float |
calculateChance(int veinCount,
int veinSize,
int minY,
int maxY) |
static int |
calculateMeanLevel(float[] distribution,
int mid) |
static int |
calculateMeanLevel(float[] distribution,
int mid,
int oldMid,
float difference)
Deprecated.
|
static float[] |
divideArray(float[] array,
float num) |
static float[] |
getDistributionFromPoints(DistributionHelpers.OrePoint... points) |
static float[] |
getOverworldSurface() |
static float[] |
getOverworldSurfaceDistribution(int oreDiameter) |
static float[] |
getRampDistribution(int minY,
int maxY,
float maxChance) |
static float[] |
getRampDistribution(int minY,
int maxY,
float minChance,
float maxChance) |
static float[] |
getRoundedSquareDistribution(int min0,
int minY,
int maxY,
int max0,
float chance) |
static float[] |
getSquareDistribution(int minY,
int maxY,
float chance) |
static float[] |
getTriangularDistribution(int midY,
int range,
float maxChance) |
static float[] |
getTriangularDistribution(int minY,
int rand1,
int rand2,
float maxChance) |
static float[] |
getUnderwaterDistribution(float chance) |
static float[] |
maxJoinArray(float[] array1,
float[] array2) |
static float[] |
multiplyArray(float[] array,
float num) |
static float[] |
reverse(float[] array) |
static float |
sum(float[] distribution) |
public static final float PI
public static float[] getTriangularDistribution(int midY,
int range,
float maxChance)
midY - the top, middle of the trianglerange - length of the sidesmaxChance - chance at the toppublic static float[] getTriangularDistribution(int minY,
int rand1,
int rand2,
float maxChance)
public static float[] getSquareDistribution(int minY,
int maxY,
float chance)
minY - first occurrencemaxY - last occurrencechance - the chancepublic static float[] getRoundedSquareDistribution(int min0,
int minY,
int maxY,
int max0,
float chance)
min0 - start of the rampminY - end of the ramp upmaxY - start of the ramp downmax0 - end of ramp downchance - the chance at the toppublic static float[] getUnderwaterDistribution(float chance)
public static float[] getRampDistribution(int minY,
int maxY,
float minChance,
float maxChance)
minY - first occurrencemaxY - last occurrenceminChance - change at the bottom of the rampmaxChance - chance at the top of the ramppublic static float[] getRampDistribution(int minY,
int maxY,
float maxChance)
public static float[] getOverworldSurfaceDistribution(int oreDiameter)
public static float[] getOverworldSurface()
public static float[] addDistribution(float[] base,
float[] add)
base - base distributionadd - the to add distributionpublic static DistributionBase addDistribution(DistributionBase base, DistributionBase add)
public static float[] addDistribution(float[] base,
float[] add,
int offset)
base - base distributionadd - the to add distributionoffset - the first element from the base array to start adding topublic static float[] reverse(float[] array)
array - the float array to reverse@Deprecated
public static int calculateMeanLevel(float[] distribution,
int mid,
int oldMid,
float difference)
public static int calculateMeanLevel(float[] distribution,
int mid)
distribution - the target arraymid - the "best guess" of the midpointpublic static float[] divideArray(float[] array,
float num)
array - the to divide arraynum - the denominatorpublic static float[] multiplyArray(float[] array,
float num)
array - the to multiply arraynum - the multiplierpublic static float[] maxJoinArray(float[] array1,
float[] array2)
public static float sum(float[] distribution)
public static float calculateChance(int veinCount,
int veinSize,
int minY,
int maxY)
veinCount - the amount of veins per chunkveinSize - the amount of blocks per veinminY - the lowest Y value for a veinmaxY - the highest Y value for a veinpublic static float[] getDistributionFromPoints(DistributionHelpers.OrePoint... points)