Interface IMapRegion
- Namespace
- Vintagestory.API.Common
- Assembly
- VintagestoryAPI.dll
2D Map data for a 16x16 area of chunk columns. Holds a few maps for the chunk generation.
public interface IMapRegion
- Extension Methods
Properties
AnimalSpawnMaps
Density maps for animal spawning
Dictionary<string, ByteDataMap2D> AnimalSpawnMaps { get; set; }
Property Value
BeachMap
Holds a beach strength map
IntDataMap2D BeachMap { get; set; }
Property Value
BlockPatchMaps
Density maps for block patches
Dictionary<string, IntDataMap2D> BlockPatchMaps { get; set; }
Property Value
ClimateMap
Holds temperature and rain fall.
16-23 bits = Red = temperature
8-15 bits = Green = rain
0-7 bits = Blue = unused
IntDataMap2D ClimateMap { get; set; }
Property Value
DirtyForSaving
bool DirtyForSaving { get; set; }
Property Value
FlowerMap
Currently unuseds
IntDataMap2D FlowerMap { get; set; }
Property Value
ForestMap
Holds a forest density map
IntDataMap2D ForestMap { get; set; }
Property Value
GeneratedStructures
List of structures that were generated in this region
List<GeneratedStructure> GeneratedStructures { get; }
Property Value
GeologicProvinceMap
Holds the geologic province indices
IntDataMap2D GeologicProvinceMap { get; set; }
Property Value
LandformMap
Holds the landform indices
IntDataMap2D LandformMap { get; set; }
Property Value
ModData
Holds the raw mod data.
[Obsolete("Use Get/Set/RemoveModData instead")]
Dictionary<string, byte[]> ModData { get; }
Property Value
- Dictionary<string, byte[]>
ModMaps
Holds the mod mappings.
Dictionary<string, IntDataMap2D> ModMaps { get; }
Property Value
OceanMap
IntDataMap2D OceanMap { get; set; }
Property Value
OreMapVerticalDistortBottom
IntDataMap2D OreMapVerticalDistortBottom { get; }
Property Value
OreMapVerticalDistortTop
IntDataMap2D OreMapVerticalDistortTop { get; }
Property Value
OreMaps
Gets the ore map for the given item.
Dictionary<string, IntDataMap2D> OreMaps { get; }
Property Value
RiversMap
Rivers map for medium rivers
long[] RiversMap { get; set; }
Property Value
- long[]
RockStrata
Holds the rock strata noise maps
IntDataMap2D[] RockStrata { get; set; }
Property Value
ShrubMap
Holds a shrub density map
IntDataMap2D ShrubMap { get; set; }
Property Value
TerrainMap
Low-resolution terrain height map
ushort[] TerrainMap { get; set; }
Property Value
- ushort[]
UpheavelMap
IntDataMap2D UpheavelMap { get; set; }
Property Value
Methods
AddGeneratedStructure(GeneratedStructure)
A thread-safe way to add a new GeneratedStructure, also marks DirtyForSaving = true
void AddGeneratedStructure(GeneratedStructure generatedStructure)
Parameters
generatedStructureGeneratedStructure
AddGeneratedStructures(IEnumerable<GeneratedStructure>)
A thread-safe way to add new GeneratedStructures, also marks DirtyForSaving = true
void AddGeneratedStructures(IEnumerable<GeneratedStructure> generatedStructure)
Parameters
generatedStructureIEnumerable<GeneratedStructure>
GetModdata(string)
Server: Retrieve arbitrary, permanently stored mod data Client: Not implemented. Map chunk Moddata is not synced from server to client
byte[] GetModdata(string key)
Parameters
keystring
Returns
- byte[]
GetModdata<T>(string)
Server: Retrieve arbitrary, permantly stored mod data Client: Not implemented. Map chunk Moddata is not synced from server to client
T GetModdata<T>(string key)
Parameters
keystring
Returns
- T
Type Parameters
T
RemoveModdata(string)
Server: Removes the permanently stored data. Client: Not implemented. Map chunk Moddata is not synced from server to client
void RemoveModdata(string key)
Parameters
keystring
SetModdata(string, byte[])
Server: Allows setting of arbitrary, permanently stored moddata of this map region. Client: Not implemented. Map chunk Moddata is not synced from server to client
void SetModdata(string key, byte[] data)
Parameters
SetModdata<T>(string, T)
Server: Allows setting of arbitrary, permanantly stored moddata of this map region. Client: Not implemented. Map chunk Moddata is not synced from server to client
void SetModdata<T>(string key, T data)
Parameters
keystringdataT
Type Parameters
T
UpdateLowResTerrainPadding(IMapRegion, int, int, int)
Add a map region's terrainmap data to the padding regions of its neighbor's terrainmap
void UpdateLowResTerrainPadding(IMapRegion mapRegion, int dx, int dz, int mapSize)
Parameters
mapRegionIMapRegiondxintdzintmapSizeint