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

Method OnChunkGenerated

src/Bindings/PluginLua.cpp:283–297  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

281
282
283bool cPluginLua::OnChunkGenerated(cWorld * a_World, int a_ChunkX, int a_ChunkZ, cChunkDesc * a_ChunkDesc)
284{
285 cCSLock Lock(m_CriticalSection);
286 bool res = false;
287 cLuaRefs & Refs = m_HookMap[cPluginManager::HOOK_CHUNK_GENERATED];
288 for (cLuaRefs::iterator itr = Refs.begin(), end = Refs.end(); itr != end; ++itr)
289 {
290 m_LuaState.Call((int)(**itr), a_World, a_ChunkX, a_ChunkZ, a_ChunkDesc, cLuaState::Return, res);
291 if (res)
292 {
293 return true;
294 }
295 }
296 return false;
297}
298
299
300

Callers 2

DoGenerateMethod · 0.45

Calls 3

beginMethod · 0.80
endMethod · 0.80
CallMethod · 0.45

Tested by

no test coverage detected