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

Function Entity_SetBlockModel

src/Entity.c:109–120  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

107}
108
109static void Entity_SetBlockModel(struct Entity* e, const cc_string* model) {
110 static const cc_string block = String_FromConst("block");
111 int raw = Block_Parse(model);
112
113 if (raw == -1) {
114 /* use default humanoid model */
115 e->Model = Models.Human;
116 } else {
117 e->ModelBlock = (BlockID)raw;
118 e->Model = Model_Get(&block);
119 }
120}
121
122void Entity_SetModel(struct Entity* e, const cc_string* model) {
123 cc_string name, scale;

Callers 1

Entity_SetModelFunction · 0.85

Calls 2

Block_ParseFunction · 0.85
Model_GetFunction · 0.85

Tested by

no test coverage detected