89 if ((MaxY != 0) && (newY == Y + 1))
107 for (
int checkBorder = FoundObsidianY + 1; checkBorder <= MaxY - 1; checkBorder++)
127 int X1 = X + 1, Z1 = Z + 1, X2 = X - 1, Z2 = Z - 1;
142 int PortalHeight = MaxY - Y - 1;
143 int PortalWidth = XZP - XZM + 1;
156 for (
int Height = Y + 1; Height <= MaxY - 1; Height++)
158 for (
int Width = XZM; Width <=
XZP; Width++)
179 bool FoundFrameXP =
false, FoundFrameXM =
false;
184 if ((Value == -1) || (ValueTwo == -1))
189 else if ((Value != MaxY) && (ValueTwo != MaxY))
199 if ((Value == -1) || (ValueTwo == -1))
204 else if ((Value != MaxY) && (ValueTwo != MaxY))
211 return (FoundFrameXP && FoundFrameXM);
218 bool FoundFrameZP =
false, FoundFrameZM =
false;
223 if ((Value == -1) || (ValueTwo == -1))
228 else if ((Value != MaxY) && (ValueTwo != MaxY))
238 if ((Value == -1) || (ValueTwo == -1))
243 else if ((Value != MaxY) && (ValueTwo != MaxY))
250 return (FoundFrameZP && FoundFrameZM);
void SetBlock(Vector3i a_BlockPos, BLOCKTYPE a_BlockType, NIBBLETYPE a_BlockMeta)
Sets the block at the specified coords to the specified value.
virtual void OnPlaced(cChunkInterface &a_ChunkInterface, cWorldInterface &a_WorldInterface, Vector3i a_BlockPos, BLOCKTYPE a_BlockType, NIBBLETYPE a_BlockMeta) override
Called by cWorld::SetBlock() after the block has been set.
virtual ColourID GetMapBaseColourID(NIBBLETYPE a_Meta) override
Returns the base colour ID of the block, as will be represented on a map, as per documentation: https...
unsigned char BLOCKTYPE
The datatype used by blockdata.
bool FindPortalSliceX(int X1, int X2, int Y, int Z, int MaxY, cChunkInterface &a_ChunkInterface)
Evaluates if coordinates are a portal going XP / XM; returns true if so, and writes boundaries to var...
bool EvaluatePortalBorder(int X, int FoundObsidianY, int Z, int MaxY, cChunkInterface &a_ChunkInterface)
Evaluates if coords have a valid border on top, based on MaxY.
virtual int GetMaxNetherPortalWidth(void) const =0
unsigned char NIBBLETYPE
The datatype used by nibbledata (meta, light, skylight)
virtual int GetMinNetherPortalWidth(void) const =0
Returns or sets the minumim or maximum netherportal width.
virtual int GetMinNetherPortalHeight(void) const =0
Returns or sets the minumim or maximum netherportal height.
int XZP
Portal boundary and direction variables.
void FindAndSetPortalFrame(int X, int Y, int Z, cChunkInterface &a_ChunkInterface, cWorldInterface &a_WorldInterface)
Finds entire frame in any direction with the coordinates of a base block and fills hole with nether p...
virtual bool IsClickedThrough(void) override
Indicates whether the client will click through this block.
virtual bool DoesIgnoreBuildCollision(cChunkInterface &a_ChunkInterface, Vector3i a_Pos, cPlayer &a_Player, NIBBLETYPE a_Meta) override
Checks if the player can build "inside" this block.
bool FindPortalSliceZ(int X, int Y, int Z1, int Z2, int MaxY, cChunkInterface &a_ChunkInterface)
Evaluates if coords are a portal going ZP / ZM; returns true if so, and writes boundaries to variable...
int FindObsidianCeiling(int X, int Y, int Z, cChunkInterface &a_ChunkInterface, int MaxY=0)
Traces along YP until it finds an obsidian block, returns Y difference or 0 if no portal...
BLOCKTYPE GetBlock(Vector3i a_Pos)
virtual cItems ConvertToPickups(NIBBLETYPE a_BlockMeta, cBlockEntity *a_BlockEntity, const cEntity *a_Digger, const cItem *a_Tool) override
Returns the pickups that would result if the block was mined by a_Digger using a_Tool.
cBlockFireHandler(BLOCKTYPE a_BlockType)
This class bridges a vector of cItem for safe access via Lua.
virtual int GetMaxNetherPortalHeight(void) const =0