mirror of
https://gitlab.com/veloren/veloren.git
synced 2024-08-30 18:12:32 +00:00
Fixing #1169 - use strum macros for BlockKind conversion
This commit is contained in:
@ -43,6 +43,7 @@ use hashbrown::{HashMap, HashSet};
|
||||
use humantime::Duration as HumanDuration;
|
||||
use rand::Rng;
|
||||
use specs::{storage::StorageEntry, Builder, Entity as EcsEntity, Join, WorldExt};
|
||||
use std::str::FromStr;
|
||||
use vek::*;
|
||||
use wiring::{Circuit, Wire, WiringAction, WiringActionEffect, WiringElement};
|
||||
use world::util::Sampler;
|
||||
@ -515,7 +516,7 @@ fn handle_make_block(
|
||||
action: &ChatCommand,
|
||||
) -> CmdResult<()> {
|
||||
if let Some(block_name) = scan_fmt_some!(&args, &action.arg_fmt(), String) {
|
||||
if let Ok(bk) = BlockKind::try_from(block_name.as_str()) {
|
||||
if let Ok(bk) = BlockKind::from_str(block_name.as_str()) {
|
||||
let pos = position(server, target, "target")?;
|
||||
server.state.set_block(
|
||||
pos.0.map(|e| e.floor() as i32),
|
||||
|
Reference in New Issue
Block a user