Differences

This shows you the differences between two versions of the page.

Link to this comparison view

Both sides previous revision Previous revision
Next revision Both sides next revision
component:geolyzer [2020/07/09 18:08]
kristopher38 Fix indentation
component:geolyzer [2020/07/09 21:12]
kristopher38
Line 7: Line 7:
  
 - `scan(x:​number,​ z:number[, y:number, w:number, d:number, h:number][, ignoreReplaceable:​boolean|options:​table]):​table`  ​ - `scan(x:​number,​ z:number[, y:number, w:number, d:number, h:number][, ignoreReplaceable:​boolean|options:​table]):​table`  ​
-  Analyzes the density of the column at the specified relative coordinates. This will return a list of hardness values for the blocks in the specified range. The coordinates are relative to the location of the geolyzer. Hardness values for blocks further away from the geolyzer are more noisy than those for blocks nearby. +  Analyzes the density of the column at the specified relative coordinates. This will return a list of hardness values for the blocks in the specified range. The coordinates are relative to the location of the geolyzer. Hardness values for blocks further away from the geolyzer are more noisy than those for blocks nearby.  ​ 
-  **Note** that the values returned is always 64 values, even if the scan volume is only part of that. If 10 blocks are scanned, the first 10 values in the result represent those blocks scanned. The remaining values in the result should be ignored.+**Note** that the values returned is always 64 values, even if the scan volume is only part of that. If 10 blocks are scanned, the first 10 values in the result represent those blocks scanned. The remaining values in the result should be ignored.
 - `analyze(side:​number[,​ options:​table]):​table`  ​ - `analyze(side:​number[,​ options:​table]):​table`  ​
   Get some information on a directly adjacent block. By default the returned table returns the string ID of the block (e.g. `minecraft:​dirt`,​ metadata, hardness and some more information). Note that a single call to this consumes the same amount of energy a call to `scan` does!  ​   Get some information on a directly adjacent block. By default the returned table returns the string ID of the block (e.g. `minecraft:​dirt`,​ metadata, hardness and some more information). Note that a single call to this consumes the same amount of energy a call to `scan` does!  ​
Line 14: Line 14:
 - `store(side:​number,​ dbAddress:​string,​ dbSlot:​number):​boolean`  ​ - `store(side:​number,​ dbAddress:​string,​ dbSlot:​number):​boolean`  ​
   Stores an item stack representation of the block on the specified side of the geolyzer to the specified slot of a [[component:​database|database component]] with the specified address. Do not expect this to work (well) for every block in existence, in particular not for mod's blocks that are differentiated by NBT data (such as robots).   Stores an item stack representation of the block on the specified side of the geolyzer to the specified slot of a [[component:​database|database component]] with the specified address. Do not expect this to work (well) for every block in existence, in particular not for mod's blocks that are differentiated by NBT data (such as robots).
 +- `detect(side:​number):​boolean,​ string` ​  
 +  Same as `robot.detect` (from the robot component). Detects the block on the given side, relative to the robot, and returns whether or not the robot can move into the block, as well as a general description of the block. ​  
 +**Returns:​** `true` if the robot if whatever is in front of the robot would prevent him from moving forward (a block or an entity) (Note: Drones return `true` even if the block is `passable`),​ `false` otherwise. The second parameter describes what is in front in general and is one of either `entity`, `solid`, `replaceable`,​ `liquid`, `passable` or `air`. 
 +- `canSeeSky():​boolean` Returns whether there is a clear line of sight to the sky directly above. Transparent blocks, e.g. glass don't affect the line of sight. 
 +- `isSunVisible():​boolean` Returns whether the sun is currently visible directly above. The result is affected by possible blocks blocking the line of sight directly above (which can be checked with `canSeeSky()`) and whether it's night or day.
 ---- ----
  
 {{page>​component:​contents&​noheader&​noeditbutton&​nouser&​nofooter}} {{page>​component:​contents&​noheader&​noeditbutton&​nouser&​nofooter}}