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

Method LoadFromJson

src/BlockEntities/SignEntity.cpp:83–95  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

81
82
83bool cSignEntity::LoadFromJson(const Json::Value & a_Value)
84{
85 m_PosX = a_Value.get("x", 0).asInt();
86 m_PosY = a_Value.get("y", 0).asInt();
87 m_PosZ = a_Value.get("z", 0).asInt();
88
89 m_Line[0] = a_Value.get("Line1", "").asString();
90 m_Line[1] = a_Value.get("Line2", "").asString();
91 m_Line[2] = a_Value.get("Line3", "").asString();
92 m_Line[3] = a_Value.get("Line4", "").asString();
93
94 return true;
95}
96
97
98

Callers 2

LoadFromDiskMethod · 0.45
LoadEntitiesFromJsonMethod · 0.45

Calls 3

asIntMethod · 0.80
getMethod · 0.80
asStringMethod · 0.80

Tested by

no test coverage detected