pub fn barrel_ss(ss: usize) -> Vec<ItemSlot>
Examples found in repository?
examples/test.rs (line 10)
3fn main() {
4 let mut schem = mcschem::Schematic::new(mcschem::data_version::MC_1_18_2, 1, 2, 1);
5
6 schem.set_block_entity(
7 0, 0, 0,
8 mcschem::Block::from_str("minecraft:barrel[facing=north,open=false]").unwrap(),
9 mcschem::BlockEntity::Barrel {
10 items: mcschem::utils::barrel_ss(3)
11 }
12 );
13
14 schem.set_block_entity(
15 0, 1, 0,
16 mcschem::Block::from_str("minecraft:oak_sign[rotation=8,waterlogged=false]").unwrap(),
17 mcschem::BlockEntity::SignPre1D20 {
18 glowing: true,
19 color: "lime".to_string(),
20 line_1: r#"["Line 1"]"#.to_string(),
21 line_2: r#"["Line 2"]"#.to_string(),
22 line_3: r#"["Line 3"]"#.to_string(),
23 line_4: r#"["Line 4"]"#.to_string()
24 }
25 );
26
27 let mut file = std::fs::File::create("schematic.schem").unwrap();
28 schem.export(&mut file).unwrap();
29}