summaryrefslogtreecommitdiffstats
path: root/src/Blocks/BlockFire.h
diff options
context:
space:
mode:
authorSTRWarrior <niels.breuker@hotmail.nl>2015-06-13 14:57:51 +0200
committerSTRWarrior <niels.breuker@hotmail.nl>2015-06-28 17:05:44 +0200
commite5cfe0cd96a67b493b91e7576ec0341452c23855 (patch)
tree458160137feb67c73766b1249bc8d686c2c29e3a /src/Blocks/BlockFire.h
parentuse atomic for state, to avoid torn reads (diff)
downloadcuberite-e5cfe0cd96a67b493b91e7576ec0341452c23855.tar
cuberite-e5cfe0cd96a67b493b91e7576ec0341452c23855.tar.gz
cuberite-e5cfe0cd96a67b493b91e7576ec0341452c23855.tar.bz2
cuberite-e5cfe0cd96a67b493b91e7576ec0341452c23855.tar.lz
cuberite-e5cfe0cd96a67b493b91e7576ec0341452c23855.tar.xz
cuberite-e5cfe0cd96a67b493b91e7576ec0341452c23855.tar.zst
cuberite-e5cfe0cd96a67b493b91e7576ec0341452c23855.zip
Diffstat (limited to '')
-rw-r--r--src/Blocks/BlockFire.h14
1 files changed, 14 insertions, 0 deletions
diff --git a/src/Blocks/BlockFire.h b/src/Blocks/BlockFire.h
index ec752885a..3f75455da 100644
--- a/src/Blocks/BlockFire.h
+++ b/src/Blocks/BlockFire.h
@@ -121,6 +121,20 @@ public:
}
}
+ int PortalHeight = MaxY - Y - 1;
+ int PortalWidth = XZP - XZM + 1;
+ if ((PortalHeight < a_WorldInterface.GetMinNetherPortalHeight()) || (PortalHeight > a_WorldInterface.GetMaxNetherPortalHeight()))
+ {
+ // The portal isn't high enough, or is too high
+ return;
+ }
+
+ if ((PortalWidth < a_WorldInterface.GetMinNetherPortalWidth()) || (PortalWidth > a_WorldInterface.GetMaxNetherPortalWidth()))
+ {
+ // The portal isn't wide enough, or is too wide
+ return;
+ }
+
for (int Height = Y + 1; Height <= MaxY - 1; Height++) // Loop through boundary to set portal blocks
{
for (int Width = XZM; Width <= XZP; Width++)