C# Class OpenMinecraft.IMapHandler

Datei anzeigen Open project: N3X15/MineEdit Class Usage Examples

Public Methods

Method Description
AddEntity ( Entity e ) : void
BeginTransaction ( ) : void
CastRay ( Vector3i from, Vector3i direction, List matFilter, bool invert, int &iterations ) : byte

Try to find a block in this direction.

ChunkModified ( long x, long y ) : void
ClearInventory ( ) : void
CommitTransaction ( ) : void
Convolution ( double filter, double divisor, double offset, int X, int Z ) : void

Convolution matrices!

CullChunk ( long X, long Y ) : void
CullUnchanged ( ) : void
DistanceToMaterial ( Vector3i cord, Vector3i vec, byte matidx, bool invert = false ) : double

travel from cord along vec and return how far it was to a point of matidx the distance is returned in number of iterations. If the edge of the map is reached, then return the number of iterations as well. if invert == True, search for anything other than matidx

Erode ( double talus, int iterations, int X, int Z ) : void
ErodeThermal ( double talus, int iterations, int X, int Z ) : void
ExpandFluids ( byte fluidID, bool CompleteRegen, ForEachProgressHandler ph ) : int
ForEachCachedChunk ( CachedChunkDelegate cmd ) : void
ForEachChunk ( ChunkIteratorDelegate cmd ) : void
ForEachChunkFile ( int Dimension, ChunkFileIteratorDelegate cmd ) : void
ForEachKnownChunk ( int Dimension, ChunkIteratorDelegate cmd ) : void
Generate ( long X, long Y, double &min, double &max ) : bool
GetArmor ( ArmorType slot, short &itemID, short &Damage, byte &Count, string &failreason ) : bool
GetBlockAt ( int x, int y, int z ) : byte
GetBlockAt ( long x, long y, long z ) : byte
GetBlockLightAt ( int px, int py, int z ) : byte
GetChunk ( Vector3i ChunkPos ) : Chunk
GetChunk ( long x, long y ) : Chunk
GetChunkCoordsFromFile ( string file, bool fromMapCache = false ) : Vector2i
GetChunkHeightmap ( int X, int Z ) : ].double[
GetDataAt ( int x, int y, int z ) : byte
GetDimensions ( ) : IEnumerable
GetHeightAt ( int x, int z ) : int
GetInventory ( int slot, short &itemID, short &Damage, byte &Count, string &failreason ) : bool
GetLightAt ( int _X, int _Y, int _Z, byte &skyLight, byte &blockLight ) : void
GetMousePos ( Vector3i p, int scale, ViewAngle viewAngle ) : Vector3i
GetOverview ( int CX, int CY, Vector3i pos, int &h, byte &block, int &waterdepth ) : void
GetSkyLightAt ( int px, int py, int z ) : byte
Global2Local ( Vector3d global, int &CX, int &CZ ) : Vector3d
Global2Local ( Vector3i global, int &CX, int &CZ ) : Vector3i
GrowTree ( Random rand, int x, int y, int z ) : void
IsMyFiletype ( string FileName ) : bool
Load ( ) : void
Load ( string filename ) : void
LoadChunk ( long X, long Y ) : void
Local2Global ( int CX, int CZ, Vector3d local ) : Vector3d
Local2Global ( int CX, int CZ, Vector3i vector3i ) : Vector3i
NewChunk ( long X, long Y ) : Chunk
Populate ( int X, int Z ) : void
RegenerateLighting ( long X, long Z ) : bool
RemoveEntity ( Entity e ) : void
RemoveTileEntity ( TileEntity e ) : void
Repair ( ) : void
ReplaceBlocksIn ( long X, long Y, byte>.Dictionary Replacements ) : void
Save ( ) : bool
Save ( string filename ) : bool
SaveAll ( bool cullheightmaps = true ) : void
SaveChunk ( Chunk chunk ) : void
SetArmor ( ArmorType slot, short itemID, int Damage, int Count ) : bool
SetBlockAt ( int x, int y, int z, byte val ) : void
SetBlockAt ( long x, long y, long z, byte b ) : void
SetBlockLightAt ( int px, int py, int z, byte val ) : void
SetBusy ( string message ) : void
SetChunk ( Chunk c ) : void
SetChunk ( long X, long Y, Chunk c ) : void
SetChunkHeightmap ( int X, int Z, double cnk ) : void
SetDataAt ( int x, int y, int z, byte p ) : void
SetDimension ( int p ) : void
SetEntity ( Entity e ) : void
SetHeightAt ( int x, int z, int h, byte mat ) : void
SetIdle ( ) : void
SetInventory ( int slot, short itemID, int Damage, int Count ) : bool
SetSkyLightAt ( int px, int py, int z, byte val ) : void
SetTileEntity ( TileEntity e ) : void
Silt ( double waterlevel, bool beaches, int X, int Z ) : void

Smooths below-water surfaces and, optionally, adds beaches.

UnloadChunks ( ) : void

Private Methods

Method Description
GetPrelimHeightAt ( int x, int z ) : double
HeightmapToVoxelspace ( double hm, byte &b ) : void
SetPrelimHeightAt ( int x, int z, double h ) : void
_GetChunkCoordsFromFile ( string filename ) : Vector2i

Returns chunk location from the chunk's own internal coordinate store. Slow.

Method Details

AddEntity() public abstract method

public abstract AddEntity ( Entity e ) : void
e Entity
return void

BeginTransaction() public abstract method

public abstract BeginTransaction ( ) : void
return void

CastRay() public method

Try to find a block in this direction.
public CastRay ( Vector3i from, Vector3i direction, List matFilter, bool invert, int &iterations ) : byte
from Vector3i
direction Vector3i
matFilter List
invert bool
iterations int
return byte

ChunkModified() public abstract method

public abstract ChunkModified ( long x, long y ) : void
x long
y long
return void

ClearInventory() public abstract method

public abstract ClearInventory ( ) : void
return void

CommitTransaction() public abstract method

public abstract CommitTransaction ( ) : void
return void

Convolution() public method

Convolution matrices!
public Convolution ( double filter, double divisor, double offset, int X, int Z ) : void
filter double
divisor double
offset double
X int
Z int
return void

CullChunk() public abstract method

public abstract CullChunk ( long X, long Y ) : void
X long
Y long
return void

CullUnchanged() public abstract method

public abstract CullUnchanged ( ) : void
return void

DistanceToMaterial() public method

travel from cord along vec and return how far it was to a point of matidx the distance is returned in number of iterations. If the edge of the map is reached, then return the number of iterations as well. if invert == True, search for anything other than matidx
public DistanceToMaterial ( Vector3i cord, Vector3i vec, byte matidx, bool invert = false ) : double
cord Vector3i
vec Vector3i
matidx byte
invert bool
return double

Erode() public method

public Erode ( double talus, int iterations, int X, int Z ) : void
talus double
iterations int
X int
Z int
return void

ErodeThermal() public method

public ErodeThermal ( double talus, int iterations, int X, int Z ) : void
talus double
iterations int
X int
Z int
return void

ExpandFluids() public abstract method

public abstract ExpandFluids ( byte fluidID, bool CompleteRegen, ForEachProgressHandler ph ) : int
fluidID byte
CompleteRegen bool
ph ForEachProgressHandler
return int

ForEachCachedChunk() public abstract method

public abstract ForEachCachedChunk ( CachedChunkDelegate cmd ) : void
cmd CachedChunkDelegate
return void

ForEachChunk() public abstract method

public abstract ForEachChunk ( ChunkIteratorDelegate cmd ) : void
cmd ChunkIteratorDelegate
return void

ForEachChunkFile() public abstract method

public abstract ForEachChunkFile ( int Dimension, ChunkFileIteratorDelegate cmd ) : void
Dimension int
cmd ChunkFileIteratorDelegate
return void

ForEachKnownChunk() public abstract method

public abstract ForEachKnownChunk ( int Dimension, ChunkIteratorDelegate cmd ) : void
Dimension int
cmd ChunkIteratorDelegate
return void

Generate() public abstract method

public abstract Generate ( long X, long Y, double &min, double &max ) : bool
X long
Y long
min double
max double
return bool

GetArmor() public abstract method

public abstract GetArmor ( ArmorType slot, short &itemID, short &Damage, byte &Count, string &failreason ) : bool
slot ArmorType
itemID short
Damage short
Count byte
failreason string
return bool

GetBlockAt() public abstract method

public abstract GetBlockAt ( int x, int y, int z ) : byte
x int
y int
z int
return byte

GetBlockAt() public method

public GetBlockAt ( long x, long y, long z ) : byte
x long
y long
z long
return byte

GetBlockLightAt() public abstract method

public abstract GetBlockLightAt ( int px, int py, int z ) : byte
px int
py int
z int
return byte

GetChunk() public abstract method

public abstract GetChunk ( Vector3i ChunkPos ) : Chunk
ChunkPos Vector3i
return Chunk

GetChunk() public abstract method

public abstract GetChunk ( long x, long y ) : Chunk
x long
y long
return Chunk

GetChunkCoordsFromFile() public method

public GetChunkCoordsFromFile ( string file, bool fromMapCache = false ) : Vector2i
file string
fromMapCache bool
return Vector2i

GetChunkHeightmap() public abstract method

public abstract GetChunkHeightmap ( int X, int Z ) : ].double[
X int
Z int
return ].double[

GetDataAt() public abstract method

public abstract GetDataAt ( int x, int y, int z ) : byte
x int
y int
z int
return byte

GetDimensions() public abstract method

public abstract GetDimensions ( ) : IEnumerable
return IEnumerable

GetHeightAt() public abstract method

public abstract GetHeightAt ( int x, int z ) : int
x int
z int
return int

GetInventory() public abstract method

public abstract GetInventory ( int slot, short &itemID, short &Damage, byte &Count, string &failreason ) : bool
slot int
itemID short
Damage short
Count byte
failreason string
return bool

GetLightAt() public abstract method

public abstract GetLightAt ( int _X, int _Y, int _Z, byte &skyLight, byte &blockLight ) : void
_X int
_Y int
_Z int
skyLight byte
blockLight byte
return void

GetMousePos() public abstract method

public abstract GetMousePos ( Vector3i p, int scale, ViewAngle viewAngle ) : Vector3i
p Vector3i
scale int
viewAngle ViewAngle
return Vector3i

GetOverview() public abstract method

public abstract GetOverview ( int CX, int CY, Vector3i pos, int &h, byte &block, int &waterdepth ) : void
CX int
CY int
pos Vector3i
h int
block byte
waterdepth int
return void

GetSkyLightAt() public abstract method

public abstract GetSkyLightAt ( int px, int py, int z ) : byte
px int
py int
z int
return byte

Global2Local() public abstract method

public abstract Global2Local ( Vector3d global, int &CX, int &CZ ) : Vector3d
global Vector3d
CX int
CZ int
return Vector3d

Global2Local() public abstract method

public abstract Global2Local ( Vector3i global, int &CX, int &CZ ) : Vector3i
global Vector3i
CX int
CZ int
return Vector3i

GrowTree() public method

public GrowTree ( Random rand, int x, int y, int z ) : void
rand Random
x int
y int
z int
return void

IsMyFiletype() public abstract method

public abstract IsMyFiletype ( string FileName ) : bool
FileName string
return bool

Load() public abstract method

public abstract Load ( ) : void
return void

Load() public abstract method

public abstract Load ( string filename ) : void
filename string
return void

LoadChunk() public abstract method

public abstract LoadChunk ( long X, long Y ) : void
X long
Y long
return void

Local2Global() public abstract method

public abstract Local2Global ( int CX, int CZ, Vector3d local ) : Vector3d
CX int
CZ int
local Vector3d
return Vector3d

Local2Global() public abstract method

public abstract Local2Global ( int CX, int CZ, Vector3i vector3i ) : Vector3i
CX int
CZ int
vector3i Vector3i
return Vector3i

NewChunk() public abstract method

public abstract NewChunk ( long X, long Y ) : Chunk
X long
Y long
return Chunk

Populate() public abstract method

public abstract Populate ( int X, int Z ) : void
X int
Z int
return void

RegenerateLighting() public abstract method

public abstract RegenerateLighting ( long X, long Z ) : bool
X long
Z long
return bool

RemoveEntity() public abstract method

public abstract RemoveEntity ( Entity e ) : void
e Entity
return void

RemoveTileEntity() public abstract method

public abstract RemoveTileEntity ( TileEntity e ) : void
e TileEntity
return void

Repair() public abstract method

public abstract Repair ( ) : void
return void

ReplaceBlocksIn() public abstract method

public abstract ReplaceBlocksIn ( long X, long Y, byte>.Dictionary Replacements ) : void
X long
Y long
Replacements byte>.Dictionary
return void

Save() public abstract method

public abstract Save ( ) : bool
return bool

Save() public abstract method

public abstract Save ( string filename ) : bool
filename string
return bool

SaveAll() public abstract method

public abstract SaveAll ( bool cullheightmaps = true ) : void
cullheightmaps bool
return void

SaveChunk() public abstract method

public abstract SaveChunk ( Chunk chunk ) : void
chunk Chunk
return void

SetArmor() public abstract method

public abstract SetArmor ( ArmorType slot, short itemID, int Damage, int Count ) : bool
slot ArmorType
itemID short
Damage int
Count int
return bool

SetBlockAt() public abstract method

public abstract SetBlockAt ( int x, int y, int z, byte val ) : void
x int
y int
z int
val byte
return void

SetBlockAt() public method

public SetBlockAt ( long x, long y, long z, byte b ) : void
x long
y long
z long
b byte
return void

SetBlockLightAt() public abstract method

public abstract SetBlockLightAt ( int px, int py, int z, byte val ) : void
px int
py int
z int
val byte
return void

SetBusy() public method

public SetBusy ( string message ) : void
message string
return void

SetChunk() public abstract method

public abstract SetChunk ( Chunk c ) : void
c Chunk
return void

SetChunk() public abstract method

public abstract SetChunk ( long X, long Y, Chunk c ) : void
X long
Y long
c Chunk
return void

SetChunkHeightmap() public abstract method

public abstract SetChunkHeightmap ( int X, int Z, double cnk ) : void
X int
Z int
cnk double
return void

SetDataAt() public abstract method

public abstract SetDataAt ( int x, int y, int z, byte p ) : void
x int
y int
z int
p byte
return void

SetDimension() public abstract method

public abstract SetDimension ( int p ) : void
p int
return void

SetEntity() public abstract method

public abstract SetEntity ( Entity e ) : void
e Entity
return void

SetHeightAt() public abstract method

public abstract SetHeightAt ( int x, int z, int h, byte mat ) : void
x int
z int
h int
mat byte
return void

SetIdle() public method

public SetIdle ( ) : void
return void

SetInventory() public abstract method

public abstract SetInventory ( int slot, short itemID, int Damage, int Count ) : bool
slot int
itemID short
Damage int
Count int
return bool

SetSkyLightAt() public abstract method

public abstract SetSkyLightAt ( int px, int py, int z, byte val ) : void
px int
py int
z int
val byte
return void

SetTileEntity() public abstract method

public abstract SetTileEntity ( TileEntity e ) : void
e TileEntity
return void

Silt() public method

Smooths below-water surfaces and, optionally, adds beaches.
public Silt ( double waterlevel, bool beaches, int X, int Z ) : void
waterlevel double /// A ///
beaches bool /// A ///
X int
Z int
return void

UnloadChunks() public abstract method

public abstract UnloadChunks ( ) : void
return void