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

Method tick

Source/World/Chunk/Full_Chunk.cpp:35–61  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

33
34
35 void Full_Chunk::tick()
36 {
37 /**
38 @TODO Use this x and z position to update top block of
39 column at location according to weather conditions
40 (of which is not implemented as of 23/05/2017)
41 */
42
43/*
44 if (Random::intInRange(1, 16) == 1)
45 {
46 auto x = (uint8_t)Random::intInRange(0, CHUNK_SIZE - 1);
47 auto z = (uint8_t)Random::intInRange(0, CHUNK_SIZE - 1);
48
49 auto height = getHeightAt(x, z);
50 auto block = qGetBlock(x, height, z);
51
52 auto worldBlockPosition =
53 Maths::Convert::chunkBlockToWorldBlockPosition({x, height, z}, getPosition());
54
55 }
56*/
57 for (auto& chunk : m_chunkSections)
58 {
59 chunk.tick(*m_pWorld);
60 }
61 }
62
63
64 void Full_Chunk::setBlock(const Block::Position& position,

Callers

nothing calls this directly

Calls

no outgoing calls

Tested by

no test coverage detected