MCPcopy Create free account
hub / github.com/OpenStarbound/OpenStarbound / materialItemDrop

Method materialItemDrop

source/game/StarMaterialDatabase.cpp:385–393  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

383}
384
385ItemDescriptor MaterialDatabase::materialItemDrop(MaterialId materialId) const {
386 if (isRealMaterial(materialId)) {
387 auto matInfo = getMaterialInfo(materialId);
388 if (!matInfo->itemDrop.empty())
389 return ItemDescriptor(matInfo->itemDrop, 1, JsonObject());
390 }
391
392 return {};
393}
394
395ItemDescriptor MaterialDatabase::modItemDrop(ModId modId) const {
396 if (isRealMod(modId)) {

Callers 3

handleIncomingPacketsMethod · 0.80
processActionMethod · 0.80
destroyBlockMethod · 0.80

Calls 3

isRealMaterialFunction · 0.85
ItemDescriptorClass · 0.85
emptyMethod · 0.45

Tested by

no test coverage detected