pub struct LuaEntityMineParams {
pub force: bool,
pub ignore_minable: bool,
pub inventory: LuaInventory,
pub raise_destroyed: bool,
}Expand description
Mines this entity.
‘Standard’ operation is to keep calling LuaEntity.mine with an inventory until all items are transferred and the items dealt with.
The result of mining the entity (the item(s) it produces when mined) will be dropped on the ground if they don’t fit into the provided inventory. If no inventory is provided, the items will be destroyed.
Fields§
§force: boolIf true, when the item(s) don’t fit into the given inventory the entity is force mined. If false, the mining operation fails when there isn’t enough room to transfer all of the items into the inventory. Defaults to false. This is ignored and acts as true if no inventory is provided.
ignore_minable: boolIf true, the minable state of the entity is ignored. Defaults to false. If false, an entity that isn’t minable (set as not-minable in the prototype or isn’t minable for other reasons) will fail to be mined.
inventory: LuaInventoryIf provided the item(s) will be transferred into this inventory. If provided, this must be an inventory created with LuaGameScript::create_inventory or be a basic inventory owned by some entity.
raise_destroyed: boolIf true, script_raised_destroy will be raised. Defaults to true.
Trait Implementations§
Source§impl Clone for LuaEntityMineParams
impl Clone for LuaEntityMineParams
Source§fn clone(&self) -> LuaEntityMineParams
fn clone(&self) -> LuaEntityMineParams
1.0.0 (const: unstable) · Source§fn clone_from(&mut self, source: &Self)
fn clone_from(&mut self, source: &Self)
source. Read more