mirror of
https://github.com/MihailRis/voxelcore.git
synced 2026-10-06 19:41:51 +00:00
fix extended block grounding (new block property)
This commit is contained in:
parent
0cc8c70a17
commit
0b7dc14f55
7 changed files with 111 additions and 8 deletions
|
|
@ -206,6 +206,15 @@ template<> void ContentUnitLoader<Block>::loadUnit(
|
|||
def.defaults.model.type = BlockModelType::AABB;
|
||||
def.hitboxes = {AABB(def.size)};
|
||||
}
|
||||
|
||||
// grounding behaviour
|
||||
if (root.has("grounding-behaviour")) {
|
||||
std::string groundingBehaviourName = GroundingBehaviourMeta.getNameString(def.groundingBehaviour);
|
||||
root.at("grounding-behaviour").get(groundingBehaviourName);
|
||||
if (!GroundingBehaviourMeta.getItem(groundingBehaviourName, def.groundingBehaviour)) {
|
||||
logger.error() << "unknown grounding behaviour: " << groundingBehaviourName;
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
// primitive properties
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue