refactor ContentBuilder and add entities support

This commit is contained in:
MihailRis
2024-06-26 03:40:14 +03:00
parent 1acced4475
commit 66a1240fbc
9 changed files with 90 additions and 75 deletions
+2 -2
View File
@@ -12,7 +12,7 @@
// All in-game definitions (blocks, items, etc..)
void corecontent::setup(EnginePaths* paths, ContentBuilder* builder) {
Block& block = builder->createBlock("core:air");
Block& block = builder->blocks.create("core:air");
block.replaceable = true;
block.drawGroup = 1;
block.lightPassing = true;
@@ -22,7 +22,7 @@ void corecontent::setup(EnginePaths* paths, ContentBuilder* builder) {
block.model = BlockModel::none;
block.pickingItem = "core:empty";
ItemDef& item = builder->createItem("core:empty");
ItemDef& item = builder->items.create("core:empty");
item.iconType = item_icon_type::none;
auto bindsFile = paths->getResources()/fs::path("bindings.toml");