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

Method materialCollisionKind

source/game/StarMaterialDatabase.cpp:372–379  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

370}
371
372CollisionKind MaterialDatabase::materialCollisionKind(MaterialId materialId) const {
373 if (isRealMaterial(materialId))
374 return getMaterialInfo(materialId)->collisionKind;
375 else if (containsMetaMaterial(materialId))
376 return getMetaMaterialInfo(materialId)->collisionKind;
377 else
378 return CollisionKind::Block;
379}
380
381bool MaterialDatabase::canPlaceInLayer(MaterialId materialId, TileLayer layer) const {
382 return layer != TileLayer::Background || !getMaterialInfo(materialId)->foregroundOnly;

Callers 15

moveBlockMethod · 0.80
setForegroundMaterialMethod · 0.80
placePlantMethod · 0.80
generateCaveLiquidMethod · 0.80
prepareSectorMethod · 0.80
reapplyBiomeMethod · 0.80
informTilePredictionMethod · 0.80
paintMethod · 0.80
setCentralStructureMethod · 0.80

Calls 1

isRealMaterialFunction · 0.85

Tested by

no test coverage detected