[This is preliminary documentation and is subject to change.]
Represents a map file (associated with a world or not).
Maps can be created blank (using Map constructor), generated terrain (using MapGenerator),
or loaded from file (using fCraft.MapConversion.MapUtility).
Namespace: fCraftAssembly: fCraft (in fCraft.dll) Version: 0.6.3.1 (0.6.3.1)
Syntax
| C# |
public sealed class Map
Members
| All Members | Constructors | Fields | Properties | Methods |
| Member | Description | |
|---|---|---|
| Map(World, Int32, Int32, Int32, Boolean) | Creates an empty new map of given dimensions.
Dimensions cannot be changed after creation. | |
| Blocks | Array of map blocks.
Use Index(x,y,h) to convert coordinates to array indices.
Use QueueUpdate() for working on live maps to
ensure that all players get updated. | |
| Bounds | Map boundaries. Can be useful for calculating volume or interesections. | |
| CancelAllDrawOps()()()() | Cancels and stops all active draw operations. | |
| ClearUpdateQueue()()()() | Clears all pending updates. | |
| ComputeHeightmap()()()() | Calculates a 2D heightmap, based on the highest solid block for each column of blocks.
Air, Brown/Red mushrooms, Glass, Leaves, Red/Yellow flowers, and Saplings are considered non-solid. | |
| ConvertBlockTypes(array<Byte>[]()[][]) | Converts nonstandard (50-255) blocks using the given mapping. | |
| DateCreated | ||
| DateModified | ||
| DrawQueueBlockCount | Total estimated number of blocks left to process, from all draw operations combined. | |
| DrawQueueLength | Number of active draw operations. | |
| Equals(Object) | (Inherited from Object.) | |
| Finalize()()()() |
Allows an Object to attempt to free resources and perform other cleanup operations before the Object is reclaimed by garbage collection.
(Inherited from Object.) | |
| GetBlock(Vector3I) | Gets a block at given coordinates. Checks bounds. | |
| GetBlock(Int32, Int32, Int32) | Gets a block at given coordinates. Checks bounds. | |
| GetBlockByName(String, Boolean, Block%) | Finds Block corresponding to given blockName. | |
| GetCompressedCopy()()()() | Gets a compressed (GZip) copy of the map (raw block data with signed, 32bit, big-endian block count prepended).
If the map has not been modified since last GetCompressedCopy call, returns a cached copy. | |
| GetHashCode()()()() |
Serves as a hash function for a particular type.
(Inherited from Object.) | |
| GetType()()()() |
Gets the Type of the current instance.
(Inherited from Object.) | |
| Guid | ||
| HasChangedSinceSave | Whether the map was modified since last time it was saved. | |
| Height | Map height, in blocks. Equivalent to Notch's Y (vertical). | |
| InBounds(Vector3I) | Checks whether the given coordinate (in block units) is within the bounds of the map. | |
| InBounds(Int32, Int32, Int32) | Checks whether the given coordinate (in block units) is within the bounds of the map. | |
| Index(Vector3I) | Converts given coordinates to a block array index. | |
| Index(Int32, Int32, Int32) | Converts given coordinates to a block array index. | |
| IsRecommendedDimension(Int32) | Checks if a given map dimension (width, height, or length) is among the set of recommended values
Recommended values are: 16, 32, 64, 128, 256, 512, 1024 | |
| IsValidDimension(Int32) | Checks if a given map dimension (width, height, or length) is acceptable.
Values between 1 and 2047 are technically allowed. | |
| Length | Map length, in blocks. Equivalent to Notch's Z (horizontal). | |
| MemberwiseClone()()()() |
Creates a shallow copy of the current Object.
(Inherited from Object.) | |
| Metadata | Map metadata, excluding zones. | |
| QueueUpdate(BlockUpdate) | Queues a new block update to be processed.
Due to concurrent nature of the server, there is no guarantee
that updates will be applied in any specific order. | |
| RemoveUnknownBlocktypes()()()() | Replaces all nonstandard (50-255) blocks with air. | |
| ResetSpawn()()()() | Resets spawn to the default location (top center of the map). | |
| Save(String) | Saves this map to a file in the default format (FCMv3). | |
| SaveFormat | Current default map format for saving. | |
| SearchColumn(Int32, Int32, Block) | Searches the map, from top to bottom, for the first appearance of a given block. | |
| SearchColumn(Int32, Int32, Block, Int32) | Searches the map, from top to bottom, for the first appearance of a given block. | |
| SetBlock(Int32, Block) | Sets a block at given coordinates. | |
| SetBlock(Vector3I, Block) | Sets a block at given coordinates. Checks bounds. | |
| SetBlock(Int32, Int32, Int32, Block) | Sets a block in a safe way.
Note that using SetBlock does not relay changes to players.
Use QueueUpdate() for changing blocks on live maps/worlds. | |
| Spawn | Default spawning point on the map. | |
| ToString()()()() | (Inherited from Object.) | |
| UpdateQueueLength | Number of blocks that are waiting to be processed. | |
| Volume | Map volume, in terms of blocks. | |
| Width | Map width, in blocks. Equivalent to Notch's X (horizontal). | |
| World | The world associated with this map, if any. May be null. | |
| Zones | All zones within a map. |