MCPcopy Create free account
hub / github.com/ClassiCube/ClassiCube / GetBlock

Function GetBlock

src/Particle.c:55–61  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

53}
54
55static BlockID GetBlock(int x, int y, int z) {
56 if (World_Contains(x, y, z)) return World_GetBlock(x, y, z);
57
58 if (y >= Env.EdgeHeight) return BLOCK_AIR;
59 if (y >= Env_SidesHeight) return Env.EdgeBlock;
60 return Env.SidesBlock;
61}
62
63static cc_bool ClipY(struct Particle* p, int y, cc_bool topFace, CanPassThroughFunc canPassThrough) {
64 BlockID block;

Callers 2

ClipYFunction · 0.85
IntersectsBlockFunction · 0.85

Calls 2

World_ContainsFunction · 0.85
World_GetBlockFunction · 0.85

Tested by

no test coverage detected