public static class WildMap.MixedWildMap extends WildMap implements java.io.Serializable
WildMap
that serves as a ragged edge between 2, 3, or 4 WildMaps in a square intersection.
You almost always supply 4 WildMaps to this (typically not other MixedWildMaps), one for each corner of the map,
and this generates an uneven border between them. Make sure to look up the indices in the WildMap.content
and
WildMap.floors
using this MixedWildMap's WildMap.contentTypes
and WildMap.floorTypes
, not the ones in the
inner WildMaps, because the indices in the MixedWildMap are different.WildMap.MixedWildMap
Modifier and Type | Field and Description |
---|---|
protected int[] |
maxContents |
protected int[] |
maxFloors |
protected int[] |
minContents |
protected int[] |
minFloors |
int[][] |
pieceMap |
WildMap[] |
pieces |
biome, content, contentTypes, floors, floorTypes, height, rng, width
Constructor and Description |
---|
MixedWildMap() |
MixedWildMap(WildMap northeast,
WildMap southeast,
WildMap southwest,
WildMap northwest,
IStatefulRNG rng) |
Modifier and Type | Method and Description |
---|---|
void |
generate()
Produces a map by filling the
WildMap.floors 2D array with indices into WildMap.floorTypes , and similarly
filling the WildMap.content 2D array with indices into WildMap.contentTypes . |
protected void |
preparePieceMap() |
contentByBiome, floorsByBiome, makeRepeats, makeShuffledRepeats, makeVegetation, pathsByBiome
public final int[][] pieceMap
public final WildMap[] pieces
protected final int[] minFloors
protected final int[] maxFloors
protected final int[] minContents
protected final int[] maxContents
public MixedWildMap()
public MixedWildMap(WildMap northeast, WildMap southeast, WildMap southwest, WildMap northwest, IStatefulRNG rng)
protected void preparePieceMap()
public void generate()
WildMap
WildMap.floors
2D array with indices into WildMap.floorTypes
, and similarly
filling the WildMap.content
2D array with indices into WildMap.contentTypes
. You only need to call this method
when you first generate a map with the specific parameters you want, such as biome, and later if you want another
map with the same parameters.
BlueNoise
, adjusted to fit
wilderness maps slightly.Copyright © Eben Howard 2012–2022. All rights reserved.