pub struct MobSpawner(pub Address);Expand description
The mob_spawner component (1 methods).
Provided by OpenComputers’ DriverMobSpawner$Environment.
Tuple Fields§
§0: AddressImplementations§
Source§impl MobSpawner
impl MobSpawner
Sourcepub fn get_spawning_mob_name(&self) -> Result<OcString>
pub fn get_spawning_mob_name(&self) -> Result<OcString>
Get the name of the entity that is being spawned by this spawner.
Lua: mob_spawner.getSpawningMobName():string
Indirect call: waits for the next server tick.
Sourcepub async fn get_spawning_mob_name_async(&self) -> Result<OcString>
pub async fn get_spawning_mob_name_async(&self) -> Result<OcString>
Self::get_spawning_mob_name without blocking: the call is queued, and
the program keeps running until the result comes back; see crate::task.
Trait Implementations§
Source§impl Clone for MobSpawner
impl Clone for MobSpawner
Source§impl Component for MobSpawner
impl Component for MobSpawner
Source§fn from_address(address: Address) -> Self
fn from_address(address: Address) -> Self
Wraps an address without checking what is there.
fn address(&self) -> &Address
Source§fn at(address: impl Into<Address>) -> Option<Self>
fn at(address: impl Into<Address>) -> Option<Self>
The component at
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>>
An untyped call, for methods the wrapper doesn’t know.
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.Source§impl Debug for MobSpawner
impl Debug for MobSpawner
impl Eq for MobSpawner
Source§impl Hash for MobSpawner
impl Hash for MobSpawner
Source§impl PartialEq for MobSpawner
impl PartialEq for MobSpawner
impl StructuralPartialEq for MobSpawner
Auto Trait Implementations§
impl Forget for MobSpawner
impl Freeze for MobSpawner
impl Move for MobSpawner
impl RefUnwindSafe for MobSpawner
impl Send for MobSpawner
impl Sync for MobSpawner
impl Unpin for MobSpawner
impl UnsafeUnpin for MobSpawner
impl UnwindSafe for MobSpawner
Blanket Implementations§
Source§impl<T> BorrowMut<T> for Twhere
T: ?Sized,
impl<T> BorrowMut<T> for Twhere
T: ?Sized,
Source§fn borrow_mut(&mut self) -> &mut T
fn borrow_mut(&mut self) -> &mut T
Mutably borrows from an owned value. Read more