MCPcopy Create free account
hub / github.com/cuberite/cuberite / GetHeightAt

Method GetHeightAt

src/Generating/HeiGen.cpp:214–225  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

212
213
214bool cHeiGenCache::GetHeightAt(int a_ChunkX, int a_ChunkZ, int a_RelX, int a_RelZ, HEIGHTTYPE & a_Height)
215{
216 for (int i = 0; i < m_CacheSize; i++)
217 {
218 if ((m_CacheData[i].m_ChunkX == a_ChunkX) && (m_CacheData[i].m_ChunkZ == a_ChunkZ))
219 {
220 a_Height = cChunkDef::GetHeight(m_CacheData[i].m_HeightMap, a_RelX, a_RelZ);
221 return true;
222 }
223 } // for i - m_CacheData[]
224 return false;
225}
226
227
228

Callers 1

GetHeightmapAtMethod · 0.80

Calls 1

CubicNoise2DMethod · 0.80

Tested by

no test coverage detected