Property | Type | Description | |
---|---|---|---|
GetBlock | BlockInstance? | ||
GetContent | System | ||
GetLiquid | LiquidInstance? | ||
ModifyLiquid | void | ||
ModifyWorldData | void | ||
RetrieveContent | void | ||
SetBlock | void | ||
SetContent | void | ||
SetContent | void | ||
SetLiquid | void | ||
SetPosition | void | ||
Setup | void | ||
World | System |
Method | Description | |
---|---|---|
Dispose ( ) : void |
Dispose of the world.
|
|
DoRandomUpdate ( Vector3i position ) : bool |
Force a random update at a position.
|
|
FinishAll ( ) : Task |
Wait for all world tasks to finish.
|
|
GetSpawnPosition ( ) : Vector3 |
Get the spawn position of this world.
|
|
Save ( ) : Task |
Saves all active chunks that are not currently saved.
|
|
SetDefaultBlock ( Vector3i position ) : void |
Set a position to the default block.
|
|
SetDefaultLiquid ( Vector3i position ) : void |
Set a position to the default liquid.
|
|
SetSpawnPosition ( Vector3 position ) : void |
Sets the spawn position of this world.
|
|
Update ( float deltaTime ) : void |
Called every update cycle.
|
Method | Description | |
---|---|---|
AddAllTasks ( List tasks ) : void |
Add all tasks to the list. This is used to wait for all tasks to finish when calling FinishAll.
|
|
Dispose ( bool disposing ) : void |
Dispose of the world.
|
|
ProcessChangedSection ( VoxelGame.Core.Logic.Chunk chunk, Vector3i position ) : void |
Process that a section was changed.
|
|
World ( VoxelGame.Core.Logic.WorldInformation information, string path ) : System |
This constructor is meant for worlds that already exist.
|
|
World ( string name, string path, int seed ) : System |
This constructor is meant for worlds that are new.
|
Method | Description | |
---|---|---|
GetBlock ( Vector3i position ) : BlockInstance? | ||
GetContent ( Vector3i position ) : System | ||
GetLiquid ( Vector3i position ) : LiquidInstance? | ||
ModifyLiquid ( bool isStatic, Vector3i position ) : void | ||
ModifyWorldData ( Vector3i position, uint clearMask, uint addMask ) : void | ||
RetrieveContent ( Vector3i position, Block? &block, uint &data, Liquid? &liquid, LiquidLevel &level, bool &isStatic ) : void | ||
SetBlock ( BlockInstance block, Vector3i position ) : void | ||
SetContent ( |
||
SetContent ( BlockInstance block, LiquidInstance liquid, Vector3i position, bool tickLiquid ) : void | ||
SetLiquid ( LiquidInstance liquid, Vector3i position ) : void | ||
SetPosition ( |
||
Setup ( ) : void | ||
World ( VoxelGame.Core.Logic.WorldInformation information, string worldDirectory, string chunkDirectory, IWorldGenerator generator ) : System |
Setup of readonly fields and non-optional steps.
|
protected AddAllTasks ( List tasks ) : void | ||
tasks | List | The task list. |
return | void |
protected Dispose ( bool disposing ) : void | ||
disposing | bool | True when disposing intentionally. |
return | void |
public DoRandomUpdate ( Vector3i position ) : bool | ||
position | Vector3i | The position. |
return | bool |
protected abstract ProcessChangedSection ( VoxelGame.Core.Logic.Chunk chunk, Vector3i position ) : void | ||
chunk | VoxelGame.Core.Logic.Chunk | The chunk containing the section. |
position | Vector3i | The position of the block that caused the section change. |
return | void |
public SetDefaultBlock ( Vector3i position ) : void | ||
position | Vector3i | |
return | void |
public SetDefaultLiquid ( Vector3i position ) : void | ||
position | Vector3i | |
return | void |
public SetSpawnPosition ( Vector3 position ) : void | ||
position | Vector3 | The position to set as spawn. |
return | void |
public abstract Update ( float deltaTime ) : void | ||
deltaTime | float | The time since the last update cycle. |
return | void |
protected World ( VoxelGame.Core.Logic.WorldInformation information, string path ) : System | ||
information | VoxelGame.Core.Logic.WorldInformation | |
path | string | |
return | System |
protected World ( string name, string path, int seed ) : System | ||
name | string | |
path | string | |
seed | int | |
return | System |