pub struct Geolyzer(pub Address);Expand description
The geolyzer component (6 methods).
Provided by OpenComputers’ Geolyzer, GeolyzerBase.
Tuple Fields§
§0: AddressImplementations§
Source§impl Geolyzer
impl Geolyzer
Sourcepub fn analyze(
&self,
side: impl Into<Number>,
options: Option<Value>,
) -> Result<Value>
pub fn analyze( &self, side: impl Into<Number>, options: Option<Value>, ) -> Result<Value>
Get some information on a directly adjacent block.
Lua: geolyzer.analyze(side:number[,options:table]):table
Indirect call: waits for the next server tick.
Sourcepub async fn analyze_async(
&self,
side: impl Into<Number>,
options: Option<Value>,
) -> Result<Value>
pub async fn analyze_async( &self, side: impl Into<Number>, options: Option<Value>, ) -> Result<Value>
Self::analyze without blocking: the call is queued, and
the program keeps running until the result comes back; see crate::task.
Sourcepub fn can_see_sky(&self) -> Result<bool>
pub fn can_see_sky(&self) -> Result<bool>
Returns whether there is a clear line of sight to the sky directly above.
Lua: geolyzer.canSeeSky():boolean
Indirect call: waits for the next server tick.
Sourcepub async fn can_see_sky_async(&self) -> Result<bool>
pub async fn can_see_sky_async(&self) -> Result<bool>
Self::can_see_sky without blocking: the call is queued, and
the program keeps running until the result comes back; see crate::task.
Sourcepub fn detect(&self, side: impl Into<Number>) -> Result<(bool, OcString)>
pub fn detect(&self, side: impl Into<Number>) -> Result<(bool, OcString)>
Checks the contents of the block on the specified sides and returns the findings.
Lua: geolyzer.detect(side:number):boolean, string
Indirect call: waits for the next server tick.
Sourcepub async fn detect_async(
&self,
side: impl Into<Number>,
) -> Result<(bool, OcString)>
pub async fn detect_async( &self, side: impl Into<Number>, ) -> Result<(bool, OcString)>
Self::detect without blocking: the call is queued, and
the program keeps running until the result comes back; see crate::task.
Sourcepub fn is_sun_visible(&self) -> Result<bool>
pub fn is_sun_visible(&self) -> Result<bool>
Return whether the sun is currently visible directly above.
Lua: geolyzer.isSunVisible():boolean
Indirect call: waits for the next server tick.
Sourcepub async fn is_sun_visible_async(&self) -> Result<bool>
pub async fn is_sun_visible_async(&self) -> Result<bool>
Self::is_sun_visible without blocking: the call is queued, and
the program keeps running until the result comes back; see crate::task.
Sourcepub fn scan(
&self,
x: impl Into<Number>,
z: impl Into<Number>,
y: Option<Number>,
w: Option<Number>,
d: Option<Number>,
h: Option<Number>,
ignore_replaceable: Option<Value>,
) -> Result<Value>
pub fn scan( &self, x: impl Into<Number>, z: impl Into<Number>, y: Option<Number>, w: Option<Number>, d: Option<Number>, h: Option<Number>, ignore_replaceable: Option<Value>, ) -> Result<Value>
Analyzes the density of the column at the specified relative coordinates.
Lua: geolyzer.scan(x:number, z:number[, y:number, w:number, d:number, h:number][, ignoreReplaceable:boolean|options:table]):table
Indirect call: waits for the next server tick.
Sourcepub async fn scan_async(
&self,
x: impl Into<Number>,
z: impl Into<Number>,
y: Option<Number>,
w: Option<Number>,
d: Option<Number>,
h: Option<Number>,
ignore_replaceable: Option<Value>,
) -> Result<Value>
pub async fn scan_async( &self, x: impl Into<Number>, z: impl Into<Number>, y: Option<Number>, w: Option<Number>, d: Option<Number>, h: Option<Number>, ignore_replaceable: Option<Value>, ) -> Result<Value>
Self::scan without blocking: the call is queued, and
the program keeps running until the result comes back; see crate::task.
Sourcepub fn store(
&self,
side: impl Into<Number>,
db_address: impl AsRef<[u8]>,
db_slot: impl Into<Number>,
) -> Result<bool>
pub fn store( &self, side: impl Into<Number>, db_address: impl AsRef<[u8]>, db_slot: impl Into<Number>, ) -> Result<bool>
Store an item stack representation of the block on the specified side in a database component.
Lua: geolyzer.store(side:number, dbAddress:string, dbSlot:number):boolean
Indirect call: waits for the next server tick.
Sourcepub async fn store_async(
&self,
side: impl Into<Number>,
db_address: impl AsRef<[u8]>,
db_slot: impl Into<Number>,
) -> Result<bool>
pub async fn store_async( &self, side: impl Into<Number>, db_address: impl AsRef<[u8]>, db_slot: impl Into<Number>, ) -> Result<bool>
Self::store without blocking: the call is queued, and
the program keeps running until the result comes back; see crate::task.
Trait Implementations§
Source§impl Component for Geolyzer
impl Component for Geolyzer
Source§fn from_address(address: Address) -> Self
fn from_address(address: Address) -> Self
fn address(&self) -> &Address
Source§fn at(address: impl Into<Address>) -> Option<Self>
fn at(address: impl Into<Address>) -> Option<Self>
address, if it is of this type.Source§fn invoke(&self, method: &str, args: Vec<Value>) -> Result<Vec<Value>>
fn invoke(&self, method: &str, args: Vec<Value>) -> Result<Vec<Value>>
Source§fn invoke_async(&self, method: &str, args: Vec<Value>) -> Call ⓘ
fn invoke_async(&self, method: &str, args: Vec<Value>) -> Call ⓘ
Component::invoke without blocking; see invoke_async.