/// <summary> Returns the block at the given world coordinates without bounds checking. </summary> public BlockID GetBlockAdj(int x, int y, int z) { int i = (y * Length + z) * Width + x; #if USE16_BIT return((BlockID)((blocks1[i] | (blocks2[i] << 8)) & BlockInfo.MaxDefined)); #else //return blocks1[i]; return(ChunkHandler.GetBlockAdjSafe(x, y, z)); #endif }
int GetMaxBlock(int x, int z) { for (int i = 127; i >= 0; i--) { BlockRaw block = ChunkHandler.GetBlockAdjSafe(x, i, z); if (block != Block.Air) { return(i); } } return(0); }