Makes chunks stay loaded until this object is cleared or destroyed Works by setting internal flags in...
Direction m_Dir
The direction of the portal.
UInt32 m_EntityID
The ID of the entity that's being moved.
int m_MaxY
The maximum Y to scan to.
cWorld & m_SourceWorld
The world we're moving the entity from, used to query the entity ID.
bool IsValidBuildLocation(Vector3i a_BlockPosition)
Whether the given location is a valid location to build a portal.
static const double OutOffset
Where to place the player out from the face and across the face.
static const int SearchSolidBaseWidth
The width of a solid base to search for when building.
virtual void OnChunkAvailable(int a_ChunkX, int a_ChunkY) override
Called when a specific chunk become available.
virtual void OnDisabled(void) override
Called by the ChunkMap when the ChunkStay is disabled.
bool m_BuildPlatform
Whether to build a platform.
Vector3d m_Position
The center of the search area.
static const int PortalHeight
static const int PortalLength
Length and height, including the obsidian.
cWorld & m_World
The world we're moving the entity to.
static const int SearchRadius
static const double AcrossOffset
static const int BuildSearchRadius
void BuildNetherPortal(Vector3i a_Location, Direction a_Direction, bool a_IncludePlatform)
Builds a portal.
cNetherPortalScanner(cEntity &a_MovingEntity, cWorld &a_DestinationWorld, Vector3d a_DestPosition, int a_MaxY)
virtual bool OnAllChunksAvailable(void) override
Called once all of the contained chunks are available.
bool m_FoundPortal
Whether we found a portal during the loading of the chunks.
Vector3i m_PortalLoc
The position of the pre-existing portal.