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

Method cBlockIDMap

src/BlockID.cpp:29–52  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

27
28public:
29 cBlockIDMap(void)
30 {
31 cIniFile Ini;
32 if (!Ini.ReadFile("items.ini"))
33 {
34 return;
35 }
36 int KeyID = Ini.FindKey("Items");
37 if (KeyID == cIniFile::noID)
38 {
39 return;
40 }
41 int NumValues = Ini.GetNumValues(KeyID);
42 for (int i = 0; i < NumValues; i++)
43 {
44 AString Name = Ini.GetValueName(KeyID, i);
45 if (Name.empty())
46 {
47 continue;
48 }
49 AString Value = Ini.GetValue(KeyID, i);
50 AddToMap(Name, Value);
51 } // for i - Ini.Values[]
52 }
53
54
55 int Resolve(const AString & a_ItemName)

Callers

nothing calls this directly

Calls 6

ReadFileMethod · 0.80
FindKeyMethod · 0.80
GetNumValuesMethod · 0.80
GetValueNameMethod · 0.80
emptyMethod · 0.80
GetValueMethod · 0.80

Tested by

no test coverage detected