From 87cffbd588296e5fe2cd72c2ae52e5635e512821 Mon Sep 17 00:00:00 2001 From: ice_iix Date: Thu, 14 Jan 2021 06:31:25 -0800 Subject: [PATCH 1/6] 1.16.1+: add NetherGoldOre --- blocks/src/lib.rs | 12 ++++++++++++ 1 file changed, 12 insertions(+) diff --git a/blocks/src/lib.rs b/blocks/src/lib.rs index af70f10b..0098d4af 100644 --- a/blocks/src/lib.rs +++ b/blocks/src/lib.rs @@ -714,6 +714,18 @@ define_blocks! { props {}, model { ("minecraft", "coal_ore") }, } + NetherGoldOre { + props {}, + data None, + offsets |protocol_version| { + if protocol_version >= 735 { + Some(0) + } else { + None + } + }, + model { ("minecraft", "nether_gold_ore") }, + } Log { props { variant: TreeVariant = [ From 913e32d897c226972917d0f9a02c09b0b8abadea Mon Sep 17 00:00:00 2001 From: ice_iix Date: Thu, 14 Jan 2021 11:39:27 -0800 Subject: [PATCH 2/6] Add SoulFire --- blocks/src/lib.rs | 14 +++++++------- 1 file changed, 7 insertions(+), 7 deletions(-) diff --git a/blocks/src/lib.rs b/blocks/src/lib.rs index 0098d4af..8dd010dd 100644 --- a/blocks/src/lib.rs +++ b/blocks/src/lib.rs @@ -717,13 +717,7 @@ define_blocks! { NetherGoldOre { props {}, data None, - offsets |protocol_version| { - if protocol_version >= 735 { - Some(0) - } else { - None - } - }, + offsets |protocol_version| { if protocol_version >= 735 { Some(0) } else { None } }, model { ("minecraft", "nether_gold_ore") }, } Log { @@ -1401,6 +1395,12 @@ define_blocks! { _ => false, }, } + SoulFire { + props {}, + offsets |protocol_version| { if protocol_version >= 735 { Some(0) } else { None } }, + model { ("minecraft", "soul_fire") }, + collision vec![], + } MobSpawner { props {}, material material::NON_SOLID, From f3028d2bc35379b89209360374508ced3a93fdb8 Mon Sep 17 00:00:00 2001 From: ice_iix Date: Thu, 14 Jan 2021 11:46:59 -0800 Subject: [PATCH 3/6] Add SoulSoil, Basalt --- blocks/src/lib.rs | 19 +++++++++++++++++++ 1 file changed, 19 insertions(+) diff --git a/blocks/src/lib.rs b/blocks/src/lib.rs index 8dd010dd..b064eb4b 100644 --- a/blocks/src/lib.rs +++ b/blocks/src/lib.rs @@ -2055,6 +2055,25 @@ define_blocks! { Point3::new(1.0, 7.0/8.0, 1.0) )], } + SoulSoil { + props {}, + offsets |protocol_version| { if protocol_version >= 735 { Some(0) } else { None } }, + model { ("minecraft", "soul_soil") }, + } + Basalt { + props { + axis: Axis = [Axis::X, Axis::Y, Axis::Z], + }, + data None, + offsets |protocol_version| { if protocol_version >= 735 { Some( + match axis { + Axis::X => 0, + Axis::Y => 1, + Axis::Z => 2, + _ => unreachable!() + }) } else { None } }, + model { ("minecraft", "basalt") }, + } Glowstone { props {}, material Material { From bf09b54e160ac072e9e974ed376c234947943e2d Mon Sep 17 00:00:00 2001 From: ice_iix Date: Thu, 14 Jan 2021 11:55:50 -0800 Subject: [PATCH 4/6] Add PolishedBasalt, SoulTorch, SoulWallTorch --- blocks/src/lib.rs | 33 +++++++++++++++++++++++++++++++++ 1 file changed, 33 insertions(+) diff --git a/blocks/src/lib.rs b/blocks/src/lib.rs index b064eb4b..18453f84 100644 --- a/blocks/src/lib.rs +++ b/blocks/src/lib.rs @@ -2074,6 +2074,39 @@ define_blocks! { }) } else { None } }, model { ("minecraft", "basalt") }, } + PolishedBasalt { + props { + axis: Axis = [Axis::X, Axis::Y, Axis::Z], + }, + data None, + offsets |protocol_version| { if protocol_version >= 735 { Some( + match axis { + Axis::X => 0, + Axis::Y => 1, + Axis::Z => 2, + _ => unreachable!() + }) } else { None } }, + model { ("minecraft", "polished_basalt") }, + } + SoulTorch { + props {}, + data None, + offsets |protocol_version| { if protocol_version >= 735 { Some(0) } else { None } }, + model { ("minecraft", "soul_torch") }, + } + SoulWallTorch { + props { + facing: Direction = [ + Direction::North, + Direction::South, + Direction::West, + Direction::East + ], + }, + data None, + offsets |protocol_version| { if protocol_version >= 735 { Some(facing.offset()) } else { None } }, + model { ("minecraft", "soul_wall_torch") }, + } Glowstone { props {}, material Material { From 66b1f77fa0a14679e34c87227a6f9cda067f5c42 Mon Sep 17 00:00:00 2001 From: ice_iix Date: Thu, 14 Jan 2021 12:07:16 -0800 Subject: [PATCH 5/6] Add Chain --- blocks/src/lib.rs | 8 ++++++++ 1 file changed, 8 insertions(+) diff --git a/blocks/src/lib.rs b/blocks/src/lib.rs index 18453f84..6aca83c9 100644 --- a/blocks/src/lib.rs +++ b/blocks/src/lib.rs @@ -2392,6 +2392,14 @@ define_blocks! { _ => false, }, } + Chain { + props { + waterlogged: bool = [true, false], + }, + data None, + offsets |protocol_version| { if protocol_version >= 735 { Some(if waterlogged { 1 } else { 0 }) } else { None } }, + model { ("minecraft", "chain") }, + } GlassPane { props { north: bool = [false, true], From d6fc388022995ab1315a60ed6afa5aedb9843765 Mon Sep 17 00:00:00 2001 From: ice_iix Date: Thu, 14 Jan 2021 16:29:40 -0800 Subject: [PATCH 6/6] 1.16.2+: add Chain axis states --- blocks/src/lib.rs | 22 +++++++++++++++++++++- 1 file changed, 21 insertions(+), 1 deletion(-) diff --git a/blocks/src/lib.rs b/blocks/src/lib.rs index 6aca83c9..e9a3391d 100644 --- a/blocks/src/lib.rs +++ b/blocks/src/lib.rs @@ -2395,9 +2395,29 @@ define_blocks! { Chain { props { waterlogged: bool = [true, false], + axis: Axis = [Axis::X, Axis::Y, Axis::Z], }, data None, - offsets |protocol_version| { if protocol_version >= 735 { Some(if waterlogged { 1 } else { 0 }) } else { None } }, + offsets |protocol_version| { + if protocol_version >= 735 { + let o = if waterlogged { 1 } else { 0 }; + if protocol_version >= 751 { + Some(match axis { + Axis::X => 0, + Axis::Y => 1, + Axis::Z => 2, + _ => unreachable!() + } * 2 + o) + } else { + match axis { + Axis::Y => Some(o), + _ => None, + } + } + } else { + None + } + }, model { ("minecraft", "chain") }, } GlassPane {