Package mindustry.maps.filters
Class GenerateFilter
java.lang.Object
mindustry.maps.filters.GenerateFilter
- All Implemented Interfaces:
Cloneable
- Direct Known Subclasses:
BlendFilter
,ClearFilter
,CoreSpawnFilter
,DistortFilter
,EnemySpawnFilter
,MedianFilter
,MirrorFilter
,NoiseFilter
,OreFilter
,OreMedianFilter
,RandomItemFilter
,RiverNoiseFilter
,ScatterFilter
,SpawnPathFilter
,TerrainFilter
-
Nested Class Summary
Modifier and TypeClassDescriptionstatic class
an input for generating at a certain coordinate. -
Field Summary
-
Constructor Summary
-
Method Summary
Modifier and TypeMethodDescriptionvoid
apply the actual filter on the inputvoid
apply
(Tiles tiles, GenerateFilter.GenerateInput in) protected float
chance
(int x, int y) copy()
void
draw any additional guideschar
icon()
boolean
boolean
isPost()
name()
localized display nameprotected float
noise
(float x, float y, float scl, float mag, float octaves, float persistence) protected float
noise
(int seedOffset, GenerateFilter.GenerateInput in, float scl, float mag) protected float
noise
(GenerateFilter.GenerateInput in, float scl, float mag) protected float
noise
(GenerateFilter.GenerateInput in, float scl, float mag, float octaves, float persistence) abstract FilterOption[]
options()
void
set the seed to a random numberprotected float
rnoise
(float x, float y, float scl, float mag) protected float
rnoise
(float x, float y, int octaves, float scl, float falloff, float mag)
-
Field Details
-
seed
public int seed
-
-
Constructor Details
-
GenerateFilter
public GenerateFilter()
-
-
Method Details
-
apply
-
options
- Returns:
- a new array of options for configuring this filter
-
apply
apply the actual filter on the input -
draw
draw any additional guides -
simpleName
-
name
localized display name -
icon
public char icon() -
randomize
public void randomize()set the seed to a random number -
isBuffered
public boolean isBuffered()- Returns:
- whether this filter needs a read/write buffer (e.g. not a 1:1 tile mapping).
-
isPost
public boolean isPost()- Returns:
- whether this filter can *only* be used while generating the map, e.g. is not undoable.
-
noise
-
noise
-
noise
protected float noise(GenerateFilter.GenerateInput in, float scl, float mag, float octaves, float persistence) -
noise
protected float noise(float x, float y, float scl, float mag, float octaves, float persistence) -
rnoise
protected float rnoise(float x, float y, float scl, float mag) -
rnoise
protected float rnoise(float x, float y, int octaves, float scl, float falloff, float mag) -
chance
protected float chance(int x, int y) -
copy
-