Merge pull request #1807 from ludovic111/fix/no-nether-portal-in-the-end
🤖 Agent: merged after verify and the parity harnesses this change reaches passed on its head.
This commit is contained in:
@@ -7883,8 +7883,12 @@ impl Game<'_> {
|
||||
(0..width).all(|i| frame([left[0] + d[0] * i, left[1] + height, left[2] + d[2] * i]));
|
||||
((3..=21).contains(&height) && top_ok).then_some((left, width, height))
|
||||
}
|
||||
/// BaseFireBlock.onPlace: lighting fire inside a frame creates a portal.
|
||||
/// BaseFireBlock.onPlace: lighting fire inside a frame creates a portal,
|
||||
/// only in the Overworld and the Nether (`inPortalDimension`).
|
||||
fn try_light_portal(&mut self, at: [i32; 3]) -> Result<bool> {
|
||||
if !matches!(self.dim, Dim::Overworld | Dim::Nether) {
|
||||
return Ok(false);
|
||||
}
|
||||
for x_axis in [true, false] {
|
||||
if let Some((origin, width, height)) = self.portal_shape(at, x_axis) {
|
||||
let d = if x_axis { [1, 0, 0] } else { [0, 0, 1] };
|
||||
|
||||
Reference in New Issue
Block a user