C# 클래스 fCraft.Map

파일 보기 프로젝트 열기: GlennMR/800craft 1 사용 예제들

공개 프로퍼티들

프로퍼티 타입 설명
Blocks byte[]
Bounds BoundingBox
DoorID int
Doors System.Collections.ArrayList
Height int
Length int
MessageBlockID int
MessageBlocks System.Collections.ArrayList
Portals System.Collections.ArrayList
Shadows ].short[
Volume int
Width int
portalID int

Private Properties

프로퍼티 타입 설명
DefineFallbackBlocks void
GetEdgeTexture string
Map System
OnMetaOrZoneChange void
ProcessDrawOps int
ProcessUpdates void
QueueDrawOp void

공개 메소드들

메소드 설명
CalculateShadows ( ) : void
ClearUpdateQueue ( ) : void

Clears all pending updates.

ConvertBlockTypes ( [ mapping ) : bool

Converts nonstandard (50-255) blocks using the given mapping.

GetBlock ( Vector3I coords ) : Block

Gets a block at given coordinates. Checks bounds.

GetBlock ( int x, int y, int z ) : Block

Gets a block at given coordinates. Checks bounds.

GetBlockByName ( [ blockName ) : Block

Tries to find a blocktype by name.

GetCompressedCopy ( [ stream, bool prependBlockCount ) : void

Writes a copy of the current map to a given stream, compressed with GZipStream.

GetFallbackBlock ( Block block ) : Block
GetFallbackMap ( ) : byte[]
InBounds ( Vector3I vec ) : bool

Checks whether the given coordinate (in block units) is within the bounds of the map.

InBounds ( int x, int y, int z ) : bool

Checks whether the given coordinate (in block units) is within the bounds of the map.

Index ( Vector3I coords ) : int

Converts given coordinates to a block array index.

Index ( int x, int y, int z ) : int

Converts given coordinates to a block array index.

IsRecommendedDimension ( int dimension ) : bool

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 ( int dimension ) : bool

Checks if a given map dimension (width, height, or length) is acceptible. Values between 1 and 2047 are technically allowed.

MakeFloodBarrier ( ) : void

Makes an admincrete barrier, 1 block thick, around the lower half of the map.

Map ( World world, int width, int length, int height, bool initBlockArray ) : System

Creates an empty new map of given dimensions. Dimensions cannot be changed after creation.

QueueUpdate ( BlockUpdate update ) : void

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 ( ) : bool

Replaces all nonstandard (50-255) blocks with air.

ResetSpawn ( ) : void

Resets the spawn to a valid Java 7 location (X, Y, and found Z) Old behaviour: Resets spawn to the default location (top center of the map).

Save ( [ fileName ) : bool

Saves this map to a file in the default format (FCMv3).

SearchColumn ( int x, int y, Block id ) : int
SearchColumn ( int x, int y, Block id, int zStart ) : int
SetBlock ( Vector3I coords, Block type ) : void

Sets a block at given coordinates. Checks bounds.

SetBlock ( int x, int y, int z, Block type ) : void

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.

StopAllDrawOps ( ) : void
ValidateHeader ( ) : bool

비공개 메소드들

메소드 설명
DefineFallbackBlocks ( ) : void
GetEdgeTexture ( Block block ) : string
Map ( ) : System
OnMetaOrZoneChange ( object sender, EventArgs args ) : void
ProcessDrawOps ( int maxTotalUpdates ) : int
ProcessUpdates ( ) : void
QueueDrawOp ( [ op ) : void

메소드 상세

CalculateShadows() 공개 메소드

public CalculateShadows ( ) : void
리턴 void

ClearUpdateQueue() 공개 메소드

Clears all pending updates.
public ClearUpdateQueue ( ) : void
리턴 void

ConvertBlockTypes() 공개 메소드

Converts nonstandard (50-255) blocks using the given mapping.
public ConvertBlockTypes ( [ mapping ) : bool
mapping [ Byte array of length 256.
리턴 bool

GetBlock() 공개 메소드

Gets a block at given coordinates. Checks bounds.
public GetBlock ( Vector3I coords ) : Block
coords Vector3I Coordinate vector (X,Y,Z).
리턴 Block

GetBlock() 공개 메소드

Gets a block at given coordinates. Checks bounds.
public GetBlock ( int x, int y, int z ) : Block
x int X coordinate (width).
y int Y coordinate (length, Notch's Z).
z int Z coordinate (height, Notch's Y).
리턴 Block

GetBlockByName() 공개 정적인 메소드

Tries to find a blocktype by name.
public static GetBlockByName ( [ blockName ) : Block
blockName [ Name of the block.
리턴 Block

GetCompressedCopy() 공개 메소드

Writes a copy of the current map to a given stream, compressed with GZipStream.
public GetCompressedCopy ( [ stream, bool prependBlockCount ) : void
stream [ Stream to write the compressed data to.
prependBlockCount bool If true, prepends block data with signed, 32bit, big-endian block count.
리턴 void

GetFallbackBlock() 공개 정적인 메소드

public static GetFallbackBlock ( Block block ) : Block
block Block
리턴 Block

GetFallbackMap() 공개 메소드

public GetFallbackMap ( ) : byte[]
리턴 byte[]

InBounds() 공개 메소드

Checks whether the given coordinate (in block units) is within the bounds of the map.
public InBounds ( Vector3I vec ) : bool
vec Vector3I Coordinate vector (X,Y,Z).
리턴 bool

InBounds() 공개 메소드

Checks whether the given coordinate (in block units) is within the bounds of the map.
public InBounds ( int x, int y, int z ) : bool
x int X coordinate (width).
y int Y coordinate (length, Notch's Z).
z int Z coordinate (height, Notch's Y).
리턴 bool

Index() 공개 메소드

Converts given coordinates to a block array index.
public Index ( Vector3I coords ) : int
coords Vector3I Coordinate vector (X,Y,Z).
리턴 int

Index() 공개 메소드

Converts given coordinates to a block array index.
public Index ( int x, int y, int z ) : int
x int X coordinate (width).
y int Y coordinate (length, Notch's Z).
z int Z coordinate (height, Notch's Y).
리턴 int

IsRecommendedDimension() 공개 정적인 메소드

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
public static IsRecommendedDimension ( int dimension ) : bool
dimension int
리턴 bool

IsValidDimension() 공개 정적인 메소드

Checks if a given map dimension (width, height, or length) is acceptible. Values between 1 and 2047 are technically allowed.
public static IsValidDimension ( int dimension ) : bool
dimension int
리턴 bool

MakeFloodBarrier() 공개 메소드

Makes an admincrete barrier, 1 block thick, around the lower half of the map.
public MakeFloodBarrier ( ) : void
리턴 void

Map() 공개 메소드

Creates an empty new map of given dimensions. Dimensions cannot be changed after creation.
public Map ( World world, int width, int length, int height, bool initBlockArray ) : System
world World World that owns this map. May be null, and may be changed later.
width int Width (horizontal, Notch's X).
length int Length (horizontal, Notch's Z).
height int Height (vertical, Notch's Y).
initBlockArray bool If true, the Blocks array will be created.
리턴 System

QueueUpdate() 공개 메소드

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.
public QueueUpdate ( BlockUpdate update ) : void
update BlockUpdate
리턴 void

RemoveUnknownBlocktypes() 공개 메소드

Replaces all nonstandard (50-255) blocks with air.
public RemoveUnknownBlocktypes ( ) : bool
리턴 bool

ResetSpawn() 공개 메소드

Resets the spawn to a valid Java 7 location (X, Y, and found Z) Old behaviour: Resets spawn to the default location (top center of the map).
public ResetSpawn ( ) : void
리턴 void

Save() 공개 메소드

Saves this map to a file in the default format (FCMv3).
public Save ( [ fileName ) : bool
fileName [
리턴 bool

SearchColumn() 공개 메소드

public SearchColumn ( int x, int y, Block id ) : int
x int
y int
id Block
리턴 int

SearchColumn() 공개 메소드

public SearchColumn ( int x, int y, Block id, int zStart ) : int
x int
y int
id Block
zStart int
리턴 int

SetBlock() 공개 메소드

Sets a block at given coordinates. Checks bounds.
public SetBlock ( Vector3I coords, Block type ) : void
coords Vector3I Coordinate vector (X,Y,Z).
type Block Block type to set.
리턴 void

SetBlock() 공개 메소드

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.
public SetBlock ( int x, int y, int z, Block type ) : void
x int X coordinate (width).
y int Y coordinate (length, Notch's Z).
z int Z coordinate (height, Notch's Y).
type Block Block type to set.
리턴 void

StopAllDrawOps() 공개 메소드

public StopAllDrawOps ( ) : void
리턴 void

ValidateHeader() 공개 메소드

public ValidateHeader ( ) : bool
리턴 bool

프로퍼티 상세

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.
public byte[] Blocks
리턴 byte[]

Bounds 공개적으로 프로퍼티

Map boundaries. Can be useful for calculating volume or interesections.
public BoundingBox,fCraft Bounds
리턴 BoundingBox

DoorID 공개적으로 프로퍼티

public int DoorID
리턴 int

Doors 공개적으로 프로퍼티

public System.Collections.ArrayList Doors
리턴 System.Collections.ArrayList

Height 공개적으로 프로퍼티

Map height, in blocks. Equivalent to Notch's Y (vertical).
public int Height
리턴 int

Length 공개적으로 프로퍼티

Map length, in blocks. Equivalent to Notch's Z (horizontal).
public int Length
리턴 int

MessageBlockID 공개적으로 프로퍼티

public int MessageBlockID
리턴 int

MessageBlocks 공개적으로 프로퍼티

public System.Collections.ArrayList MessageBlocks
리턴 System.Collections.ArrayList

Portals 공개적으로 프로퍼티

public System.Collections.ArrayList Portals
리턴 System.Collections.ArrayList

Shadows 공개적으로 프로퍼티

public short[,] Shadows
리턴 ].short[

Volume 공개적으로 프로퍼티

Map volume, in terms of blocks.
public int Volume
리턴 int

Width 공개적으로 프로퍼티

Map width, in blocks. Equivalent to Notch's X (horizontal).
public int Width
리턴 int

portalID 공개적으로 프로퍼티

public int portalID
리턴 int