blocks: add 1.16.1/2+ new blocks/states (#474)
Adds _some _new blocks and block states, building on the version- dependent block support added in #469. Notably, fixes grass on 1.16.4. 1.16.1+ (protocol_version >= 735) * Add NetherGoldOre * Add SoulFire * Add SoulSoil, Basalt * Add PolishedBasalt, SoulTorch, SoulWallTorch * Add Chain 1.16.2+ (protocol_version >= 751) * Add Chain axis states
This commit is contained in:
parent
8ca12a69ce
commit
49274e7e52
|
@ -714,6 +714,12 @@ define_blocks! {
|
||||||
props {},
|
props {},
|
||||||
model { ("minecraft", "coal_ore") },
|
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 {
|
Log {
|
||||||
props {
|
props {
|
||||||
variant: TreeVariant = [
|
variant: TreeVariant = [
|
||||||
|
@ -1389,6 +1395,12 @@ define_blocks! {
|
||||||
_ => false,
|
_ => false,
|
||||||
},
|
},
|
||||||
}
|
}
|
||||||
|
SoulFire {
|
||||||
|
props {},
|
||||||
|
offsets |protocol_version| { if protocol_version >= 735 { Some(0) } else { None } },
|
||||||
|
model { ("minecraft", "soul_fire") },
|
||||||
|
collision vec![],
|
||||||
|
}
|
||||||
MobSpawner {
|
MobSpawner {
|
||||||
props {},
|
props {},
|
||||||
material material::NON_SOLID,
|
material material::NON_SOLID,
|
||||||
|
@ -2043,6 +2055,58 @@ define_blocks! {
|
||||||
Point3::new(1.0, 7.0/8.0, 1.0)
|
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") },
|
||||||
|
}
|
||||||
|
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 {
|
Glowstone {
|
||||||
props {},
|
props {},
|
||||||
material Material {
|
material Material {
|
||||||
|
@ -2328,6 +2392,34 @@ define_blocks! {
|
||||||
_ => false,
|
_ => false,
|
||||||
},
|
},
|
||||||
}
|
}
|
||||||
|
Chain {
|
||||||
|
props {
|
||||||
|
waterlogged: bool = [true, false],
|
||||||
|
axis: Axis = [Axis::X, Axis::Y, Axis::Z],
|
||||||
|
},
|
||||||
|
data 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 {
|
GlassPane {
|
||||||
props {
|
props {
|
||||||
north: bool = [false, true],
|
north: bool = [false, true],
|
||||||
|
|
Loading…
Reference in New Issue