MCPcopy Create free account
hub / github.com/Hopson97/HopsonCraft / editableGetSection

Method editableGetSection

Source/World/Chunk/Full_Chunk.cpp:138–150  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

136 }
137
138 Section* Full_Chunk::editableGetSection (int32_t index)
139 {
140 //This causes trees and other structures to sometimes not work correctly!
141 if (index < 0)
142 return nullptr;
143
144 while (index > m_sectionCount - 1)
145 {
146 addSection();
147 }
148
149 return &m_chunkSections[index];
150 }
151
152
153 void Full_Chunk::addSection()

Callers 2

regenerateChunksMethod · 0.80
editableGetMethod · 0.80

Calls

no outgoing calls

Tested by

no test coverage detected