Package mindustry.maps.generators
Class BasicGenerator
java.lang.Object
mindustry.maps.generators.BasicGenerator
- All Implemented Interfaces:
WorldGenerator
- Direct Known Subclasses:
PlanetGenerator
-
Field Summary
-
Constructor Summary
-
Method Summary
Modifier and TypeMethodDescriptionvoid
void
void
cells
(int iterations) void
cells
(int iterations, int birthLimit, int deathLimit, int cradius) void
cliffs()
void
decoration
(float chance) void
distort
(float scl, float mag) void
void
erase
(int cx, int cy, int rad) protected void
generate()
void
void
inverseFloodFill
(Tile start) void
median
(int radius) void
median
(int radius, double percentile) void
boolean
boolean
nearAir
(int x, int y) boolean
nearWall
(int x, int y) protected float
noise
(float x, float y, double scl, double mag) protected float
noise
(float x, float y, double octaves, double falloff, double scl) protected abstract float
noise
(float x, float y, double octaves, double falloff, double scl, double mag) void
void
void
void
void
overlay
(Block floor, Block block, float chance, int octaves, float falloff, float scl, float threshold) void
pathfind
(int startX, int startY, int endX, int endY, Astar.TileHueristic th, Astar.DistanceHeuristic dh) void
removeWall
(int cx, int cy, int rad, Boolf<Block> pred) void
void
tech()
void
void
void
trimDark()
void
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
Methods inherited from interface mindustry.maps.generators.WorldGenerator
postGenerate
-
Field Details
-
ints1
-
ints2
-
rand
-
width
protected int width -
height
protected int height -
tiles
-
floor
-
block
-
ore
-
defaultLoadout
-
-
Constructor Details
-
BasicGenerator
public BasicGenerator()
-
-
Method Details
-
generate
- Specified by:
generate
in interfaceWorldGenerator
-
generate
protected void generate() -
median
public void median(int radius) -
median
public void median(int radius, double percentile) -
median
-
ores
-
ore
-
oreAround
-
wallOre
-
cliffs
public void cliffs() -
terrain
-
noise
-
overlay
-
tech
public void tech() -
tech
-
distort
public void distort(float scl, float mag) -
scatter
-
each
-
cells
public void cells(int iterations) -
cells
public void cells(int iterations, int birthLimit, int deathLimit, int cradius) -
noise
protected float noise(float x, float y, double scl, double mag) -
noise
protected abstract float noise(float x, float y, double octaves, double falloff, double scl, double mag) -
noise
protected float noise(float x, float y, double octaves, double falloff, double scl) -
pass
-
nearWall
public boolean nearWall(int x, int y) -
nearAir
public boolean nearAir(int x, int y) -
removeWall
-
near
-
decoration
public void decoration(float chance) -
blend
-
brush
-
erase
public void erase(int cx, int cy, int rad) -
pathfind
public Seq<Tile> pathfind(int startX, int startY, int endX, int endY, Astar.TileHueristic th, Astar.DistanceHeuristic dh) -
trimDark
public void trimDark() -
inverseFloodFill
-