mirror of
https://github.com/MihailRis/voxelcore.git
synced 2026-10-07 03:51:50 +00:00
commit
dc27bd1430
12 changed files with 149 additions and 16 deletions
|
|
@ -121,8 +121,8 @@ template<> void ContentUnitLoader<Block>::loadUnit(
|
|||
}
|
||||
|
||||
def.variants = std::make_unique<Variants>();
|
||||
def.variants->offset = 0;
|
||||
def.variants->mask = 0xF;
|
||||
def.variants->offset = offset;
|
||||
def.variants->mask = (1ULL << bitsCount) - 1;
|
||||
def.variants->variants.push_back(def.defaults);
|
||||
for (int i = 0; i < variants.size(); i++) {
|
||||
Variant variant = def.defaults;
|
||||
|
|
@ -220,6 +220,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