mirror of
https://gitlab.com/veloren/veloren.git
synced 2024-08-30 18:12:32 +00:00
Fixed make_rgb
This commit is contained in:
parent
22f95edf32
commit
66bf033a43
@ -573,7 +573,7 @@ fn handle_make_rgb(
|
|||||||
action: &ChatCommand,
|
action: &ChatCommand,
|
||||||
) -> CmdResult<()> {
|
) -> CmdResult<()> {
|
||||||
if let (Some(block_name), Some(r), Some(g), Some(b)) = scan_fmt_some!(&args, &action.arg_fmt(), String, u8, u8, u8) {
|
if let (Some(block_name), Some(r), Some(g), Some(b)) = scan_fmt_some!(&args, &action.arg_fmt(), String, u8, u8, u8) {
|
||||||
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")?;
|
let pos = position(server, target, "target")?;
|
||||||
let pos = pos.0.map(|e| e.floor() as i32);
|
let pos = pos.0.map(|e| e.floor() as i32);
|
||||||
let new_block = Block::new(bk, Rgb::new(r, g, b));
|
let new_block = Block::new(bk, Rgb::new(r, g, b));
|
||||||
|
Loading…
Reference in New Issue
Block a user