Module Extension.Server.Voxel

Functions

Tile.new (clss, args) Creates a new tile.
Voxel.erase (clss, args) Erases a voxel near the given point.
Voxel.find_blocks (clss, args) Finds all blocks near the given point.
Voxel.find_voxel (clss, args) Finds the voxel nearest to the given point.
Voxel.get_block (clss, args) Gets the data of a voxel block.
Voxel.get_materials (clss, args) Gets the material configuration of the voxel system.
Voxel.insert (clss, args) Inserts a voxel near the given point.
Voxel.replace (clss, args) Replaces the voxel near the given point.
Voxel.rotate (clss, args) Rotates a voxel near the given point.
Voxel.save (self, clss) Saves the terrain of the currently loaded sectors.

Tables

Material.friction Material friction.
Material.model Material model.
Material.name Material name.
Server.time Fill type for empty sectors.
Tile.damage Damage counter of the tile.
Tile.rotation Rotation of the tile.
Tile.terrain Terrain type of the tile.
Voxel Use dynamic voxel terrain.


Functions

Tile.new (clss, args)
Creates a new tile.

Parameters

  • clss: Tile class.
  • args: Arguments.

Return value:

New tile.
Voxel.erase (clss, args)
Erases a voxel near the given point.

Parameters

  • clss: Voxel class.
  • args: Arguments.
    • point: Position vector. (required)

Return value:

True if terrain was erased.
Voxel.find_blocks (clss, args)
Finds all blocks near the given point.

Parameters

  • clss: Voxel class.
  • args: Arguments.
    • point: Position vector. (required)
    • radius: Radius.

Return value:

Table of block indices and modification stamps.
Voxel.find_voxel (clss, args)
Finds the voxel nearest to the given point.

Parameters

  • clss: Voxel class.
  • args: Arguments.
    • match: Tiles to search for. ("all"/"empty"/"full")
    • point: Position vector. (required)

Return value:

Tile and vector, or nil.
Voxel.get_block (clss, args)
Gets the data of a voxel block.

Parameters

  • clss: Voxel class.
  • args: Arguments.
    • index: Block index. (required)
    • packet: Packet writer.
    • type: Packet type.

Return value:

Packet writer or nil.
Voxel.get_materials (clss, args)
Gets the material configuration of the voxel system.

Parameters

  • clss: Voxel class.
  • args: Arguments.
    • type: Packet type.

Return value:

Packet writer.
Voxel.insert (clss, args)
Inserts a voxel near the given point.

Parameters

  • clss: Voxel class.
  • args: Arguments.
    • point: Position vector. (required)
    • tile: Tile. (required)

Return value:

True if terrain was filled.
Voxel.replace (clss, args)
Replaces the voxel near the given point.

Parameters

  • clss: Voxel class.
  • args: Arguments.
    • point: Position vector. (required)
    • tile: Tile. (required)

Return value:

True if terrain was replaced.
Voxel.rotate (clss, args)
Rotates a voxel near the given point.

Parameters

  • clss: Voxel class.
  • args: Argumennts.
    • axis: Axis of rotation ("x"/"y"/"z" or 1/2/3)
    • point: Position vector. (required)
    • step: Number of steps to rotate.

Return value:

True if a voxel was rotated.
Voxel.save (self, clss)
Saves the terrain of the currently loaded sectors.

Parameters

  • self:
  • clss: Voxel class.

Tables

Material.friction
Material friction.
Material.model
Material model.
Material.name
Material name.
Server.time
Fill type for empty sectors.
Tile.damage
Damage counter of the tile.
Tile.rotation
Rotation of the tile.
Tile.terrain
Terrain type of the tile.
Voxel
Use dynamic voxel terrain.

Valid XHTML 1.0!