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

public abstract class GenerateFilter extends Object implements Cloneable
  • Field Details

    • seed

      public int seed
  • Constructor Details

    • GenerateFilter

      public GenerateFilter()
  • Method Details

    • apply

      public void apply(Tiles tiles, GenerateFilter.GenerateInput in)
    • options

      public abstract FilterOption[] options()
      Returns:
      a new array of options for configuring this filter
    • apply

      public void apply(GenerateFilter.GenerateInput in)
      apply the actual filter on the input
    • draw

      public void draw(Image image)
      draw any additional guides
    • simpleName

      public String simpleName()
    • name

      public String 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

      protected float noise(int seedOffset, GenerateFilter.GenerateInput in, float scl, float mag)
    • noise

      protected float noise(GenerateFilter.GenerateInput in, float scl, float mag)
    • 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

      public GenerateFilter copy()