diff options
Diffstat (limited to 'src/Blocks/BlockFire.h')
-rw-r--r-- | src/Blocks/BlockFire.h | 19 |
1 files changed, 19 insertions, 0 deletions
diff --git a/src/Blocks/BlockFire.h b/src/Blocks/BlockFire.h index 2038df94b..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++) @@ -217,6 +231,11 @@ public: return (FoundFrameZP && FoundFrameZM); } + + virtual bool DoesIgnoreBuildCollision(cPlayer * a_Player, NIBBLETYPE a_Meta) override + { + return true; + } }; |