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

Function BlockDefs_DefineBlockExt

src/Protocol.c:1932–1949  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

1930}
1931
1932static void BlockDefs_DefineBlockExt(cc_uint8* data) {
1933 Vec3 minBB, maxBB;
1934 BlockID block = BlockDefs_DefineBlockCommonStart(&data,
1935 blockDefsExt_Ext.serverVersion >= 2);
1936
1937 minBB.x = (cc_int8)(*data++) / 16.0f;
1938 minBB.y = (cc_int8)(*data++) / 16.0f;
1939 minBB.z = (cc_int8)(*data++) / 16.0f;
1940
1941 maxBB.x = (cc_int8)(*data++) / 16.0f;
1942 maxBB.y = (cc_int8)(*data++) / 16.0f;
1943 maxBB.z = (cc_int8)(*data++) / 16.0f;
1944
1945 Blocks.MinBB[block] = minBB;
1946 Blocks.MaxBB[block] = maxBB;
1947 BlockDefs_DefineBlockCommonEnd(data, 1, block);
1948 Block_DefineCustom(block, false);
1949}
1950
1951static void BlockDefs_Reset(void) {
1952 if (!Game_Version.HasCPE || !Game_AllowCustomBlocks) return;

Callers

nothing calls this directly

Calls 3

Block_DefineCustomFunction · 0.85

Tested by

no test coverage detected