Add /place template
Place a saved structure template at a position with rotation, mirroring, integrity, seed and strict mode. Templates come from the world's generated structures first, then the vanilla template files. Block entities and saved entities are placed along with the blocks, and the template ids are offered as suggestions. Co-Authored-By: Claude Sonnet 5.5 <noreply@anthropic.com>
This commit is contained in:
@@ -458,3 +458,19 @@ fn world_command_trees() {
|
||||
assert!(run("spreadplayers 0 0 5 0 false @a").is_err());
|
||||
assert!(run("worldborder warning distance -1").is_err());
|
||||
}
|
||||
|
||||
#[test]
|
||||
fn place_template_tree() {
|
||||
for line in [
|
||||
"place template minecraft:igloo/top",
|
||||
"place template minecraft:igloo/top ~ ~ ~",
|
||||
"place template minecraft:igloo/top 1 2 3 clockwise_90 left_right 0.5 12 strict",
|
||||
] {
|
||||
assert_eq!(
|
||||
run(line).unwrap_or_else(|e| panic!("{line}: {e:?}")).0,
|
||||
"place"
|
||||
);
|
||||
}
|
||||
assert!(run("place template minecraft:x ~ ~ ~ sideways").is_err());
|
||||
assert!(run("place template minecraft:x ~ ~ ~ none none 2").is_err());
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user