fix extended block grounding (new block property)

This commit is contained in:
clasher113 2026-02-28 18:31:15 +02:00
parent 0cc8c70a17
commit 0b7dc14f55
7 changed files with 111 additions and 8 deletions

View file

@ -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