Module deserialize_mapblock

mapblock deserialization

Functions

mapblock_lib.deserialize_mapblock (mapblock_pos, filename, options) deserialize a mapblock from a file

Tables

rotate_options Rotate options
transform_options Transformation options
deserialize_options Deserialize options


Functions

mapblock_lib.deserialize_mapblock (mapblock_pos, filename, options)
deserialize a mapblock from a file

Parameters:

  • mapblock_pos the mapblock position
  • filename the file to read from
  • options [opt] deserialize_options the options to apply to the mapblock

Returns:

  1. success true on success
  2. error in case of an error

See also:

Tables

rotate_options
Rotate options

Fields:

  • number angle the angle to rotate, can be 0,90,180 or 270
  • string axis the axis to rotate, can be "x","y" or "z" NOTE: orientation only works with the y-rotation
  • disable_orientation map of nodename to bool/true of nodenames that shouldn't get oriented
transform_options
Transformation options

Fields:

  • replace map of nodename to replacement-nodename for node-replacements on place
  • rotate [opt] rotate_options optional rotation options
  • set_param2 [opt] map of nodename to param2-value to bulk-set param2 values
deserialize_options
Deserialize options

Fields:

  • on_metadata [opt] metadata callback, can be used to intercept and modify node-metadata/inventory function(pos, content_id, meta)
  • transform [opt] transform_options transformation options
  • mode string [opt] placement mode "replace": replace the whole mapblock, "add": replace only air nodes

See also:

generated by LDoc 1.4.6 Last updated 2023-03-30 05:48:06